haskell / ThreadScope

A graphical tool for profiling parallel Haskell programs
http://www.haskell.org/haskellwiki/ThreadScope
Other
153 stars 36 forks source link

"there was a problem loading the eventlog" #9

Closed ghc-mirror closed 10 years ago

ghc-mirror commented 10 years ago

Original reporter: kowey

I get sporadic failures loading eventlogs from runs of my program. That is, run it once, and I will generate an eventlog that loads, run it another time, and I get one that fails to load.

The sort of errors I get look something like

null lhs: len # 3, startTime514649, endTime = 514649

There was a problem loading the eventlog

[SparkDuration {startT # 514649, deltaCSparkStats {rateCreated = 0.0,
rateDud # 0.0, rateOverflowed0.0, rateConverted # 0.0, rateFizzled0.0,
rateGCd # 0.0, meanPool0.0, maxPool # 0.0, minPool0.0}}
,SparkDuration {startT # 514649, deltaCSparkStats {rateCreated = 0.0,
rateDud # 0.0, rateOverflowed0.0, rateConverted # 0.0, rateFizzled0.0,
rateGCd # 0.0, meanPool0.0, maxPool # 0.0, minPool0.0}}
,SparkDuration {startT # 514649, deltaCSparkStats {rateCreated = 0.0,
rateDud # 0.0, rateOverflowed0.0, rateConverted # 0.0, rateFizzled0.0,
rateGCd # 0.0, meanPool0.0, maxPool # 0.0, minPool0.0}}
]

This is with TS 0.2.1, ghc-events 0.3.1.0, programs built with GHC HEAD (7.3.20111118)

Note that TS itself is built with GHC 7.2.2

ghc-mirror commented 10 years ago

Original reporter: MikolajKonarski

Thank you for the report. Are TS and ghc-events the development or the last stable versions from Hackage? If not dev, could you try them from the ~duncan's repos? Could you try validating the logs with the dev ghc-events? I will soon have a look myself, so if I answer some of these questions first, I'll report here.

ghc-mirror commented 10 years ago

Original reporter: MikolajKonarski

OK, stand by, while I'm trying to answer the questions myself.

ghc-mirror commented 10 years ago

Original reporter: MikolajKonarski

OK, I get the error in the dev TS and the broken eventlog validates OK. I will look into it.

Surprisingly, the working eventlog does not validate:

mikolaj@bratek:~/repos/threadscope$ ghc-events validate threads ~/Downloads/sudoku3.eventlog.works 
Invalid eventlog:
State:
Indexed output:
Key: 1, Value: ThreadFinal
Key: 2, Value: ThreadQueued
Key: 3, Value: ThreadRunning
Key: 4, Value: ThreadRunning
Key: 5, Value: ThreadStopped
Key: 6, Value: ThreadRunning

Input:
Event {time # 6009000, specThreadRunnable {thread = 4}}
ghc-mirror commented 10 years ago

Original reporter: MikolajKonarski

The "broken" eventlog is quite strange and I though such data is impossible. Now I've fixed it and a few similar cases that, in light of your experiment, could also happen. The fix is in commit "Tue Nov 29 22:13:14 CET 2011 Mikolaj Konarski mikolaj@well-typed.com * Accept many events starting at the same time; fix #9" or however it gets renamed when I push it.

Nicolas confirms the "work" eventlog is indeed invalid, so I've opened #13 for it.