[Date Prev][Date Next]
(ITS#5605) Inappropriate SLAP_SOCK_NOT_ACTIVE assertion failing
Full_Name: Ben Schmidt
OS: MinGW32, Mac OS X
Submission from: (NULL) (22.214.171.124)
I have recently cross-compiled OpenLDAP for MinGW32 on Mac OS X. While debugging
to find and fix two crashes which I will detail in other posts, I discovered
that an assertion is always failing because it seems it is inappropriately
included when it shouldn't be. I suggest this patch.
diff -ru --exclude=Makefile openldap-2.4.10/servers/slapd/daemon.c
--- openldap-2.4.10/servers/slapd/daemon.c 2008-05-28 06:12:44.000000000 +1000
+++ openldap/servers/slapd/daemon.c 2008-06-28 21:54:38.000000000 +1000
@@ -829,7 +829,9 @@
ldap_pvt_thread_mutex_lock( &slap_daemon.sd_mutex );
assert( SLAP_SOCK_NOT_ACTIVE(s) );
if ( isactive ) slap_daemon.sd_nactives++;
If you search for where the relevant parts of the macros involved in
SLAP_SOCK_NOT_ACTIVE, and particularly the marking of active and inactive, I
believe you will find they apply only in the HAVE_EPOLL case, and thus the
assertion should only hold in that case.
I did find a closed issue in your tracker related to the same assertion failing,
but it didn't detail the fix, and was very old, so I assume was not relevant to
this particular problem.