Public bug reported:

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.

** Affects: glibc (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: utopic

** Attachment added: "Self-contained example that fails"
   https://bugs.launchpad.net/bugs/1387848/+attachment/4249412/+files/bad.c

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1387848

Title:
  pthread_mutex_destroy fails after successful trylock/unlock

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1387848/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to