Bug 29328 - [gdb/tui] SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
Summary: [gdb/tui] SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wron...
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: testsuite (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 13.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-07 16:05 UTC by Tom de Vries
Modified: 2022-07-12 11:53 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2022-07-07 16:05:47 UTC
When building gdb using thread sanitizer and running the gdb test-suite, I run into a fair amount of these:
...
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (/usr/lib64/libtsan.so.2+0x47361) in pthread_mutex_unlock
...

AFAICT, this is a problem in ncurses.  I've sent an email to bug-ncurses@gnu.org , I'll post a link once it's published in the archives.
Comment 1 Tom de Vries 2022-07-07 18:08:57 UTC
(In reply to Tom de Vries from comment #0)
> AFAICT, this is a problem in ncurses.  I've sent an email to
> bug-ncurses@gnu.org , I'll post a link once it's published in the archives.

https://lists.gnu.org/archive/html/bug-ncurses/2022-07/msg00002.html
Comment 2 Tom de Vries 2022-07-11 10:09:33 UTC
Patch to add suppression in new tsan-suppressions.txt file: https://sourceware.org/pipermail/gdb-patches/2022-July/190619.html
Comment 3 Tom de Vries 2022-07-12 11:52:41 UTC
Not a gdb problem, reclassifying as testsuite problem.