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,262
    • Issues 4,262
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 419
    • Merge Requests 419
  • 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
  • #7185

Closed
Open
Opened Aug 24, 2012 by waldheinz@trac-waldheinz

Compiled program crashes

I have a program which compiles fine, but the resulting executable crashes. First the steps to reproduce:

git clone git@github.com:waldheinz/bling.git
git checkout e2bad3ca6be2409386d28796997709318cf6ff64
cabal configure
cabal build
./dist/build/bling/bling examples/cornell-box-underwater.bling

This will result in either a segfault or produce an "internal error" message, at least for me and two other who tried it as well. The error message is

bling: internal error: scavenge_one: strange object -1083673327
    (GHC version 7.7.20120823 for x86_64_unknown_linux)

The "strange object" varies. Some random observations which might be useful:

  • this happens with GHC 7.4.1 and a fresh compile of HEAD (GHC version 7.7.20120823)
  • I sanitized the code to be completely free of unsafe* function calls. Before, there was quite some unsafe array reading/writing using the vector package. This did not change anything, but the revision above reflects this "safe" state, just in case...
  • the problem first occured when I change the SPPM.mkHash function to use the Utils.GrowVec type instead of lists for it's intermediate results. [1] GrowVec is basically a wrapper around a vector which doubles the size when space is exhausted.
  • the optimization level does not seem to affect the problem (it occurs even with -O0 and everything else removed)

Running under GDB gives this stack trace:

#1  0x00000031d12370d8 in abort () from /lib64/libc.so.6
#2  0x0000000000cb4765 in rtsFatalInternalErrorFn ()
#3  0x0000000000cb48dd in barf ()
#4  0x0000000000cd30e9 in scavenge_one ()
#5  0x0000000000cd3645 in scavenge_mutable_list ()
#6  0x0000000000cd3835 in scavenge_capability_mut_lists ()
#7  0x0000000000cb98bc in GarbageCollect ()
#8  0x0000000000cac043 in scheduleDoGC.isra.20 ()
#9  0x0000000000cacabf in scheduleWaitThread ()
#10 0x0000000000cb683e in real_main ()
#11 0x0000000000cb693a in hs_main ()
#12 0x0000000000407003 in main ()

I'm currently trying to debug this further, but my abilities on this front are limited...

[1] https://github.com/waldheinz/bling/commit/e1dc7b3c7e66cdd21a5aa46f9f96ca9448c52407\#commitcomment-1761893

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