Bug 742846

Summary: filesystems/autofs: Bug, lookup_hosts.so: undefined symbol: getnetconfig
Product: [openSUSE] openSUSE 11.4 Reporter: Richard Ems <r.ems>
Component: BasesystemAssignee: Leonardo Chiquitto <lchiquitto>
Status: RESOLVED FIXED QA Contact: E-mail List <opensuse-communityscreening>
Severity: Major    
Priority: P2 - High CC: dmueller, forgotten_sLJ7K2dvxj, lchiquitto, r.ems
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.4   
Whiteboard: maint:released:11.4:45313
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 734888, 744873    

Description Richard Ems 2012-01-23 12:37:26 UTC
After installing autofs-5.0.6-70.1.x86_64.rpm from the filesystems repository on openSUSE 11.4 and 12.1 -hosts automounts don't work anymore.
It was working on both systems with autofs-5.0.6-67.1.x86_64 .

automount starts, but /net does not show in /proc/mounts and accessing hosts in /net gives 

guille:~ # l /net/c3m
ls: cannot access /net/c3m: No such file or directory


In /var/log/messages I found

Jan 23 10:24:57 guille automount[3410]: open_lookup:90: cannot open lookup module hosts (/usr/lib64/autofs/lookup_hosts.so: undefined symbol: getnetconfig)
Jan 23 10:24:57 guille automount[3410]: mount_autofs_indirect: failed to read map for /net
Jan 23 10:24:57 guille automount[3410]: handle_mounts: mount of /net failed!
Jan 23 10:24:57 guille automount[3410]: master_do_mount: failed to startup mount


Any clues?

Thanks,
Richard
Comment 1 Leonardo Chiquitto 2012-01-23 13:55:54 UTC
Thanks for the bug report. I just committed a fix that should resolve this problem. The updated package will be available soon in the filesystems project.
Comment 2 Leonardo Chiquitto 2012-01-23 17:39:58 UTC
The package is now available in the repository. Please, could you test and report if it resolves the problem? Thanks.
Comment 3 Richard Ems 2012-01-24 10:46:41 UTC
It got better, but it still does not work.

# grep " /net " /proc/mounts 
-hosts /net autofs rw,relatime,fd=6,pgrp=20765,timeout=600,minproto=5,maxproto=5,indirect 0 0

/net appears now in /proc/mount, but apparently the hostname cannot be resolved. In /var/log/messages i found this two lines:

Jan 24 11:42:21 guille automount[20765]: lookup_mount: exports lookup failed for c3m
Jan 24 11:42:21 guille automount[20765]: key "c3m" not found in map source(s).

I will enable the "debug" option in /etc/sysconfig/autofs and post the output from /var/log/messages in the next comment.
Comment 4 Richard Ems 2012-01-24 10:50:20 UTC
The output from /var/log/messages after setting DEFAULT_LOGGING="debug" in /etc/sysconfig/autofs and restarting autofs.
Trying to access /net/c3m gives the following output.
The same has been working for years and still works with autofs-5.0.6-67.1.x86_64 .


