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

Segmentation fault with "zpool import -d /dev/disk/by-id -a" #974

Closed
ancwrd1 opened this issue Sep 18, 2012 · 2 comments
Closed

Segmentation fault with "zpool import -d /dev/disk/by-id -a" #974

ancwrd1 opened this issue Sep 18, 2012 · 2 comments
Milestone

Comments

@ancwrd1
Copy link

ancwrd1 commented Sep 18, 2012

Stack trace:

Program received signal SIGSEGV, Segmentation fault.
fix_paths (names=, nv=0x622b70) at ../../lib/libzfs/libzfs_import.c:176
176 ../../lib/libzfs/libzfs_import.c: No such file or directory.
(gdb) bt
#0 fix_paths (names=, nv=0x622b70) at ../../lib/libzfs/libzfs_import.c:176
#1 fix_paths (nv=0x622b70, names=) at ../../lib/libzfs/libzfs_import.c:129
#2 0x00007ffff7473a6c in fix_paths (nv=0x622898, names=0x620fb0) at ../../lib/libzfs/libzfs_import.c:140
#3 0x00007ffff7473a6c in fix_paths (nv=0x622780, names=0x620fb0) at ../../lib/libzfs/libzfs_import.c:140
#4 0x00007ffff7474bf6 in get_configs (active_ok=B_FALSE, pl=, hdl=0x6214a0)

at ../../lib/libzfs/libzfs_import.c:732

#5 zpool_find_import_impl (hdl=0x6214a0, iarg=0x7fff00000000) at ../../lib/libzfs/libzfs_import.c:1182
#6 0x000000000040b61e in ?? ()
#7 0x000000000040478e in ?? ()
#8 0x00007ffff6ca076d in __libc_start_main (main=0x4045e0, argc=5, ubp_av=0x7fffffffe3c8,

init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe3b8)
at libc-start.c:226

Seems like there an error on the following line:
if (ne->ne_order < best->ne_order || best == NULL)

Which should be obviously:
if (best == NULL || ne->ne_order < best->ne_order)

@ancwrd1 ancwrd1 closed this as completed Sep 18, 2012
@ancwrd1 ancwrd1 reopened this Sep 18, 2012
@ancwrd1
Copy link
Author

ancwrd1 commented Sep 18, 2012

Sorry, I accidentally closed the issue - it was not meant.

@behlendorf
Copy link
Contributor

Thank you for catching that! Fixed.

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