This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/15988] New: tst-mutexpi8 test case failure on non-x86 systems
- From: "siddhesh at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 01 Oct 2013 09:24:35 +0000
- Subject: [Bug nptl/15988] New: tst-mutexpi8 test case failure on non-x86 systems
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=15988
Bug ID: 15988
Summary: tst-mutexpi8 test case failure on non-x86 systems
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: nptl
Assignee: siddhesh at redhat dot com
Reporter: siddhesh at redhat dot com
CC: drepper.fsp at gmail dot com
tst-mutexpi8 test case fails on non-x86 boxes (tested s390 and got a similar
report for ppc) for recursive mutexes. Here's a reproducer that produces the
same failure.
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
pthread_mutex_t mutex;
pthread_mutexattr_t attr;
pthread_cond_t cond;
pthread_t tid;
void *callback(void *arg){
for (;;){
sleep(2);
pthread_mutex_lock(&mutex);
printf("Wake up!\n");
pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&mutex);
}
}
int main(){
pthread_mutexattr_init(&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
pthread_mutex_init(&mutex, &attr);
pthread_cond_init(&cond, NULL);
pthread_mutex_lock(&mutex);
pthread_create(&tid, NULL, callback, &cond);
printf("Going to sleep\n");
for(;;){
pthread_cond_wait(&cond, &mutex);
printf("OK\n");
exit(0);
}
}
Actual results:
Going to sleep
Wake up!
Wake up!
Wake up!
Wake up!
Wake up!
Wake up!
Wake up!
Wake up!
Wake up!
Wake up!
Wake up!
Wake up!
...
Expected Result:
Going to sleep
Wake up!
OK
Patch coming soon.
--
You are receiving this mail because:
You are on the CC list for the bug.