Ticket #6 (assigned enhancement)

Opened 3 years ago

Last modified 20 months ago

Threadscope fails to read partially written file

Reported by: pacak Owned by: maintainer
Priority: major Component: ThreadScope
Version: ThreadScope 0.2.0 Keywords:
Cc: manpacket@…


If ghc compiled program was launched with option to write eventlog and then was interrupted by Ctrl-C then eventlog file will be partially written.

Actual behaviour: Threadscope fails to read such file complaining "There was a problem loading the eventlog", "too few bytes. Failed reading at byte position 4194995"

Expecting behaviour: threadscope displays an info box saying that file was damaged and only first XXXX bytes (YYY seconds) was recovered then it should work as if this file was finalized properly.

Change History

Changed 3 years ago by MikolajKonarski

  • owner set to MikolajKonarski
  • status changed from new to accepted

That sounds reasonable and fits the far future work ideas to let ThreadScope? show the behaviour of a running program. As a first step, we might extend the eventlog validation that will appear in the next release of ghc-events to accept such partial eventlogs. Then comes your proposal, then comes continuous re-reading of logs that are being still written to.

For a short-medium term hack, we could have a flag that disables both the validation and the length check you stumbled upon. The same flag could later be used to signal to the validator that it's running on an incomplete log. Patches are welcome.

Changed 20 months ago by MikolajKonarski

  • owner changed from MikolajKonarski to maintainer
  • status changed from accepted to assigned
Note: See TracTickets for help on using tickets.