-
Notifications
You must be signed in to change notification settings - Fork 1.8k
'zpool get' segfaults with two vdevs #15972
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
Comments
I did a test on FreeBSD: I've run this through gdb, and se segfault happens within zpool_find_vdev in this line: Line 3056 in 04bae5e
`__GI_____strtoul_l_internal (nptr=0x0, endptr=0x7fffffff8250, base=0, group=0, bin_cst=true, loc=0x7ffff7da33c0 <_nl_global_locale>) at ../stdlib/strtol_l.c:238 Program received signal SIGSEGV, Segmentation fault. The ISSPACE receives 0x0. |
commit 2a673e7 (@allanjude @mmaybee) added vdev properties, and zpool_do_get() was changed to say:
commit 3e4ed42 (@rob-wing) was about "Create zap for root vdev", and changed it to say:
|
Hi, I’m Egor from OSS Revival. We specialize in revitalizing and maintaining open-source projects for long-term stability. I’ll work on this issue, ensuring it stays aligned with the project’s original vision. |
Signed-off-by: Syed Shahrukh Hussain <[email protected]>
…). This change fixes the zpool get command segfault if you pass two or vdevs to zpool get. The problem was identified in handling of the zpool get command line arguments. A pointer vdev was used to point to the argv[1], and its address set to cb.cb_vdevs.cb_names (pointer to array of strings) so any increment to cb_names resulted in a segfault. Fix covers a special case of root parameter at argv[1] and remaining cases are handled by passing in the argv + 1, which allows cb_names iteration of next command line arguments (vdevs). Signed-off-by: Syed Shahrukh Hussain <[email protected]>
…fs#15972). The problem was identified in handling of the zpool get state command line arguments. A pointer vdev was used to point to the argv[1], and its address set to cb.cb_vdevs.cb_names(pointer to array of strings) so any increment to cb_names resulted in a segfault. Fix covers a special case of root parameter at argv[1] and remaining cases are handled by passing in the argv + 1, which allows cb_names iteration of next command line arguments (vdevs). Signed-off-by: Syed Shahrukh Hussain <[email protected]>
…. (#17213) The problem was identified in handling of the zpool get state command line arguments. A pointer vdev was used to point to the argv[1], and its address set to cb.cb_vdevs.cb_names(pointer to array of strings) so any increment to cb_names resulted in a segfault. Fix covers a special case of root parameter at argv[1] and remaining cases are handled by passing in the argv + 1, which allows cb_names iteration of next command line arguments (vdevs). Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Attila Fülöp <[email protected]> Signed-off-by: Syed Shahrukh Hussain <[email protected]>
This has been fixed |
…fs#15972). (openzfs#17213) The problem was identified in handling of the zpool get state command line arguments. A pointer vdev was used to point to the argv[1], and its address set to cb.cb_vdevs.cb_names(pointer to array of strings) so any increment to cb_names resulted in a segfault. Fix covers a special case of root parameter at argv[1] and remaining cases are handled by passing in the argv + 1, which allows cb_names iteration of next command line arguments (vdevs). Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Attila Fülöp <[email protected]> Signed-off-by: Syed Shahrukh Hussain <[email protected]>
…fs#15972). (openzfs#17213) The problem was identified in handling of the zpool get state command line arguments. A pointer vdev was used to point to the argv[1], and its address set to cb.cb_vdevs.cb_names(pointer to array of strings) so any increment to cb_names resulted in a segfault. Fix covers a special case of root parameter at argv[1] and remaining cases are handled by passing in the argv + 1, which allows cb_names iteration of next command line arguments (vdevs). Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Attila Fülöp <[email protected]> Signed-off-by: Syed Shahrukh Hussain <[email protected]>
…fs#15972). (openzfs#17213) The problem was identified in handling of the zpool get state command line arguments. A pointer vdev was used to point to the argv[1], and its address set to cb.cb_vdevs.cb_names(pointer to array of strings) so any increment to cb_names resulted in a segfault. Fix covers a special case of root parameter at argv[1] and remaining cases are handled by passing in the argv + 1, which allows cb_names iteration of next command line arguments (vdevs). Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Attila Fülöp <[email protected]> Signed-off-by: Syed Shahrukh Hussain <[email protected]>
…fs#15972). (openzfs#17213) The problem was identified in handling of the zpool get state command line arguments. A pointer vdev was used to point to the argv[1], and its address set to cb.cb_vdevs.cb_names(pointer to array of strings) so any increment to cb_names resulted in a segfault. Fix covers a special case of root parameter at argv[1] and remaining cases are handled by passing in the argv + 1, which allows cb_names iteration of next command line arguments (vdevs). Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Attila Fülöp <[email protected]> Signed-off-by: Syed Shahrukh Hussain <[email protected]>
…fs#15972). (openzfs#17213) The problem was identified in handling of the zpool get state command line arguments. A pointer vdev was used to point to the argv[1], and its address set to cb.cb_vdevs.cb_names(pointer to array of strings) so any increment to cb_names resulted in a segfault. Fix covers a special case of root parameter at argv[1] and remaining cases are handled by passing in the argv + 1, which allows cb_names iteration of next command line arguments (vdevs). Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Attila Fülöp <[email protected]> Signed-off-by: Syed Shahrukh Hussain <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
System information
Describe the problem you're observing
If you pass two vdevs to
zpool get
, it will segfault. Both vdevs need to be part of the pool.Describe how to reproduce the problem
Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: