Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zdb gives Input/Output error #1997

Closed
FransUrbo opened this issue Dec 22, 2013 · 4 comments
Closed

zdb gives Input/Output error #1997

FransUrbo opened this issue Dec 22, 2013 · 4 comments
Milestone

Comments

@FransUrbo
Copy link
Contributor

(Possibly) related to #1848, #1862 and #1933.

Any attempt to run (most) zdb commands gives Input/Output error. Trying on an exported pool, with the cache file removed, gives a segmentation fault:

celia(SSD1):~# zdb -c -e -p /dev/disk/by-id share 8328
Segmentation fault

Running it through gdb shows:

[...]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf6f68b10 (LWP 12467)]
0xf76906ab in spa_history_log_internal (spa=0xaa52c1a0, operation=0xf76cc1d4 "import", tx=0x0,
    fmt=0xf76d7db4 "pool version %llu; software version %llu/%d; uts %s %s %s %s") at ../../module/zfs/spa_history.c:488
488     ../../module/zfs/spa_history.c: No such file or directory.
        in ../../module/zfs/spa_history.c
(gdb) bt
#0  0xf76906ab in spa_history_log_internal (spa=0xaa52c1a0, operation=0xf76cc1d4 "import", tx=0x0,
    fmt=0xf76d7db4 "pool version %llu; software version %llu/%d; uts %s %s %s %s") at ../../module/zfs/spa_history.c:488
#1  0xf7690789 in spa_history_log_version (spa=0xaa52c1a0, operation=0xf76cc1d4 "import") at ../../module/zfs/spa_history.c:549
#2  0xf768b82f in spa_import (pool=0x9d661c8 "share", config=0x9d661d0, props=0x0, flags=1) at ../../module/zfs/spa.c:4045
#3  0x08054807 in main ()
@behlendorf
Copy link
Contributor

@FransUrbo The history code changed substantially with the libzfs_core changes which went in just after 0.6.2. It would be helpful to instrument spa_history_log_internal to see exactly where things go wrong, it's not obvious to me from the gdb stack. You could also try disabling spa_history_log_version for now, it's entirely non-critical and could just be commented out to see if there are other issues.

@FransUrbo
Copy link
Contributor Author

It is the dmu_tx_create_dd() in spa_history_log_internal() that triggers the seg fault...

Doing a blame on spa.c, I see a lot of rougue's hand here. I'll have a talk to @lundman about this...

--EDIT-- Actually, that seems to be wrong. It looked a little weird, so I did a diff between my version and the vanilla ZoL code and no spa_history_log* stuff is touched.

@FransUrbo
Copy link
Contributor Author

Disabling spa_history_log_version() stops the seg fault, but then I'm back to I/O error:

On an exported pool:

celia(SSD1):~# zdb -c -e -p /dev/disk/by-id share 8328
zdb: can't open 'share': Input/output error
celia(SSD1):~# zdb -c -e -p /dev/disk/by-id share 0 8328
zdb: can't open 'share': Input/output error

Which is the same as on an imported pool:

celia(SSD1):~# zdb -c share 8328
zdb: can't open 'share': Input/output error
celia(SSD1):~# zdb -c share 0 8328
zdb: can't open 'share': Input/output error

@FransUrbo
Copy link
Contributor Author

I'm closing this, because it's now quite obvious that it's the zfs-crypto patch that fucked everything up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants