Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 255369 - autofs-5.0.4 hangs
Summary: autofs-5.0.4 hangs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Stefaan De Roeck (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-18 11:32 UTC by Andrej Filipcic
Modified: 2009-07-09 20:13 UTC (History)
2 users (show)

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


Attachments
Fix use after free in lookup_hosts.c (autofs-5.0.4-fix-hosts-map-use-after-free.patch,1.33 KB, patch)
2009-04-08 08:06 UTC, Ian Kent
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Filipcic 2009-01-18 11:32:41 UTC
I have been experiencing random hangs in automounter with version 5.0.4 and kernel 2.6.27-gentoo-r7. It happens only on very active systems, where the specific nfs mounts are constantly used. The number of nfs mounts is very low (below 10) and at some point, the automounter is hanged completely, so stat of files under the /net tree is completely blocked. mounting the same nfs partitions with mount works fine. The situation is quite hard to reproduce, and it usually takes days before the hang.

Looking at the current list of 5.0.4 patches on kernel.org there are three additional fixes which I am not sure they will resolve the issue. The fixes solve issues for large number of direct mounts. However, Could you bumb a newer 5.0.4 ebuild with all this fixes included? It might help.
Comment 1 Wormo (RETIRED) gentoo-dev 2009-01-19 03:06:50 UTC
Which of the patches at http://www.kernel.org/pub/linux/daemons/autofs/v5/ are the 3 patches you are interested in?
Comment 2 Andrej Filipcic 2009-01-19 08:13:32 UTC
Probably all three of them:
autofs-5.0.4-use-CLOEXEC-flag.patch
autofs-5.0.4-fix-select-fd-limit.patch
autofs-5.0.4-make-hash-table-scale-to-thousands-of-entries.patch

I have not really look into the patch details, maybe the first one would help.
Comment 3 Stefaan De Roeck (RETIRED) gentoo-dev 2009-01-20 09:10:57 UTC
A version bump seemed like a good idea, so I created net-fs/autofs-5.0.4-r1.  Please report back with your results, because I (strangely) still have not been able to reproduce this.  
This bug is probably related (or identical) to bug #253806.
Comment 4 John M. Drescher 2009-01-20 15:03:29 UTC
I was experiencing the same symptoms with a 2.6.26 openvz kernel and local auto mounts. I will try the new version. 
Comment 5 Andrej Filipcic 2009-01-21 14:16:07 UTC
autofs-5.0.4-r1 has the same problem, so the patches did not help.I will try to provide more info when it happens again.
Comment 6 James Bevan 2009-01-21 23:07:42 UTC
(In reply to comment #3)
> A version bump seemed like a good idea, so I created net-fs/autofs-5.0.4-r1. 
> Please report back with your results, because I (strangely) still have not been
> able to reproduce this.  
> This bug is probably related (or identical) to bug #253806.
> 
Unfortunately 5.0.4-r1 broke working /net mount behaviour.  Where previously 'ls -l /net/<host> correctly shows the root of the exported filesystems, it now shows the directory contents of the last in the list of exported filesystems.  Working again on reverting to 5.0.4.
Comment 7 Andrej Filipcic 2009-02-05 11:46:01 UTC
Recently, I am experiencing segfaults with autofs-5.0.4-r2. I have rebuilt autofs with debug info, and the backtrace looks like:

#0  lookup_mount (ap=0x7f56adc9b620, name=0x7f56a9010ff0 ".directory",
    name_len=10, context=0x7f56adc95290) at lookup_hosts.c:151
151     lookup_hosts.c: No such file or directory.
        in lookup_hosts.c
(gdb) bt
#0  lookup_mount (ap=0x7f56adc9b620, name=0x7f56a9010ff0 ".directory",
    name_len=10, context=0x7f56adc95290) at lookup_hosts.c:151
