public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libgcj/1420: Linux GC causes premature thread wakeup
@ 2000-12-20 12:26 mdw
  0 siblings, 0 replies; only message in thread
From: mdw @ 2000-12-20 12:26 UTC (permalink / raw)
  To: java-gnats; +Cc: tromey

>Number:         1420
>Category:       libgcj
>Synopsis:       Linux GC causes premature thread wakeup
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    tromey
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:19:41 PST 2000
>Closed-Date:    Fri Sep 10 14:25:40 PDT 1999
>Last-Modified:  Fri Sep 10 14:25:40 PDT 1999
>Originator:     Matt Welsh
>Release:        2.95.1
>Organization:
>Environment:
x86 Linux, Red Hat 6.0, gcc 2.95.1
>Description:
Thread.sleep() often does not sleep often enough. It seems
this is due to the garbage collector running, which resumes
the thread prematurely when GC_start_world is called. 
Essentially bohem-gc/linux_threads.c has no knowledge of
threads which are already sleeping on some condition, so 
it is possible that this may cause other strange thread
scheduling problems as well. 

I am currently working on the fix to this problem, but am
submitting the PR so we can track it. Please let me know
before submitting any fix!
>How-To-Repeat:
Create two threads. One spins in a loop and repeatedly calls
Thread.sleep() with some large value (say 10000). The other
thread repeatedly creates new objects and forgets about them.
You will see the sleeping thread does not sleep long enough
during each iteration.
>Fix:
Modify bohem-gc/linux_threads.c to be aware of resuming
threads which were already sleeping on some condition.
>Release-Note:

>Audit-Trail:

Formerly PR libgcj/42

State-Changed-From-To: open->closed
State-Changed-By: tromey
State-Changed-When: Fri Sep 10 14:25:40 1999
State-Changed-Why:
    Matt sent a patch for this, which I checked in.
>Unformatted:



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-20 12:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:26 libgcj/1420: Linux GC causes premature thread wakeup mdw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).