Ticket #13 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

An invalid eventlog is generated

Reported by: MikolajKonarski Owned by:
Priority: major Component: ghc-events
Version: Keywords:
Cc:

Description

See the eventlog sudoku3.eventlog.works.bz2 in #9 and the related discussion. Here's what Nicolas says:

22:09 <@zenzike> mikolaj: there is indeed something wrong with the sudoko3.eventlog.works file: there'a a running thread that goes back into the runnable state
22:18 <@zenzike> mikolaj: the thing is that its' not *that* broken
22:18 <@zenzike> mikolaj: it's just doing something that it shouldn't fairly early on
22:19 <@zenzike> mikolaj: the rest of the trace looks good ... I suspect that either there's a bug in the RTS, or I'm being too strict
22:24 <@zenzike> should a thread that is running fire off a "thread runnable" event?

Change History

Changed 3 years ago by zenzike

Here are the events that relate to thread 4, (after running ghc-events show threads sudoku3.eventlog.works):

Just 4
    5930000: cap 0: creating thread 4
    5932000: cap 0: thread 4 is runnable
    5936000: cap 0: running thread 4
    6009000: cap 0: thread 4 is runnable
    6013000: cap 0: stopping thread 4 (making a foreign call)
    6015000: cap 0: running thread 4
    6018000: cap 0: stopping thread 4 (blocked on black hole owned by thread 5)
    6022000: cap 0: thread 4 is runnable

And here are all the events from all cores leading to this (ghc-events show sudoku3.eventlog.works):

  4447000: cap 3: creating thread 1
  4447000: cap 3: thread 1 is runnable
  4931000: cap 3: running thread 1
  5046000: cap 3: stopping thread 1 (making a foreign call)
  5046000: cap 3: running thread 1
  5046000: cap 3: stopping thread 1 (making a foreign call)
  5046000: cap 3: running thread 1
  5046000: cap 3: creating thread 2
  5143000: cap 3: thread 2 is runnable
  5155000: cap 3: Thread label
  5158000: cap 3: stopping thread 1 (thread finished)
  5193000: cap 3: creating thread 3
  5193000: cap 3: thread 3 is runnable
  5430000: cap 3: running thread 2
  5430000: cap 3: stopping thread 2 (making a foreign call)
  5430000: cap 3: running thread 3
  5430000: cap 3: stopping thread 3 (thread yielding)
  5430000: cap 3: thread 3 is runnable
  5430000: cap 3: running thread 3
  5430000: cap 3: stopping thread 3 (stack overflow)
  5930000: cap 0: creating thread 4
  5932000: cap 0: thread 4 is runnable
  5936000: cap 0: running thread 4
  5936000: cap 1: creating thread 5
  5936000: cap 1: thread 5 is runnable
  5936000: cap 1: running thread 5
  5936000: cap 1: stopping thread 5 (thread yielding)
  5936000: cap 2: creating thread 6
  5936000: cap 2: thread 6 is runnable
  5936000: cap 2: running thread 6
  5936000: cap 3: running thread 3
  6009000: cap 0: thread 4 is runnable
  6009000: cap 1: thread 5 is runnable
  6013000: cap 0: stopping thread 4 (making a foreign call)
  6013000: cap 1: waking up thread 4 on cap 0
  6015000: cap 0: running thread 4
  6015000: cap 1: running thread 5

Changed 3 years ago by zenzike

  • status changed from new to closed
  • resolution set to fixed

After discussion with Duncan Coutts and Simon Marlow, we decided to remove ThreadRunnable from the validators, and to ThreadWakeup more carefully instead. This trace is therefore valid (since we ignore the "runnable" events). The changes have been pushed into ghc-events.

Note: See TracTickets for help on using tickets.