#1  0x00007f56ada547e5 in lookup_nss_mount (ap=0x7f56adc9b620, source=0x0,
    name=0x7f56a9010ff0 ".directory", name_len=10) at lookup.c:879
#2  0x00007f56ada4c93d in do_mount_indirect (arg=<value optimized out>)
    at indirect.c:760
#3  0x00007f56ad407007 in start_thread () from /lib/libpthread.so.0
#4  0x00007f56ad17b38d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

The corresponding line where it segfaults is:
                cache_unlock(me->mc);


emerge --info:
Portage 2.2_rc23 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.27-gentoo-r7 x86_64)                                                                                                                                      
=================================================================                                                                                                                                                                              
System uname: Linux-2.6.27-gentoo-r7-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2350-with-glibc2.2.5                                                                                                                                           
Timestamp of tree: Thu, 05 Feb 2009 07:15:01 +0000                                                                                                                                                                                             
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]                                                                                                                                                            
ccache version 2.4 [disabled]                                                                                                                                                                                                                  
app-shells/bash:     3.2_p48                                                                                                                                                                                                                   
dev-java/java-config: 1.3.7-r1, 2.1.7                                                                                                                                                                                                          
dev-lang/python:     2.4.4-r4, 2.5.4-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.2
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/share/config /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/grid-security/certificates /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -pipe"
DISTDIR="/net/teran/d0/nfs/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="buildpkg distcc distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS=" http://ftp.heanet.ie/pub/gentoo ftp://ftp.ipv6.uni-muenster.de/pub/linux/distributions/gentoo http://ftp.gentoo.skynet.be/pub/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en sl"
MAKEOPTS="-j6"
PKGDIR="/net/teran/d0/nfs/gentoo/packages/amd64.gcc4"
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"
PORTDIR_OVERLAY="/usr/portage/local/layman/desktop-effects /usr/portage/local/layman/xemacs /usr/portage/local/layman/sunrise /usr/portage/local/layman/java-overlay /usr/portage/local/layman/kde-testing /net/teran/d0/nfs/gentoo/portage.local"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac aalib accessibility accounting acl acpi addressbook admin ads afs aiglx aio akonadi alsa amarok amd64 amr amrnb amrwb ansi ao apache2 applet arts asf athena atlas automount avahi bash-completion bcmath beagle berkdb bidi binfilter bl blas bluetooth bonjour bonobo branding bzip2 cairo calendar canvas caps cdaudio cdb cddb cdio cdparanoia cdr cern chm cjk clamav clarens cli cmake colordiff console context cpudetection cracklib crciprec crypt css ctype cups curl curlwrappers cvs cyrillic cyrus daap dawn dba dbm dbox2 dbus dc1394 dedicated deprecated designer-plugin device-mapper dga dia dirac directfb diskio divx4linux djvu dlloader doc dri dssi dts dv dvb dvd dvdnav dvdr dvi edl eds elf elisp emacs emacs-w3 enblend enca encode esd exif exiv2 expat extensible extra fame fastcgi fat fbcon festival ffmpeg fftw filepicker firefox fits flac flatfile float fluidsynth font-server foomaticdb fortran fping freebox freetts ftp fuse gadu galago games gcj gcl gd gdbm gdml geant3 geant4 geolocation gif gimp gimpprint glib glitz gmp gnokii gnome gnuplot gnutls gphoto2 gpm gps graphics graphviz groupwise gsf gstreamer gtk gtk2 gtkhtml guile hal hash hdhomerun hfs howl hpn htmlhandbook humanities hyperestraier ical iconv id3tag idn ieee1394 ifp imagemagick imap imlib inkjar innodb inotify iodbc ipod ipv6 irda isdnlog ithreads ivtv jack jadetex java java5 javascript jfs jingle joystick jpeg jpeg2k json junit kde kdeprefix kerberos keyring kig-scripting kpathsea krb4 ktts ladspa lapack laptop latex lcd lcms ldap ldap-sasl ldapsam libcaca libclamav libnotify libsamplerate lirc live lm_sensors logrotate lua lyx lzo mad maps math matroska mbox mcve md5sum mdnsresponder-compat meanwhile messenger mfd-rewrites mhash midi mikmod mime mjpeg mmx mmxext mng modplug mono mozbranding mozdevelop mozilla mozsvg mp2 mp3 mp3tunes mp4 mpeg mpi mplayer msn mtp mudflap mule multilib musepack music musicbrainz mysql mysqli nagios-dns nagios-ntp nagios-ping nas nautilus ncurses nemesi network networking networkmanager newxkb njb nls nptl nptlonly nsplugin ntfs nvidia nvtv nxclient objc odbc odk ogg ole omega openal openexr opengl openinventor openmp oscar oss overlays pam pcmcia pcntl pcre pda pdf pdo pear perl perlsuid php pic plasma plotutils png pnm portaudio posix postfix postgres postgresql postscript povray ppds pppd prediction pstricks publishers pulseaudio pvr pythia6 pythia8 python qmake qq qt qt-static qt3 qt3support qt4 quicktime quotas radio rar rdesktop reaa readline redeyes reflection regex reiser4 reiserfs rpc rtc ruby samba sasl sbcl scanner schroedinger science sdl sdl-image seamonkey semantic-desktop sendmail server session sift silc silvercity simplexml skey slang slp smime sms smux sndfile snmp soap sockets solver sound sox speex spell spl sql sqlite sqlite3 srt sse sse2 ssl ssse3 startup-notification subtitles subversion suhosin svg sysfs sysvipc t1lib taglib tcltk tcpd teletext tetex tex4ht tga theora threads thunderbird tidy tiff tk tokenizer transcode truetype truetype-fonts twolame type1-fonts unicode upnp usb utempter utf8 v4l v4l2 vcd vcdx vhosts vim-syntax visualization vorbis wavpack wddx webdav webkit wifi wmf wmn wxwindows x264 xanim xattr xcb xcomposite xetex xface xfs xim xine xinerama xml xml2 xmlreader xmlrpc xmlwriter xmp xorg xpm xrootd xscreensaver xsl xulrunner xv xvid xvmc yaz zephyr zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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 proxy auth_digest authn_dbd asis cern_meta charset_lite dbd dumpio ident imagemap log_forensic proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http version substitute" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en sl" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mga neomagic nv radeon savage sis tdfx trident vesa vga via vmware voodoo radeonhd v4l"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 8 Andrej Filipcic 2009-02-21 07:46:07 UTC
There were plenty of patches added in the last week. Maybe a new release with all the 5.0.4 patches would solve the current issues.
Comment 9 Ian Kent 2009-04-08 08:04:54 UTC
(In reply to comment #7)
> 
> The corresponding line where it segfaults is:
>                 cache_unlock(me->mc);

Just happened upon this.
The patch you need to fix this issue is
autofs-5.0.4-fix-hosts-map-use-after-free.patch

The mistake is fairly obvious when you look at the patch.
Comment 10 Ian Kent 2009-04-08 08:06:49 UTC
Created attachment 187667 [details, diff]
Fix use after free in lookup_hosts.c

Clearly, this may require some adjustment if not applied with
other 5.0.4 patches.
Comment 11 Andrej Filipcic 2009-04-08 08:12:34 UTC
I am using autofs with all the patches (released until March 13th) for quite some time now on a large cluster without any problems. So I would advise to add all of them to a new ebuild.
Comment 12 Stefaan De Roeck (RETIRED) gentoo-dev 2009-04-27 09:08:10 UTC
net-fs/autofs-5.0.4-r3 is now in the tree, with new patches added.  Could you please try it out and report back?  Thanks
Comment 13 Andrej Filipcic 2009-07-09 20:13:22 UTC
Sorry for a very late reply. I started using the latest autofs a week ago and it works perfectly well.