LVM2 segfault w/devfs on amd64
The LVM2 tools (e.g., vgscan) segfault on an x86_64/amd64 system if devfs is used, unless /dev/md* are filtered out. Also, after the first attempt has segfaulted, subsequent attempts will hang, consuming 100% of CPU until killed; this continues until the system is rebooted. I can reproduce this reliably on a Gentoo system.
I have tracked the segfault down to line 71 of lib/filters/filter.c, which in my version of the source is:
[...]
if (!(((int *) f->private)[MAJOR(dev->dev)])) {
[...]
It appears that the code assumes that all device major numbers will be < 256, and does not check that this is true before indexing that array, and so when the device major number is >=256, as it can be with devfs and also, I believe, udev, there is a segmentation fault. I'm not sure what's causing subsequent invocations to hang; I didn't bother to dig into that.
Even though devfs is officially deprecated, I believe this issue should definitely be fixed, since it could happen also with udev. Shall I file a bug, or is this a known issue?
I initially filed this as a bug against Gentoo, which can be viewed
at: http://bugs.gentoo.org/show_bug.cgi?id=58798
Thanks,
Randall Nortman
Quoted 2 lines · Randall Nortman
I have tracked the segfault down to line 71 of
lib/filters/filter.c, which in my version of the source is:
What version?
Meant to have got fixed in 2.00.20.
Alasdair
Signature · 1 line
[email protected]
Well, that explains it. Gentoo is currently distributing 2.00.08. I will update the bug I already filed with Gentoo to indicate that it's fixed in the new version. Thanks!
Quoted 15 lines · Alasdair G Kergon
Quoted 2 lines · Randall Nortman
I have tracked the segfault down to line 71 of
lib/filters/filter.c, which in my version of the source is:What version?
Meant to have got fixed in 2.00.20.Alasdair
Signature · 6 lines
[email protected] _______________________________________________ linux-lvm mailing list [email protected] https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/