Bug 570278
Summary: | __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miguel Diaz <tiomiguel> | ||||
Component: | glibc | Assignee: | Andreas Schwab <schwab> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 11 | CC: | jakub, schwab | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2010-03-04 10:55:29 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Miguel Diaz
2010-03-03 18:42:36 UTC
The program has undefined behaviour. Use PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP. Can you please explain why it has undefined behaviour? is it ok to use PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP in production code? The code locks the mutex once and then unlocks it twice in some code paths, you can't unlock an unlocked mutex. It is ok to use error checking mutexes in production code, just it will be slower than the normal ones. With error checking mutexes the second pthread_mutex_unlock will just fail with EPERM. Much better if you just fix the bug. Thanks a lot Jakub! Production code is totally different but incurs in the same issue. I think I'm gonna put some wrapper calls around pthread_mutex_lock and pthread_mutex_unlock so I can trace better any path with their return values. Regards! |