Bug 202173 - pvcreate segfault
Summary: pvcreate segfault
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
(Show other bugs)
Version: 5
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Alasdair Kergon
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-11 12:06 UTC by Need Real Name
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version: fc5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-13 08:59:39 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
strace (78.98 KB, text/plain)
2006-08-11 16:19 UTC, Need Real Name
no flags Details
ltrace (117.25 KB, text/plain)
2006-08-11 16:49 UTC, Need Real Name
no flags Details

Description Need Real Name 2006-08-11 12:06:56 UTC
# 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

Comment 1 Need Real Name 2006-08-11 12:08:57 UTC
It segfaults without the /dev/sdb too.

Comment 2 Alasdair Kergon 2006-08-11 12:36:10 UTC
Please confirm exact versions, which kernel & glibc packages, hardware platform
and whether there's anything unusual like xen involved; also run it under 'strace'.

Comment 3 Alasdair Kergon 2006-08-11 12:39:03 UTC
also attach a copy of /etc/lvm/lvm.conf to this bugzilla

Comment 4 Need Real Name 2006-08-11 16:19:14 UTC
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

Comment 5 Alasdair Kergon 2006-08-11 16:36:20 UTC
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 ...')


Comment 6 Alasdair Kergon 2006-08-11 16:40:50 UTC
what does 'ldd /usr/sbin/pvcreate' say?

which architecture (i.e. the 'Hardware:' field on this bugzilla - what cpu?)

Comment 7 Alasdair Kergon 2006-08-11 16:42:59 UTC
[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.]

Comment 8 Need Real Name 2006-08-11 16:43:13 UTC
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).

Comment 9 Need Real Name 2006-08-11 16:44:15 UTC
# 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

Comment 10 Need Real Name 2006-08-11 16:45:43 UTC
Ah. I have vmware and nvidia both installed on this box.. want to leave this, or?

Comment 11 Alasdair Kergon 2006-08-11 16:46:43 UTC
Try those commands with explicit path: /usr/sbin/lvm

(only interested in ltrace from a command that segfaults, by the way)


Comment 12 Alasdair Kergon 2006-08-11 16:47:42 UTC
If it's related to vmware or nvidia, it would still be good to know that was the
cause.

Comment 13 Alasdair Kergon 2006-08-11 16:49:01 UTC
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)

Comment 14 Need Real Name 2006-08-11 16:49:13 UTC
Created attachment 134038 [details]
ltrace

Comment 15 Need Real Name 2006-08-11 16:49:26 UTC
(In reply to comment #11)
> Try those commands with explicit path: /usr/sbin/lvm
# /usr/sbin/lvm
Segmentation fault

Comment 16 Alasdair Kergon 2006-08-11 16:50:57 UTC
dm_strdup(0x9dda7d0, 0x80b4736, 65, 0xaaa63b, 0x80b4736 <unfinished ...>
--- SIGSEGV (Segmentation fault) ---


Comment 17 Need Real Name 2006-08-11 16:54:20 UTC
Is that related to
http://www.redhat.com/archives/dm-devel/2006-February/msg00055.html ?

Comment 18 Alasdair Kergon 2006-08-11 17:03:05 UTC
possibly - you have a different device-mapper rpm which must not be compatible

Comment 19 Need Real Name 2006-08-11 17:04:51 UTC
So missing a requires in the rpm then.

Comment 20 Alasdair Kergon 2006-08-11 17:05:39 UTC
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.

Comment 21 Need Real Name 2006-08-11 17:08:05 UTC
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?

Comment 22 Need Real Name 2006-08-11 17:09:15 UTC
Ah from FC4. This is an upgrade box. I will sort it out.
Thanks very much.

Comment 23 Need Real Name 2006-08-11 17:10:52 UTC
It works now. I did:

# rpm -e device-mapper lvm2 --nodeps
# yum install  device-mapper lvm2


Comment 24 Alasdair Kergon 2006-08-11 17:12:33 UTC
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.

Comment 25 Need Real Name 2006-08-11 17:15:52 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.