Bug 443933 - automount segfaults upon start
Summary: automount segfaults upon start
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: autofs
Version: 5.1
Hardware: i386
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-24 08:09 UTC by Uli Menzebach
Modified: 2009-01-20 21:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:45:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to handle zero length key returned from NIS (1.09 KB, patch)
2008-04-24 09:08 UTC, Ian Kent
no flags Details | Diff
Patch to handle zero length key returned from NIS (722 bytes, patch)
2008-04-24 10:39 UTC, Ian Kent
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0178 0 normal SHIPPED_LIVE autofs bug fix update 2009-01-20 16:05:44 UTC

Description Uli Menzebach 2008-04-24 08:09:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14

Description of problem:
The automount daemon segfaults directly after being started. The happens, when the auto.master NIS map has an empty line at the end, otherwise not.

I recompiled manually from the RPM source with all the accompanying patches included and debugging support. Same behaviour. Backtrace is attached below, looks like a strcmp segfaulting.

The Redhat Enterprise 4 (the rest of our boxes) automount daemon does not show this behaviour.



Version-Release number of selected component (if applicable):
autofs-5.0.1-0.rc2.55.el5.3

How reproducible:
Always


Steps to Reproduce:
1.Add an empty line to the auto.master NIS map
2.make sure core files are enabled
3."service autofs start" or /usr/sbin/automount by hand

Actual Results:
This will not leave a running automount daemon behind and a core file is created.
Thus: automounting does not work. 

Expected Results:
- automounting should work.
- ps ax|grep automount should have shown a running automount process, and there should have been no core file.


Additional info:
Core file analysis:

(gdb) backtrace
#0  0x002c8a4a in strcmp () from /lib/libc.so.6
#1  0x00e6e4da in master_find_mapent (master=0x845a008, path=0x0) at master.c:624
#2  0x00e74569 in master_parse_entry (buffer=0xbfbbade0 " ", default_timeout=300, logging=0,
    age=1209026459) at master_parse.y:747
#3  0x00b12fa5 in yp_all_master_callback (status=1, ypkey=0xbfbbae60 "", ypkeylen=0,
    val=0xbfbbae50 "", vallen=0, ypcb_data=0xbfbbaff4 ",\001") at lookup_yp.c:194
#4  0x003ed52b in __xdr_ypresp_all () from /lib/libnsl.so.1
#5  0x0034dc07 in clnttcp_call () from /lib/libc.so.6
#6  0x003ed7d2 in yp_all () from /lib/libnsl.so.1
#7  0x00b11e6e in lookup_read_master (master=0x845a008, age=1209026459, context=0x8463ff0)
    at lookup_yp.c:220
#8  0x00e5de5c in do_read_master (master=0x845a008, type=0x8464008 "nis", age=1209026459)
    at lookup.c:97
#9  0x00e5debe in read_master_map (master=0x845a008, type=0x8464008 "nis", age=1209026459)
    at lookup.c:110
#10 0x00e5e45f in lookup_nss_read_master (master=0x845a008, age=1209026459) at lookup.c:226
#11 0x0011ebac in lookup_read_master (master=0x845a008, age=1209026459, context=0x845f2c0)
    at lookup_file.c:470
#12 0x00e5de5c in do_read_master (master=0x845a008, type=0x845e810 "files", age=1209026459)
    at lookup.c:97
#13 0x00e5dfbe in read_master_map (master=0x845a008, type=0x845e810 "files", age=1209026459)
    at lookup.c:135
#14 0x00e5e45f in lookup_nss_read_master (master=0x845a008, age=1209026459) at lookup.c:226
#15 0x00e6f03e in master_read_master (master=0x845a008, age=1209026459, readall=0) at master.c:793
#16 0x00e53f02 in main (argc=0, argv=0xbfbbc658) at automount.c:1650
(gdb)

Comment 1 Ian Kent 2008-04-24 09:06:45 UTC
(In reply to comment #0)
> Description of problem:
> The automount daemon segfaults directly after being started. The happens, when
the auto.master NIS map has an empty line at the end, otherwise not.

Indeed your correct.
That is exactly what's happening.
This has been reported upstream but the fix was too late for
RHEL-5.2.

Excellent bug report btw.
Thanks for the effort.
Ian 

Comment 2 Ian Kent 2008-04-24 09:08:07 UTC
Created attachment 303602 [details]
Patch to handle zero length key returned from NIS

Comment 3 Ian Kent 2008-04-24 10:39:47 UTC
Created attachment 303610 [details]
Patch to handle zero length key returned from NIS

Oops, the changlog entry won't apply.

Comment 4 RHEL Program Management 2008-06-02 20:04:23 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 9 errata-xmlrpc 2009-01-20 21:45:42 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-2009-0178.html


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