pthread_mutex_destroy fails after successful trylock/unlock

Bug #1387848 reported by Robert Escriva
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
New
Undecided
Unassigned

Bug Description

The following sequence of calls ends up failing in step 4 with EBUSY:

1) pthread_mutex_init(&mtx, NULL);
2) pthread_mutex_trylock(&mtx);
3) pthread_mutex_unlock(&mtx);
4) pthread_mutex_destroy(&mtx);

I've attached a self-contained example that fails on 14.10 and passes on 14.04. Replacing step 2 with pthread_mutex_lock solves all externally-visible failures.

Tags: utopic
Revision history for this message
Robert Escriva (l-robert-w) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.