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,394
    • Issues 4,394
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 373
    • Merge Requests 373
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #16147

Closed
Open
Opened Jan 08, 2019 by rvl@trac-rvl

ghc-pkg deadlocks on macOS

If I run this script on macOS, after about 15 minutes, a ghc-pkg process will deadlock.

#!/usr/bin/env bash

out=`pwd`/testing-package-db

rm -rf $out

cabal update
cabal install random

mkdir -p $out
ghc-pkg init $out/package.conf.d

while true; do
    ghc-pkg --package-db $HOME/.ghc/x86_64-darwin-8.6.3/package.conf.d dump | ghc-pkg --force --package-db $out/package.conf.d register -
done

Output from sw_vers:

ProductName:    Mac OS X
ProductVersion: 10.12.6
BuildVersion:   16G29

This GHC build comes from the latest nixpkgs-18.09. I have also attached a nix file to build test scripts.

We noticed that if we edited the ghc-pkg binary to link with the threaded RTS, then we could not reproduce the deadlock (after running the test script for 24 hours).

Attached is the output from /usr/bin/sample for the stuck process, and the otool -L ghc-pkg output.

Trac metadata
Trac field Value
Version 8.6.3
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
8.6.4
Milestone
8.6.4 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#16147