Bug 847873

Summary: autofs segfault in create_client when program opens symlink leading to unreachable autofs dir
Product: Red Hat Enterprise Linux 6 Reporter: David Jaša <djasa>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: yanfu,wang <yanwang>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: dkovalsk, eguan, gbailey, ikent, phoned, rwheeler, swaikar
Target Milestone: beta   
Target Release: 6.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: abrt_hash:38d790fb9608ed2c1ce6db38c4b98c02f86e83c9
Fixed In Version: autofs-5.0.5-55.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 10:53:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 827024    
Bug Blocks:    
Attachments:
Description Flags
autofs backtrace none

Description David Jaša 2012-08-13 21:23:48 UTC
Created attachment 604091 [details]
autofs backtrace

Description of problem:
autofs segfault in create_client when program opens symlink leading to unreachable autofs dir

Version-Release number of selected component (if applicable):
autofs-5.0.5-54.el6.x86_64

How reproducible:
didn't try to reproduce

borrowing a reproducer from my https://bugzilla.redhat.com/show_bug.cgi?id=808404#c15 :

I _think_ I got a reliable FF hang reproducer - on current RHEL 6:
1) have autofs up'n'running
2) make symlink to some automounted NFS directory:
ln -s /net/server/path/to/dir /mnt/server_dir
3) in firefox, save some page to /mnt/server_dir/path
4) kill connectivity to the server (kill VPN, iptables -I OUTPUT -d server -j DROP, ...)
5) try to save another page <-- autofs also does something wrong,
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
=--->                           autofs makes this $SUBJ of this bug


                                firefox freezes
6) attach with gdb to firefox: gdb -pid $(pidof firefox)
   gdb will also hang


Additional info:
see also comment 13 and later at bug 808404.

Comment 1 Ian Kent 2012-08-14 01:38:19 UTC
Try again with:
http://people.redhat.com/~ikent/autofs-5.0.5-54.bz827024.1.el6/

Comment 2 David 2012-08-21 14:47:13 UTC
Same version of autofs and any access to /net/nfs breaks it. The above package fixes the problem.

Core was generated by `automount --pid-file /var/run/autofs.pid'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007efef92f4862 in create_client (info=0x7efefcad49e0, client=0x7efefcad4a50) at rpc_subs.c:381
381		if  (!clnt_control(*client, CLSET_FD_CLOSE, NULL)) {
Missing separate debuginfos, use: debuginfo-install db4-4.7.25-17.el6.x86_64 keyutils-libs-1.4-4.el6.x86_64 libgssglue-0.1-11.el6.x86_64 libselinux-2.0.94-5.3.el6.x86_64 nspr-4.9.1-2.el6_3.x86_64 nss-3.13.5-1.el6_3.x86_64 nss-softokn-freebl-3.12.9-11.el6.x86_64 nss-util-3.13.5-1.el6_3.x86_64 openssl-1.0.0-20.el6_2.5.x86_64
(gdb) bt
#0  0x00007efef92f4862 in create_client (info=0x7efefcad49e0, client=0x7efefcad4a50) at rpc_subs.c:381
#1  0x00007efef92f4f69 in rpc_portmap_getport (info=0x7efefcad4a90, parms=0x7efefcad4af0, port=0x7efefcad4aa8)
    at rpc_subs.c:560
#2  0x00007efef92f5490 in rpc_get_exports (host=<value optimized out>, seconds=<value optimized out>, 
    micros=<value optimized out>, option=<value optimized out>) at rpc_subs.c:898
#3  0x00007efef92f19ac in lookup_mount (ap=0x7efefe758300, name=0xremoved "filer.hostname", name_len=17, 
    context=0x7efeec000fd0) at lookup_hosts.c:250
#4  0x00007efefcb94ce2 in lookup_nss_mount (ap=0x7efefe758300, source=0x0, name=0xremoved "filer.hostname", 
    name_len=17) at lookup.c:898
#5  0x00007efefcb8d710 in do_mount_indirect (arg=<value optimized out>) at indirect.c:813
#6  0x00007efefc748851 in start_thread (arg=0x7efefcad7700) at pthread_create.c:301
#7  0x00007efefb6696dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Comment 3 David Jaša 2012-08-21 16:14:02 UTC
(In reply to comment #1)
> Try again with:
> http://people.redhat.com/~ikent/autofs-5.0.5-54.bz827024.1.el6/

Confirmed, these packages fix the issue for me as well.

Comment 7 yanfu,wang 2012-11-02 02:50:13 UTC
As per comment #5, QE will not ack it.

Comment 8 yanfu,wang 2012-11-02 03:05:55 UTC
bug 827024 is private, so ack this bug to show to customers.

Comment 10 yanfu,wang 2012-11-21 08:11:00 UTC
The bug is a duplicate of the private bug 827024 which has verified by QE, and this bug also verified by customer too, so change it to verify.

Comment 11 errata-xmlrpc 2013-02-21 10:53:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0462.html

Comment 12 Siddharth 2013-05-02 10:15:44 UTC
customer verified the patch and issue resolves.

--- Feedback from customer ----

This fixed the problem. I can now:

cd /net/non-nfs-host

where non-nfs-host is some real host not running nfs and it times out instead of crashing the automount deamon:

------------------------------