Jan 24 11:47:20 guille automount[20919]: Starting automounter version 5.0.6, master map auto.master
Jan 24 11:47:20 guille automount[20919]: using kernel protocol version 5.02
Jan 24 11:47:20 guille automount[20919]: lookup_nss_read_master: reading master files auto.master
Jan 24 11:47:20 guille automount[20919]: parse_init: parse(sun): init gathered global options: (null)
Jan 24 11:47:21 guille dbus-daemon[1035]: **** /proc/self/mountinfo changed
Jan 24 11:47:21 guille automount[20919]: lookup_read_master: lookup(file): read entry /net
Jan 24 11:47:21 guille dbus-daemon[1035]: **** /proc/self/mountinfo changed
Jan 24 11:47:21 guille automount[20919]: lookup_read_master: lookup(file): read entry +auto.master
Jan 24 11:47:21 guille automount[20919]: lookup_nss_read_master: reading master files auto.master
Jan 24 11:47:21 guille automount[20919]: parse_init: parse(sun): init gathered global options: (null)
Jan 24 11:47:21 guille automount[20919]: lookup_nss_read_master: reading master nis auto.master
Jan 24 11:47:21 guille automount[20919]: parse_init: parse(sun): init gathered global options: (null)
Jan 24 11:47:21 guille automount[20919]: lookup(yp): read of master map auto.master failed: No such map in server's domain
Jan 24 11:47:21 guille automount[20919]: lookup(file): failed to read included master map auto.master
Jan 24 11:47:21 guille automount[20919]: master_do_mount: mounting /net
Jan 24 11:47:21 guille automount[20919]: automount_path_to_fifo: fifo name /run/autofs.fifo-net
Jan 24 11:47:21 guille automount[20919]: lookup_nss_read_map: reading map hosts (null)
Jan 24 11:47:21 guille automount[20919]: parse_init: parse(sun): init gathered global options: (null)
Jan 24 11:47:21 guille dbus-daemon[1035]: **** /proc/self/mountinfo changed
Jan 24 11:47:21 guille dbus-daemon[1035]: **** /proc/self/mountinfo changed
Jan 24 11:47:21 guille automount[20919]: mounted indirect on /net with timeout 600, freq 150 seconds
Jan 24 11:47:21 guille automount[20919]: st_ready: st_ready(): state = 0 path /net
Jan 24 11:47:21 guille automount[20919]: ghosting enabled
Jan 24 11:47:21 guille dbus-daemon[1035]: **** /proc/self/mountinfo changed
Jan 24 11:47:25 guille automount[20919]: handle_packet: type = 3
Jan 24 11:47:25 guille automount[20919]: handle_packet_missing_indirect: token 3, name c3m, request pid 20927
Jan 24 11:47:25 guille automount[20919]: attempting to mount entry /net/c3m
Jan 24 11:47:25 guille automount[20919]: lookup(hosts): can't find path in hosts map /net/c3m
Jan 24 11:47:25 guille automount[20919]: lookup_mount: lookup(hosts): lookup failed - update exports list
Jan 24 11:47:25 guille automount[20919]: lookup_mount: lookup(hosts): fetchng export list for c3m
Jan 24 11:47:25 guille automount[20919]: lookup_mount: exports lookup failed for c3m
Jan 24 11:47:25 guille automount[20919]: key "c3m" not found in map source(s).
Jan 24 11:47:25 guille automount[20919]: dev_ioctl_send_fail: token = 3
Jan 24 11:47:25 guille automount[20919]: failed to mount /net/c3m
Comment 5 Leonardo Chiquitto 2012-01-24 20:36:53 UTC
Indeed, I can reproduce the issue here.

The problem seems to be caused by the linker option "--as-needed". It insists in marking libtirpc as not needed in the automount binary. I'm just guessing here, but maybe this is because glibc provides the same symbols as libtirpc, so the latter always appears as not used.

As we're compiling with --with-libtirpc, all the headers are taken from libtirpc. IIUC, in the end, we're using libtirpc's headers and glibc's functions. If I disable "--as-needed", everything works as expected and the link against libtirpc is kept in the automount binary.

Dirk, do you know if it's possible to fix the build and keep "--as-needed" in cases like this or should I just keep it disabled?

Richard, I've disabled "--as-needed" temporarily in the filesystems repository, just to bring it back to a working state. The fixed package should appear there in the next couple of hours.
Comment 6 Richard Ems 2012-01-25 16:33:35 UTC
autofs-5.0.6-73.1.x86_64 is working now fine on 11.4 and 12.1 .

Thanks, autofs is working again for me now.

Is this the info you were waiting for?
Shall I close the bug as RESOLVED?
Comment 7 Leonardo Chiquitto 2012-01-25 18:19:23 UTC
Thanks for testing, Richard.

I'll keep the bug open until I have time to investigate the "--as-needed" issue further.
Comment 8 Bernhard Wiedemann 2012-02-02 14:00:17 UTC
This is an autogenerated message for OBS integration:
This bug (742846) was mentioned in
https://build.opensuse.org/request/show/102478 Factory / autofs
Comment 9 Bernhard Wiedemann 2012-02-06 16:00:49 UTC
This is an autogenerated message for OBS integration:
This bug (742846) was mentioned in
https://build.opensuse.org/request/show/102921 11.4 / autofs
Comment 10 Swamp Workflow Management 2012-02-09 16:36:47 UTC
Update released for: autofs, autofs-debuginfo, autofs-debugsource
Products:
openSUSE 11.4 (debug, i586, x86_64)
Comment 11 Leonardo Chiquitto 2012-02-09 16:49:16 UTC
The fix for this problem is now released in the updates repository (autofs-5.0.5-14.21.1).
Comment 12 Bernhard Wiedemann 2012-02-09 21:00:31 UTC
This is an autogenerated message for OBS integration:
This bug (742846) was mentioned in
https://build.opensuse.org/request/show/103668 12.1 / autofs