Bug 570783 - Segmentation fault when looking up '*.'
Summary: Segmentation fault when looking up '*.'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: autofs
Version: 5.4
Hardware: x86_64
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: Jian Li
URL:
Whiteboard:
Depends On:
Blocks: 704937
TreeView+ depends on / blocked
 
Reported: 2010-03-05 11:59 UTC by Duncan Mortimer
Modified: 2018-11-14 13:46 UTC (History)
6 users (show)

Fixed In Version: autofs-5.0.1-0.rc2.150.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 704937 (view as bug list)
Environment:
Last Closed: 2011-07-21 08:43:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
This is an edited version of the /var/log/messages file (7.98 KB, text/plain)
2010-03-05 11:59 UTC, Duncan Mortimer
no flags Details
Patch - fix wildcard map entry match (756 bytes, patch)
2010-03-05 14:34 UTC, Ian Kent
no flags Details | Diff
Patch - fix wildcard map entry match (updated) (1.40 KB, patch)
2010-05-18 03:41 UTC, Ian Kent
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1079 0 normal SHIPPED_LIVE autofs bug fix and enhancement update 2011-07-21 08:37:25 UTC

Description Duncan Mortimer 2010-03-05 11:59:39 UTC
Created attachment 398030 [details]
This is an edited version of the /var/log/messages file

Description of problem:
When accessing a trigger point on an indirect map, attempting to ls *. will cause the terminal session to hang until the time out period is exceeded and automount to segfault. A reboot may be necessary to get automount running again.

Version-5.0.1-0.rc2.131.el5_4.1


How reproducible:
Always

Steps to Reproduce:
1. Create an automount map for a set of NFS shares
echo "*	-rw,intr,hard	nfs0:/volumes/Data/&" > /etc/auto.data
echo "/vols/Data auto.data" >> /etc/auto.master
2. Restart autofs:
service autofs restart
3. ls /vols/Data/*.
  
Actual results:
Terminal session hangs for several minutes before returning
ls: /vols/Data/*.: No such file or directory
Automount is not running:
ps -ef | grep auto
root      9865  9357  0 11:48 pts/2    00:00:00 grep auto
service autofs restart
Stopping automount:                                        [  OK  ]
Starting automount:                                        [  OK  ]
[root@test ~]# ps -ef | grep auto
root      9923     1  1 11:48 ?        00:00:00 automount
root      9938  9357  0 11:48 pts/2    00:00:00 grep auto

We have a computer (lots of interactive login users and subsequent automounts) which fails in the restart of automount and requires a reboot, but a lightly loaded system seems to be able to restart automount ok.

Expected results:
ls: /vols/Data/*.: No such file or directory
and automount not crashing!

Additional info:
I have attached a snippet from /var/log/messages when autofs is set to verbose logging.

Comment 1 Ian Kent 2010-03-05 13:35:48 UTC
Mmmm ... I'll check this out.

Comment 2 Ian Kent 2010-03-05 14:34:57 UTC
Created attachment 398057 [details]
Patch - fix wildcard map entry match

Comment 3 Ian Kent 2010-03-05 14:37:05 UTC
The above patch may help with this problem.

I have added this patch and another that may also be related,
from bug 551599, to a test build that is located at:
http://people.redhat.com/~ikent/autofs-5.0.1-0.rc2.131.bz570783.1.el5.1

Could you try this out please.

Comment 4 Duncan Mortimer 2010-03-05 16:13:37 UTC
This looks great. My test machine survived the attempted mount so I consider this to be a fix.

Comment 5 Ian Kent 2010-03-06 06:11:34 UTC
(In reply to comment #4)
> This looks great. My test machine survived the attempted mount so I consider
> this to be a fix.    

It's not resolved yet.

This change tells us that we are on the right track but there
are other cases that need to be considered.

In the meantime you have a workaround.

Comment 6 Duncan Mortimer 2010-05-17 12:41:33 UTC
I notice in the latest RedHat Enterprise there is a new autofs (5.0.1-0.rc2.143) looking at the release notes it doesn't look like this issue is resolved by that release. Could you confirm this, and if so would it be possible to get a patched version of .143.

We have had two instances of segmentation faults of the patched versions, but I don't have debug output at present. I've increased the log level on the machine that suffered the problem in case it reoccurs.

Comment 7 Ian Kent 2010-05-17 13:03:40 UTC
(In reply to comment #6)
> I notice in the latest RedHat Enterprise there is a new autofs
> (5.0.1-0.rc2.143) looking at the release notes it doesn't look like this issue
> is resolved by that release. Could you confirm this, and if so would it be
> possible to get a patched version of .143.

No this isn't included in 5.5.
The current state of this bug is that it hasn't been resolved
yet and was well and truly too late for 5.5 anyway.

I have an updated patch and I can make a test build.
If we can get that tested I can request approval for inclusion
in the next release.

> 
> We have had two instances of segmentation faults of the patched versions, but I
> don't have debug output at present. I've increased the log level on the machine
> that suffered the problem in case it reoccurs.    

We will need to verify you are seeing the same problem before
we go further. We need a debug log and also a gdb backtrace,
if possible.

Comment 8 Duncan Mortimer 2010-05-17 13:38:22 UTC
How would I go about enabling a gdb backtrace?

Comment 9 Ian Kent 2010-05-18 03:38:14 UTC
(In reply to comment #8)
> How would I go about enabling a gdb backtrace?    

If you're not familiar with gdb it is probably better to
check if the updated package resolves the issue before
we go into what is needed for this.

Comment 10 Ian Kent 2010-05-18 03:41:33 UTC
Created attachment 414713 [details]
Patch - fix wildcard map entry match (updated)

Comment 11 Ian Kent 2010-05-18 03:54:51 UTC
I have added the updated wildcard patch and made a test build
against autofs revision 143.

It is located at:
http://people.redhat.com/~ikent/autofs-5.0.1-0.rc2.143.bz570783.1

Could you try this out please.

I recommend also installing the matching debuginfo package in
case we need to try to obtain a gdb backtrace from a failure.

Comment 13 RHEL Program Management 2010-08-09 18:28:25 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 20 Jian Li 2011-05-05 07:46:29 UTC
The bug is verified by autotest(https://beaker.engineering.redhat.com/jobs/81528) ,which uses distro (RHEL5.7-Server-20110504.0.n).

Comment 21 errata-xmlrpc 2011-07-21 08:43:18 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1079.html

Comment 22 errata-xmlrpc 2011-07-21 12:33:05 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1079.html


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