Ticket #4811 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Internal error: throwTo: unrecognised why_blocked value

Reported by: mitar Owned by:
Priority: high Milestone: 7.0.2
Component: Runtime System Version: 7.1
Keywords: Cc: mmitar@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime crash Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I am getting this error:

internal error: throwTo: unrecognised why_blocked value
    (GHC version 7.1.20101124 for x86_64_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Sadly I was unable to make a simple test case. It is a program build upon  Etage with heavy FFI (X11, webcam capture,  NXT interface) and threading.

Problem is reproducible. It does not happen always, but in let's say 10 % of program runs. Program is compiled with -threaded -O2 and it happens only if I pass +RTS -N2 (or bigger -N) parameter. With only -N1 it seems it does not happen.

If somebody wants I can send him/her whole program. You do not need a webcam or NXT as this happens when there is nothing connected to the computer and program prematurely exists because of this.

Or you can guide me what and how should I debug.

Attachments

Main.hs Download (2.0 KB) - added by mitar 2 years ago.

Change History

Changed 2 years ago by simonmar

Please send me the program. If possible reduce it as much as possible, and remove external dependencies if you can.

Changed 2 years ago by mitar

OK. It took me half of a day but I managed to reduce this. I managed to remove all special dependencies and I use only  Etage now.

It seems the problem is connected with that I fork two threads which I force to be on the same OS thread (with forkOnIO) and then run with -N2 parameter. I am attaching a program.

I tested it on Mac OS X too and the same thing happens.

Changed 2 years ago by mitar

Changed 2 years ago by simonmar

  • status changed from new to merge
  • component changed from Compiler to Runtime System
  • priority changed from normal to high
  • failure changed from None/Unknown to Runtime crash
  • architecture changed from x86_64 (amd64) to Unknown/Multiple
  • milestone set to 7.0.2
  • os changed from Linux to Unknown/Multiple

Fixed. Many thanks for reducing the example, that was immensely helpful in tracking down the bug.

Fri Dec  3 09:48:18 GMT 2010  Simon Marlow <marlowsd@gmail.com>
  * handle ThreadMigrating in throwTo() (#4811)
  If a throwTo targets a thread that has just been created with
  forkOnIO, then it is possible the exception strikes while the thread
  is still in the process of migrating.  throwTo() didn't handle this
  case, but it's fairly straightforward.

Changed 2 years ago by igloo

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

Merged

Note: See TracTickets for help on using tickets.