# pvcreate /dev/sdb Segmentation fault. stracktrace: (gdb) run /dev/sdb Starting program: /usr/sbin/pvcreate /dev/sdb Reading symbols from shared object read from target memory...done. Loaded system supplied DSO at 0x94a000 File descriptor 3 left open File descriptor 4 left open File descriptor 5 left open Program received signal SIGSEGV, Segmentation fault. 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0x0807304e in dev_create_file (filename=0x8b4c7d0 "/etc/lvm/lvm.conf", dev=0x0, alias=0x8b471a0, use_malloc=1) at device/dev-cache.c:70 #2 0x080728ce in read_config_file (cft=0x8b4c7b8) at config/config.c:237 #3 0x0806f7a3 in _load_config_file (cmd=0x8b47690, tag=0x80b55d3 "") at commands/toolcontext.c:347 #4 0x0806fa3f in _init_lvm_conf (cmd=0x8b47690) at commands/toolcontext.c:377 #5 0x08070474 in create_toolcontext (the_args=0x80c5760) at commands/toolcontext.c:927 #6 0x0805734c in lvm2_main (argc=2, argv=0xbfd83034, is_static=0) at lvmcmdline.c:954 #7 0x0806b3ea in main (argc=1735287144, argv=0x11) at lvm.c:20
It segfaults without the /dev/sdb too.
Please confirm exact versions, which kernel & glibc packages, hardware platform and whether there's anything unusual like xen involved; also run it under 'strace'.
also attach a copy of /etc/lvm/lvm.conf to this bugzilla
Created attachment 134035 [details] strace intel 2.6.16-1.2133_FC5 lvm2-2.02.01-1.2.1 glibc-2.4-8 glibc-common-2.4-8 glibc-kernheaders-3.0-5.2 glibc-headers-2.4-8 glibc-devel-2.4-8 I haven't edited lvm.conf, it's stock (8ca8f0cdab06cf78cf57bbc997357f60) strace attached
Which device-mapper package - 1.02.02-3.2 ? Try running under 'ltrace' too and attach the output. Is selinux enabled? Enforcing? Does 'lvm version' work? Does 'lvm' (with no args) give you an lvm shell prompt? Does pvcreate work if you prefix the command with 'lvm.static'? ('lvm.static pvcreate ...')
what does 'ldd /usr/sbin/pvcreate' say? which architecture (i.e. the 'Hardware:' field on this bugzilla - what cpu?)
[I have same packages & lvm.conf as you have installed here - though different kernel - and it works for me. So still need to work out the essential difference in your system.]
Here you go: # rpm -q device-mapper device-mapper-1.02.07-2.0 # ltrace lvm ltrace: Couldn't find .dynsym or .dynstr in "/sbin/lvm" # selinuxenabled ; echo $? 1 # lvm version Segmentation fault # lvm Segmentation fault # ldd $(which lvm) not a dynamic executable # lvm.static pvcreate Please enter a physical volume path (etc).
# ldd /usr/sbin/pvcreate linux-gate.so.1 => (0x0094a000) libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x00aa2000) libreadline.so.5 => /usr/lib/libreadline.so.5 (0x04200000) libselinux.so.1 => /lib/libselinux.so.1 (0x03f88000) libdl.so.2 => /lib/libdl.so.2 (0x00ac4000) libncurses.so.5 => /usr/lib/libncurses.so.5 (0x03fc8000) libc.so.6 => /lib/libc.so.6 (0x00968000) libsepol.so.1 => /lib/libsepol.so.1 (0x03f43000) /lib/ld-linux.so.2 (0x0094b000) # head -5 /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 3 model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
Ah. I have vmware and nvidia both installed on this box.. want to leave this, or?
Try those commands with explicit path: /usr/sbin/lvm (only interested in ltrace from a command that segfaults, by the way)
If it's related to vmware or nvidia, it would still be good to know that was the cause.
So far, you seem to have shown that 'lvm.static' is working OK. (that's the statically-linked version of the executable used during boot)
Created attachment 134038 [details] ltrace
(In reply to comment #11) > Try those commands with explicit path: /usr/sbin/lvm # /usr/sbin/lvm Segmentation fault
dm_strdup(0x9dda7d0, 0x80b4736, 65, 0xaaa63b, 0x80b4736 <unfinished ...> --- SIGSEGV (Segmentation fault) ---
Is that related to http://www.redhat.com/archives/dm-devel/2006-February/msg00055.html ?
possibly - you have a different device-mapper rpm which must not be compatible
So missing a requires in the rpm then.
The FC-5 one is still: Version: 1.02.02 Release: 3.2 If you want to use the newer one, you need to use the corresponding new lvm2 package as well.
The rpm says: Install Date: Tue Jul 4 09:59:26 2006 Yum agrees: # zgrep device-mapper /var/log/yum.log* /var/log/yum.log.1:Jul 04 09:59:39 Updated: device-mapper.i386 1.02.07-2.0 but doesn't show the repo. Where on earth did it come from, if it's not in FC5?
Ah from FC4. This is an upgrade box. I will sort it out. Thanks very much.
It works now. I did: # rpm -e device-mapper lvm2 --nodeps # yum install device-mapper lvm2
the new dm package should probably have a conflicts line or similar Ah yes - we did release an update for fc4 because that package was too old to handle the latest kernels. We could release it for fc5 too if people wanted it - it's not necessary, but it might avoid problems like this hitting other people.
and I suppose releasing an update to the dm package with a conflict would cause a mess. This bug will probably show up by the lvm gui tool failing to work.