Full_Name: Yann Carre
Version: 2.4.26
OS: red hat 5 (64 bits)
URL:
ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (64.208.49.20)
I work on a specific Backend
I have provided in my back end a function to the bi_connection_init
pointer.
This function adds a context needed in the operation backend function
(search,
...)
When several connections start up, my LDAP server crashes.
The crash arrives because the context is not created before the call to
do_searh.
The connection is provided to the application Backend before my Back end
connection_init.
I have checked it with the debugger and see that the thread with
initialize the
connection is suspend before the backend connection_init. In another
thread, the
search function is executed without any context attached to the
connection.
This problem seems to be bring because the connection mutex is freed
before the
calling of the Back end connection_init in the function connection_init
(connection.c).
I have moved this mutex after the backend connection_init and it seems to
work.
Would you confirm this analysis and take the correction in account?
Honestly, if that context you mention is connection-specific, I don't see
how this could happen, since operations on that connection should not be
possible until connection_init() returns.
OTOH, if the context is global, you should initialize it differently, and
protect it from being used before its initialization is complete, e.g. by
a specific mutex that is completely internal to your backend.
In any case, it is not clear how this can be an OpenLDAP bug. You should
provide a clearer evidence. In the absence, I'd consider this ITS closed.
p.