abort() calls from messaging code

Jeremy Allison jra at samba.org
Wed Jun 14 00:09:36 UTC 2017


On Tue, Jun 13, 2017 at 05:03:36PM +1200, Andrew Bartlett via samba-technical wrote:
> (resend from samba.org address subscribed to the list)
> 
> I'm seeing odd failures in the messaging code while attempting builds
> on my new locking code for ldb.  It seems as I reduce the other
> flapping tests, we perturb the state and start to see different parts
> of samba misbehave. 
> 
> I've saved away the tree as
> git://git.catalyst.net.nz repo-messaging-pthread-abort
> 6fdcf40c47ccaa51e71a914e4a1f3a59ec63ba9b
> 
> 
> In once backtrace (attached), I see this abort fire:
> 
> 
> static int tevent_threaded_context_destructor(
> 	struct tevent_threaded_context *tctx)
> {
> 	int ret;
> 
> 	if (tctx->event_ctx != NULL) {
> 		DLIST_REMOVE(tctx->event_ctx->threaded_contexts, tctx);
> 	}
> 
> 	ret = pthread_mutex_destroy(&tctx->event_ctx_mutex);
> 	if (ret != 0) {
> 		abort();
> 	}
> 
> 	return 0;
> }
> 
> Do you have any clues as to why this pthread mutex would fail to
> destroy?

Can you get the value of 'ret' printed somewhere ? That might
give a clue (but it's probably memory corruption :-).



More information about the samba-technical mailing list