Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 210413 - nfs-utils-1.1.1: mounting an nfs share segfaults
Summary: nfs-utils-1.1.1: mounting an nfs share segfaults
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Network Filesystems
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-16 22:33 UTC by Constantin Greubel
Modified: 2008-04-24 18:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Constantin Greubel 2008-02-16 22:33:04 UTC
[#]> emerge -pv nfs-utils

These are the packages that would be merged, in order:

Calculating dependencies   ... done!
[ebuild   R   ] net-fs/nfs-utils-1.1.1  USE="tcpd -kerberos -nonfsv4" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Then I try to mount something:
[#]> mount ./media

This takes about 1 second, and then finishes, without any error message, but the nfs-share is not mounted. My dmesg output then shows me the following:
mount.nfs[15900]: segfault at 369ed80c eip 0804e702 esp bf80fe60 error 4

This works flawlessly with nfs-utils-1.1.0-r1

The server has nfs-utils-1.1.1 but also worked with 1.1.0-r1

Reproducible: Always

Steps to Reproduce:
1. emerge "=nfs-utils-1.1.1"
2. mount a nfs-share
3.

Actual Results:  
segfaults
nfs-share is not mounted

Expected Results:  
dont segfault
mount the nfs-share

emerge --info output:

Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.2.2, glibc-2.7-r1, 2.6.24-gentoo-r2 i686)
=================================================================
System uname: 2.6.24-gentoo-r2 i686 Genuine Intel(R) CPU T2400 @ 1.83GHz
Timestamp of tree: Fri, 15 Feb 2008 22:00:01 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -fomit-frame-pointer -msse -msse2 -mmmx -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -fomit-frame-pointer -msse -msse2 -mmmx -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sfperms strict unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo"
LINGUAS="de en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X509 aac acl acpi alsa aotuv bash-completion bzip2 crypt cscope cups dhcp dvd encode fftw flac gif glitz graphviz imlib ipv6 javascript jbig jpeg jpeg2k lcms logrotate md5sum mmap mmx mng mp3 mp4 nfs nls no-old-linux nptl ogg opengl pdf png quicktime real rtc sdl sse sse2 ssl svg svga tcpd theora threads tiff truetype unicode vorbis win32codecs x264 x86 xosd xpm xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1        emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m       maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="*" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="fglrx"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 SpanKY gentoo-dev 2008-02-17 07:56:03 UTC
please rebuild with CFLAGS='-g -pipe' and see if it still crashes

if so, run it through gdb

also, post the /etc/fstab line for the mount point in question
Comment 2 Constantin Greubel 2008-02-17 14:46:57 UTC
(In reply to comment #1)
> please rebuild with CFLAGS='-g -pipe' and see if it still crashes

it does.

> if so, run it through gdb

seems, it doesn't work

[#]> gdb /sbin/mount.nfs
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run /sbin/mount.nfs xxx.xxx.xxx.xxx:/nfsroot/media /home/Constantin.Greubel/media
Starting program: /sbin/mount.nfs /sbin/mount.nfs xxx.xxx.xxx.xxx:/nfsroot/media /home/Constantin.Greubel/media
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
usage: mount.nfs remotetarget dir [-rvVwfnsih] [-o nfsoptions]
options:
        -r              Mount file system readonly
        -v              Verbose
        -V              Print version
        -w              Mount file system read-write
        -f              Fake mount, do not actually mount
        -n              Do not update /etc/mtab
        -s              Tolerate sloppy mount options rather than fail
        -i              Pass mount options to the kernel via a string
        -h              Print this help
        nfsoptions      Refer to mount.nfs(8) or nfs(5)


Program exited with code 01.
(gdb)

> also, post the /etc/fstab line for the mount point in question
> 
xxx.xxx.xxx.xxx:/nfsroot/media     /home/Constantin.Greubel/media      nfs     auto,rw,users,intr,rsize=8192,wsize=8192       0 0
Comment 3 SpanKY gentoo-dev 2008-02-18 16:12:43 UTC
well, it did work, you just didnt tell it to do the same thing as when it crashed

if you need help using gdb, please review the Gentoo bug reporting guide
Comment 4 Constantin Greubel 2008-02-18 21:39:31 UTC
(In reply to comment #3)
> if you need help using gdb, please review the Gentoo bug reporting guide

Ok. Here we go again:

nfs-utils build with 
CFLAGS="-O1 -pipe -g -ggdb"
and
FEATURES="nostrip"

[#]> /sbin/mount.nfs xxx.xxx.xxx.xxx:/nfsroot/media /home/Constantin.Greubel/media
Segmentation fault
[#]> gdb --args /sbin/mount.nfs xxx.xxx.xxx.xxx:/nfsroot/media /home/Constantin.Greubel/media
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /sbin/mount.nfs xxx.xxx.xxx.xxx:/nfsroot/media /home/Constantin.Greubel/media

Program received signal SIGSEGV, Segmentation fault.
0x0804f09f in nfsmount (spec=0xbfdfd6b6 "xxx.xxx.xxx.xxx:/nfsroot/media", node=0x805f008 "/home/Constantin.Greubel/media",
    flags=<value optimized out>, extra_opts=0xbfdfc2b4, fake=0, running_bg=0) at nfsmount.c:755
755     nfsmount.c: No such file or directory.
        in nfsmount.c
(gdb) bt
#0  0x0804f09f in nfsmount (spec=0xbfdfd6b6 "xxx.xxx.xxx.xxx:/nfsroot/media",
    node=0x805f008 "/home/Constantin.Greubel/media", flags=<value optimized out>, extra_opts=0xbfdfc2b4, fake=0,
    running_bg=0) at nfsmount.c:755
#1  0x0804a031 in try_mount (spec=0xbfdfd6b6 "xxx.xxx.xxx.xxx:/nfsroot/media",
    mount_point=0x805f008 "/home/Constantin.Greubel/media", flags=0, fs_type=<value optimized out>,
    extra_opts=0xbfdfc2b4, mount_opts=0x0, fake=0, nomtab=0, bg=0) at mount.c:387
#2  0x0804ac8d in main (argc=3, argv=Cannot access memory at address 0xda7b607
) at mount.c:548
(gdb) quit
The program is running.  Exit anyway? (y or n) y

Comment 5 SpanKY gentoo-dev 2008-04-20 10:50:56 UTC
1.1.2 is in the tree ... please test it
Comment 6 Constantin Greubel 2008-04-24 18:03:29 UTC
works for me