autofs start fails: segfault at 0 ip 00007f738cb881bb sp 00007ffeff888f70 error 4 in[7f738cb76000+2b000]

Bug #1472115 reported by Stefan Bader on 2015-07-07
This bug affects 2 people
Affects Status Importance Assigned to Milestone
autofs (Ubuntu)

Bug Description

Wily server 64bit installation, after dist-upgrade, restart of autofs.service fails and dmesg shows those errors:

[ 1030.673473] automount[3276]: segfault at 0 ip 00007f738cb881bb sp 00007ffeff888f70 error 4 in[7f738cb76000+2b000]

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: autofs 5.1.1-1ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-22.22-generic 3.19.8-ckt1
Uname: Linux 3.19.0-22-generic x86_64
ApportVersion: 2.17.3-0ubuntu4
Architecture: amd64
Date: Tue Jul 7 07:11:13 2015
SourcePackage: autofs
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Stefan Bader (smb) wrote :
Stefan Bader (smb) wrote :

Segfault persists after reboot into latest kernel: Ubuntu 4.0.0-4.6-generic 4.0.7.

Stefan Bader (smb) wrote :

master_map_name = /etc/auto.master


/import file:/etc/auto.import

isos -ro,soft,intr,nfsvers=3 nano:/srv/images/iso
cloud-images -ro,soft,intr,nfsvers=3 nano:/srv/images/cloudimg
tests -rw,soft,intr,nfsvers=3 nano:/home/tests

The /import directory exists.

Stefan Bader (smb) wrote :

#0 0x00007fab78969e10 in conf_lookup_key ()
   from /usr/lib/x86_64-linux-gnu/autofs/
#1 0x00007fab78969ece in conf_lookup ()
   from /usr/lib/x86_64-linux-gnu/autofs/
#2 0x00007fab7896b246 in conf_get_yesno ()
   from /usr/lib/x86_64-linux-gnu/autofs/
#3 0x00007fab7896bc95 in defaults_get_browse_mode ()
   from /usr/lib/x86_64-linux-gnu/autofs/
#4 0x00007fab78963660 in local_init_vars ()
   from /usr/lib/x86_64-linux-gnu/autofs/
#5 0x00007fab78963a43 in master_parse_entry ()
   from /usr/lib/x86_64-linux-gnu/autofs/
#6 0x00007fab7895b7b5 in lookup_read_master ()
   from /usr/lib/x86_64-linux-gnu/autofs/
#7 0x00007fab7bfb6371 in do_read_master ()
#8 0x00007fab7bfb6861 in lookup_nss_read_master ()
#9 0x00007fab780afa63 in include_file ()
   from /usr/lib/x86_64-linux-gnu/autofs/
#10 0x00007fab780afc92 in lookup_read_master ()
   from /usr/lib/x86_64-linux-gnu/autofs/
#11 0x00007fab7bfb6371 in do_read_master ()
#12 0x00007fab7bfb6b99 in lookup_nss_read_master ()
#13 0x00007fab7895b61e in lookup_read_master ()
   from /usr/lib/x86_64-linux-gnu/autofs/
#14 0x00007fab7bfb6371 in do_read_master ()
#15 0x00007fab7bfb6861 in lookup_nss_read_master ()
#16 0x00007fab7bfcf797 in master_read_master ()
#17 0x00007fab7bfaa579 in main ()

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in autofs (Ubuntu):
status: New → Confirmed
Stefan Bader (smb) wrote :

Seems that defaults_read_config(), defaults_get_searchdns() or at least conf_init() needs to be called before trying conf_get_yesno() in defaults_get_browse_mode(). Otherwise the config pointer is still NULL when accessing the hash table indirectly.

Stefan Bader (smb) wrote :

Its not only that call site. I get the feeling that the daemon does not inherit the dynamically allocated structures across fork(). At least it does do a defaults_read_config() before the fork which does not seem to survive.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autofs - 5.1.1-1ubuntu2

autofs (5.1.1-1ubuntu2) wily; urgency=low

  * Add LDFLAGS to avoid issues with accessing global variables in
    shared libraries (LP: #1470687, LP: #1472115).

 -- Stefan Bader <email address hidden> Tue, 07 Jul 2015 16:28:53 +0200

Changed in autofs (Ubuntu):
status: Confirmed → Fix Released
Robie Basak (racb) wrote :

Did this patch get sent upstream? We're still having to maintain the Ubuntu delta here.

Stefan Bader (smb) wrote :

Robie, you really believe I will be able to answer what I did 2 years ago? Most likely answer is no.

Stefan Bader (smb) wrote :

Refreshing memory, this was to filter out --symbolic-functions from LDFLAGS, and that might be a compiler bug which may or may not have been fixed.

Stefan Bader (smb) wrote :

FWIW I looked at the current zesty version where it seems possible to drop the filter but still need the explicit set of LDFLAGS, so

        CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
        LDFLAGS="$(dpkg-buildflags --get LDFLAGS)" \

appears to be working. Could that be a difference in the way Ubuntu automatically exports flags (or not)?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers