From: Dirk Morris <dmorris@metavize.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [2.6.2] Badness in futex_wait revisited
Date: Wed, 31 Mar 2004 10:59:46 -0800 [thread overview]
Message-ID: <406B1522.9050204@metavize.com> (raw)
In-Reply-To: <20040331183243.GA20418@mail.shareable.org>
Jamie Lokier wrote:
>If you have a small test program (or pair of programs) that
>consistently triggers this message on any machine running 2.6.4, that
>would be very helpful indeed.
>
>
Here ya go. :)
* $Id: foo.c,v 1.00 2004/03/31 10:51:19 dmorris Exp $ */
/* gcc foo.c -o foo -pthread */
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
sem_t sem;
void* make_system_call (void* arg)
{
while(1) {
sleep(1);
system("/bin/true");
}
return NULL;
}
int main(void)
{
pthread_t id;
sem_init(&sem,0,0);
pthread_create(&id,NULL,make_system_call,NULL);
while (sem_wait(&sem)<0)
perror("sem_wait");
return 0;
}
Output for me is :
~ # uname
-a
[dmorris @ gobbles]
Linux gobbles 2.6.4 #2 SMP Mon Mar 29 17:15:08 PST 2004 i686 GNU/Linux
~ #
./foo
[dmorris @ gobbles]
sem_wait: Interrupted system call
sem_wait: Interrupted system call
sem_wait: Interrupted system call
sem_wait: Interrupted system call
...
meanwhile kern.log spits out:
Mar 30 16:40:23 gobbles kernel: Badness in futex_wait at kernel/futex.c:508
Mar 30 16:40:23 gobbles kernel: Call Trace:
Mar 30 16:40:23 gobbles kernel: [<c0139a28>] futex_wait+0x1a8/0x1c0
Mar 30 16:40:23 gobbles kernel: [<c011efc0>] default_wake_function+0x0/0x20
Mar 30 16:40:23 gobbles kernel: [<c011efc0>] default_wake_function+0x0/0x20
Mar 30 16:40:23 gobbles kernel: [<c012d020>] do_timer+0xc0/0xd0
Mar 30 16:40:23 gobbles kernel: [<c0139d30>] do_futex+0x70/0x80
Mar 30 16:40:23 gobbles kernel: [<c0139e64>] sys_futex+0x124/0x140
Mar 30 16:40:23 gobbles kernel: [<c015ef11>] sys_write+0x61/0x70
Mar 30 16:40:23 gobbles kernel: [<c01095db>] syscall_call+0x7/0xb
Mar 30 16:40:23 gobbles kernel:
I can do this on multiple machines, so I won't include all the box info.
If you need it let me know.
Thanks! :)
-Dirk
next prev parent reply other threads:[~2004-03-31 19:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <40311703.8070309@metavize.com>
2004-02-17 4:39 ` [2.6.2] Badness in futex_wait revisited Rusty Russell
2004-02-17 5:27 ` Andrew Morton
2004-02-18 4:14 ` Rusty Russell
2004-02-17 19:55 ` Dirk Morris
2004-03-31 16:56 ` Jamie Lokier
2004-03-31 17:38 ` Dirk Morris
2004-03-31 18:32 ` Jamie Lokier
2004-03-31 18:59 ` Dirk Morris [this message]
2004-04-01 2:16 ` Rusty Russell
2004-04-01 8:34 ` Andrew Morton
2004-04-01 9:24 ` Andrew Morton
2004-04-01 1:57 ` Rusty Russell
2004-02-13 21:13 Dirk Morris
2004-02-16 11:42 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=406B1522.9050204@metavize.com \
--to=dmorris@metavize.com \
--cc=akpm@osdl.org \
--cc=jamie@shareable.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.