[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4168) autofs with ldap triggers segfault in kernel

On Fri, 2005-11-11 at 11:37 +0000, Guillaume.Rousse@inria.fr wrote:
> Pierangelo Masarati wrote:
> > On Thu, 2005-11-10 at 19:12 +0000, Guillaume.Rousse@inria.fr wrote:

> Program received signal SIGSEGV, Segmentation fault.
> [Switching to process 14590]
> 0x00002aaaab02e978 in ldap_set_option () from /usr/lib64/libldap-2.3.so.0
> (gdb) bt
> #0  0x00002aaaab02e978 in ldap_set_option () from 
> /usr/lib64/libldap-2.3.so.0
> #1  0x00002aaaaaf00ba8 in do_connect (ctxt=0x555555665740,
>      result_ldap=0x7fffffb51814) at lookup_ldap.c:66
> #2  0x00002aaaaaf00e70 in lookup_init (mapfmt=0x2aaaaaf03920 "sun", argc=1,
>      argv=0x7fffffb51a18, context=Variable "context" is not available.
> ) at lookup_ldap.c:180
> #3  0x000055555555aac9 in open_lookup (name=0x7fffffb52a0f "ldap",
>      err_prefix=0x55555555c4dd "", mapfmt=0x0, argc=1, argv=0x7fffffb51a18)
>      at module.c:83
> #4  0x0000555555559da3 in main (argc=Variable "argc" is not available.
> ) at automount.c:1762
> I can't have a better stack trace from inside libldap, even if I am sure 
>   it has not been stripped.

Some debugging symbols, at least the line number would have been of
help; anyway, this is more and more convincing of my suspicion about
some 64 bit issue (I haven't noticed yet on my amd64, though) because
ldap_{sg}et_option() do a lot of pointer-to-anytype conversion with
explicit casts, and this is a typical good chance for type mismatch
because the cast inhibits compiler warnings.

Can you try your best to get line numbers out of there?  I've downloaded
autofs 4.1.3 sources (is it the version you're using?) and the only
calls to ldap_set_option() is to set the protocol version; in my copy of
the file it occurs at line 58 rather than 66.  The datum is an int, so
that call should be fine.  A LDAP * resulting from a call to ldap_init()
is passed after checking it's not NULL.

After defining -DLDAP_DEPRECATED, the only warning I get is about an
automatic var that could be used uninitialized, in lookup_wild(); this
should have nothing to do with your issue (I'll post a note to the

Please feedback.


Ing. Pierangelo Masarati
Responsabile Open Solution

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it