Opened 16 years ago

Last modified 21 months ago

#624 new task (None)

Program location for thread error messages

Reported by: chak Owned by:
Priority: normal Milestone:
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):
Wiki Page:

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 (13)

comment:1 Changed 12 years ago by simonmar

Architecture: Unknown
Description: modified (diff)
difficulty: Moderate (1 day)
Operating System: Unknown

comment:2 Changed 11 years ago by igloo

Milestone: 6.6.1

comment:3 Changed 11 years ago by simonmar

Milestone: 6.6.1_|_

comment:4 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:5 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:6 Changed 8 years ago by simonmar

difficulty: Moderate (1 day)Moderate (less than a day)

comment:7 Changed 7 years ago by ezyang

Type of failure: 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 7 years ago by ezyang

Cc: ezyang@… added

comment:9 Changed 2 years 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 years ago by bgamari (previous) (diff)

comment:10 Changed 2 years ago by bgamari

Milestone: 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 years ago by gridaphobe

Cc: gridaphobe added

comment:12 Changed 2 years ago by thoughtpolice


Milestone renamed

comment:13 Changed 21 months ago by thomie

Milestone: 8.0.1
Note: See TracTickets for help on using tickets.