Opened 14 years ago

Last modified 4 weeks ago

#624 new task (None)

Program location for thread error messages

Reported by: chak Owned by:
Priority: normal Milestone: 8.0.1
Component: Compiler Version: None
Keywords: Cc: ezyang@…, gridaphobe
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):

Description (last modified by simonmar)

In programs with a substantial number of threads, the error messages like "indefinitely blocked" are not very helpful, because there is no indication as to which thread blocked. Having the source location of the 'fork' or so, would be much more helpful.

Change History (12)

comment:1 Changed 10 years ago by simonmar

  • Architecture set to Unknown
  • Description modified (diff)
  • difficulty set to Moderate (1 day)
  • Operating System set to Unknown

comment:2 Changed 9 years ago by igloo

  • Milestone set to 6.6.1

comment:3 Changed 9 years ago by simonmar

  • Milestone changed from 6.6.1 to _|_

comment:4 Changed 7 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:5 Changed 7 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:6 Changed 6 years ago by simonmar

  • difficulty changed from Moderate (1 day) to Moderate (less than a day)

comment:7 Changed 5 years ago by ezyang

  • Type of failure set to None/Unknown

It sounds like it would be pretty easy to add the thread identifier (indeed, you can already get that info if you compile with -debug and enable RTS tracing with +RTS -D, look for the "resurrecting thread" message). Source code identifier sounds a little bit tougher though; does GHC even let us do that without making forkIO inlined?

comment:8 Changed 5 years ago by ezyang

  • Cc ezyang@… added

comment:9 Changed 2 months ago by bgamari

It seems like the recently merged implicit-parameter-based stack-trace work (see Phab:D578) could be quite useful for this. Blocking actions could take an implicit SrcLoc which could be provided along with the error in the event of indefinite blocking.

Last edited 2 months ago by bgamari (previous) (diff)

comment:10 Changed 2 months ago by bgamari

  • Milestone changed from to 7.12.1

It seems like we have the pieces in place to address this in 7.12. Milestoning appropriately

There are a few questions that remain, however,

  • What sort of stack trace should the exception carry? At the moment we have a number of source location representations scattered about base (which will hopefully soon be cleaned up; see #10068)
  • Do we want backtraces to be enabled by default?

comment:11 Changed 2 months ago by gridaphobe

  • Cc gridaphobe added

comment:12 Changed 4 weeks ago by thoughtpolice

  • Milestone changed from 7.12.1 to 8.0.1

Milestone renamed

Note: See TracTickets for help on using tickets.