Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,866
    • Issues 4,866
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #17785
Closed
Open
Created Feb 03, 2020 by harendra@harendra

Random crash with memory corruption symptoms

Summary

While running a test-suite for the streaming library streamly I am encountering a crash which shows up at different places at different times. The common messages are:

  • Segmentation fault: 11
  • internal error: scavenge_mark_stack: unimplemented/strange closure type 24792696 @ 0x4200a623e0
  • internal error: update_fwd: unknown/strange object 223743520

and several other such messages.

Steps to reproduce

The current reproducer code is at https://github.com/composewell/streamly on the ghc-segfault branch. Use $ while true; do cabal run properties || break; done in the shell and wait for the crash. The test code is in test/Prop.hs - here https://github.com/composewell/streamly/blob/ghc-segfault/test/Prop.hs .

This issue only shows when the following conditions are met:

  • hspec "parallel" combinator is used to run tests in parallel
  • streamly concurrent code is being tested which can create many threads
  • The GHC heap size is restricted to a small size ~32MB using "-M32M" rts option. It never occurs when the heap size is not restricted.

I am trying to simplify the reproducing code further to remove other factors as much as possible.

Expected behavior

It should keep running without a crash.

Environment

  • GHC Version: It is consistently seen with GHC 8.6.5 as well as GHC 8.8.2
  • Operating System: Mac OSX
  • System Architecture: x86-64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking