Bug 468011 - mount -l segfaults
Summary: mount -l segfaults
Keywords:
Status: CLOSED DUPLICATE of bug 466619
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux-ng
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-22 11:23 UTC by Panu Matilainen
Modified: 2008-10-22 21:50 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-10-22 21:50:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Panu Matilainen 2008-10-22 11:23:47 UTC
Description of problem:

Running "mount -l" segfaults, apparently related to my /home partition on LVM.

Version-Release number of selected component (if applicable):
util-linux-ng-2.13.1-8.3.fc9.x86_64
e2fsprogs-1.41.0-2.fc9.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Run 'mount -l'
  
Actual results:
[pmatilai@localhost ~]$ mount -l
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
Segmentation fault

Expected results:
util-linux-ng from rawhide seems to fare a bit better, it doesn't segfault when running non-root (but it too crashes the same way when running as root), here's what it says:

/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/mapper/VolGroup00-LogVol02 on /home type ext3 (rw)
/dev/sda1 on /boot type ext3 (rw) [/boot]
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
gvfs-fuse-daemon on /home/pmatilai/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=pmatilai)

Additional info:

Here's the backtrace from F9 version:
(gdb) bt
#0  0x00000000009d99c2 in strcmp () from /lib64/libc.so.6
#1  0x00000000003323c2 in blkid_get_dev (cache=<value optimized out>, 
    devname=<value optimized out>, flags=<value optimized out>) at devname.c:99
#2  0x0000000000335c3d in blkid_get_tag_value (cache=<value optimized out>, 
    tagname=<value optimized out>, devname=<value optimized out>)
    at resolve.c:45
#3  0x00007fc95336d398 in print_one (me=<value optimized out>) at mount.c:260
#4  0x00007fc953370dde in print_all () at mount.c:280
#5  main (argc=<value optimized out>, argv=<value optimized out>)
    at mount.c:1994
(gdb)

It seems to crash somewhere inside libblkid, dunno if it's a bug in there or mount itself. FWIW, commenting out blkid_get_cache() in fsprobe_get_label_by_devname() appears to make the crash go away. With the below against rawhide util-linux-ng it no longer crashes even as root but didn't track it further into libblkid:

--- fsprobe_blkid.c.orig	2008-10-22 14:14:39.000000000 +0300
+++ fsprobe_blkid.c	2008-10-22 14:17:48.000000000 +0300
@@ -21,8 +21,10 @@
 const char *
 fsprobe_get_label_by_devname(const char *devname)
 {
+#if 0
 	if (!blkid)
 		blkid_get_cache(&blkid, NULL);
+#endif
 
 	return blkid_get_tag_value(blkid, "LABEL", devname);
 }

Comment 1 Karel Zak 2008-10-22 21:50:28 UTC

*** This bug has been marked as a duplicate of bug 466619 ***


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