automount segfault if get_query_dn fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
autofs5 (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Binary package hint: autofs5
# lsb_release -rd
Description: Ubuntu 10.04 LTS
Release: 10.04
# apt-cache policy autofs5
autofs5:
Installed: 5.0.4-3.1ubuntu5
Candidate: 5.0.4-3.1ubuntu5
Version table:
*** 5.0.4-3.1ubuntu5 0
500 http://
100 /var/lib/
Possibly related to https:/
After upgrading 9.04 -> 10.04, my automounts from LDAP no longer appear. Instead, I get the following in dmesg at the rate of one per second:
[ 62.189700] automount[5011]: segfault at 0 ip 00007f956cb1c022 sp 00007fff3cd1a978 error 4 in libc-2.
[ 63.301490] automount[5023]: segfault at 0 ip 00007f2de5007022 sp 00007fff33695618 error 4 in libc-2.
[ 64.328963] automount[5038]: segfault at 0 ip 00007fdc5f4b4022 sp 00007fffb09a47a8 error 4 in libc-2.
...
I guess something is trying to repeatedly respawn automount. Here's a couple of pointers for anyone trying to debug (sensitive info turned to *****):
# automount -dvf
Starting automounter version 5.0.4, master map /etc/auto.master
using kernel protocol version 5.01
lookup_
parse_init: parse(sun): init gathered global options: (null)
lookup_read_master: lookup(file): read entry +auto.master
lookup_
parse_server_
parse_server_
parse_ldap_config: lookup(ldap): ldap authentication configured with the following options:
parse_ldap_config: lookup(ldap): use_tls: 0, tls_required: 0, auth_required: 1, sasl_mech: (null)
parse_ldap_config: lookup(ldap): user: (null), secret: unspecified, client principal: (null) credential cache: (null)
find_server: trying server uri ldap://*****
do_bind: lookup(ldap): auth_required: 1, sasl_mech (null)
do_bind: lookup(ldap): ldap anonymous bind returned 0
get_query_dn: lookup(ldap): check search base list
get_query_dn: lookup(ldap): query failed for search dn ou=aufo.
Segmentation fault (core dumped)
# strace automount -f 2>&1 | tail -n20
poll([{fd=7, events=
read(7, "0\f\2\1\1a\7\n", 8) = 8
read(7, "\1\0\4\0\4\0", 6) = 6
open("/
fcntl(8, F_SETFD, FD_CLOEXEC) = 0
fstat(8, {st_mode=
mmap(NULL, 4096, PROT_READ|
read(8, "#\n# Define default options for a"..., 4096) = 3708
read(8, "", 4096) = 0
close(8) = 0
munmap(
write(7, "0\201\
poll([{fd=7, events=
read(7, "02\2\1\2e-\n", 8) = 8
read(7, "\1 \4&ou=autofs,
write(2, "get_query_dn: lookup(ldap): quer"..., 124get_query_dn: lookup(ldap): query failed for search dn ou=aufo.
write(2, "\n", 1
) = 1
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++
Ok, fixed the problem thanks to an eagle-eyed colleague. If you look at the end of the 'automount -dvf' trace above, I made a typo:
get_query_dn: lookup(ldap): query failed for search dn ou=aufo. master, ou=autofs, dc=**** *,dc=** ***,dc= com: No such object
is looking for ou=aufo.master rather than ou=auto.master (f -> t). The query correctly returns 'No such object', but then the response of automount shouldn't be a segfault.