This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/22298] New: x32: lockups on recursive pthread_mutex_lock after upgrade to 2.26
- From: "arekm at maven dot pl" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sun, 15 Oct 2017 13:24:15 +0000
- Subject: [Bug nptl/22298] New: x32: lockups on recursive pthread_mutex_lock after upgrade to 2.26
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22298
Bug ID: 22298
Summary: x32: lockups on recursive pthread_mutex_lock after
upgrade to 2.26
Product: glibc
Version: 2.26
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: nptl
Assignee: unassigned at sourceware dot org
Reporter: arekm at maven dot pl
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Program:
#define _GNU_SOURCE 1
#include <stdio.h>
#include <pthread.h>
int main() {
static pthread_mutex_t rpmsigTbl_lock =
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
printf("LOCK1\n");
pthread_mutex_lock(&rpmsigTbl_lock);
printf("LOCK2\n");
pthread_mutex_lock(&rpmsigTbl_lock);
printf("LOCK3\n");
}
locks when built on Linux x32 glibc 2.25 but run on glibc 2.26
(and vice versa, locks when built on glibc 2.26 but run on 2.25)
$ ./a.out
LOCK1
LOCK2
It was built with "gcc -fopenmp test.c" and -fopenmp seems to be a important
factor. If not using -fopenmp then the problem is gone.
The problem doesn't happen on i686 and x86_64.
From libc-alpha, Andreas Schwab:
"The problem is that sysdeps/nptl/bits/thread-shared-types.h in 2.26 uses
#if __WORDSIZE == 64 where sysdeps/x86/bits/pthreadtypes.h in 2.25 uses
#ifdef __x86_64__. This isn't the same on x32."
--
You are receiving this mail because:
You are on the CC list for the bug.