Opened 9 years ago

Closed 4 years ago

#2282 closed bug (worksforme)

threaded runtime system crashes on powerpc with -N2

Reported by: malcolm.wallace@… Owned by:
Priority: normal Milestone:
Component: Runtime System Version: 6.8.2
Keywords: Cc:
Operating System: MacOS X Architecture: powerpc
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


A program using threads (in a somewhat naive way) crashes at runtime, only if it is linked against the -threaded RTS, only if it is given the runtime option +RTS -N2 -RTS, and only on powerpc. The error is:

SurfaceViewer: internal error: END_TSO_QUEUE object entered!
    (GHC version 6.8.2 for powerpc_apple_darwin)
    Please report this as a GHC bug:
Abort trap

To reproduce:

darcs get
curl -O
gunzip lobster.raw.gz
cd CaseTables
ghc-6.8.2 --make -O2 -fglasgow-exts -threaded SurfaceViewer
./SurfaceViewer ../lobster.raw 301 324 56 20 1 +RTS -N2 -RTS

If you omit the -threaded linking flag, or omit the -N2 runtime flag, then there is no crash. I could not reproduce it on x86.

The only usage of threading is in the module Gridiness, which defines a simple read/writer protocol through a Chan.

A different runtime crash is apparent if the bottom three definitions in Gridiness are swapped for the top three (currently commented out), which use a single MVar for communication rather than a Chan. In that case, the error is

SurfaceViewer: thread blocked indefinitely

The same conditions apply: must be -threaded, must have -N2, must be on powerpc.

Attachments (1)

CaseTables.tar.gz (21.3 KB) - added by malcolm.wallace@… 9 years ago.
complete sources

Download all attachments as: .zip

Change History (12)

comment:1 Changed 9 years ago by thorkilnaur

Attempting to reproduce, I run into a darcs error probably caused by:

$ wget -x
           => `'
Connecting to||:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
05:57:04 ERROR 403: Forbidden.

Best regards Thorkil

comment:2 Changed 9 years ago by simonmar

difficulty: Unknown

It might be a while before we can track down this bug, and I assume that the darcs repository will change in the future. Malcolm, could you tar up the exact source tree used to reproduce the bug and attach it to this ticket? Thanks.

Changed 9 years ago by malcolm.wallace@…

Attachment: CaseTables.tar.gz added

complete sources

comment:3 Changed 9 years ago by malcolm.wallace@…

Source code attached in a tarfile. The test data must still be downloaded separately, since it is too large to attach to the ticket.

comment:4 Changed 9 years ago by igloo

Milestone: 6.10.1

comment:5 Changed 9 years ago by thorkilnaur

I have tried several combinations of machines/OS X versions and GHC versions and consistently succeeded in running your program. But the PPC machines that I have are single-core, so this is probably naive.

I presume that you use a multi-core machine of some kind? Could you supply some additional details please? Also about the source of the GHC 6.8.2 that you use? (For example, is it some binary, from MacPorts, built from a source distribution or something else entirely?)

Thanks and best regards Thorkil

comment:6 Changed 8 years ago by igloo

Milestone: branch

comment:7 Changed 8 years ago by igloo

Milestone: 6.10 branch6.12 branch
Priority: normallow

low priority as not a tier 1 arch.

comment:8 Changed 7 years ago by igloo

Milestone: 6.12 branch6.12.3

comment:9 Changed 7 years ago by igloo

Milestone: 6.12.3_|_
Priority: lownormal
Type of failure: None/Unknown

comment:10 Changed 4 years ago by morabbin

Do we have anyone out there using GHC on multicore PPC?

comment:11 Changed 4 years ago by simonmar

Resolution: worksforme
Status: newclosed

Let's close it. If the bug actually exists and someone runs into it, we can reopen.

Note: See TracTickets for help on using tickets.