Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,326
    • Issues 4,326
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 390
    • Merge Requests 390
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #2282

Closed
Open
Opened May 13, 2008 by malcolm wallace@trac-malcolm.wallace

threaded runtime system crashes on powerpc with -N2

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:  http://www.haskell.org/ghc/reportabug
Abort trap

To reproduce:

darcs get http://www.cs.york.ac.uk/fp/darcs/CaseTables
curl -O http://www.gris.uni-tuebingen.de/edu/areas/scivis/volren/datasets/data/lobster.raw.gz
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.

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#2282