[GHC] #16147: ghc-pkg deadlocks on macOS

#16147: ghc-pkg deadlocks on macOS -------------------------------------+------------------------------------- Reporter: rvl | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime | Version: 8.6.3 System | Keywords: | Operating System: MacOS X Architecture: x86_64 | Type of failure: Incorrect result (amd64) | at runtime Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- If I run this script on macOS, after about 15 minutes, a `ghc-pkg` process will deadlock. {{{#!sh #!/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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16147 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16147: ghc-pkg deadlocks on macOS -------------------------------------+------------------------------------- Reporter: rvl | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.6.3 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by rvl): * Attachment "sample.txt" added. Output from /usr/bin/sample -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16147 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16147: ghc-pkg deadlocks on macOS -------------------------------------+------------------------------------- Reporter: rvl | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.6.3 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by rvl): * Attachment "otool.txt" added. Output from otool -L ghc-pkg -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16147 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16147: ghc-pkg deadlocks on macOS -------------------------------------+------------------------------------- Reporter: rvl | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.6.3 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by rvl): * Attachment "devops-1202.nix" added. Nix recipe to build scripts to reproduce the issue. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16147 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16147: ghc-pkg deadlocks on macOS -------------------------------------+------------------------------------- Reporter: rvl | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.6.3 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by angerman): * cc: angerman (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16147#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16147: ghc-pkg deadlocks on macOS -------------------------------------+------------------------------------- Reporter: rvl | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.6.3 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: Blocked By: | Blocking: Related Tickets: 16147 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by angerman): * status: new => patch * related: => 16147 Comment: This is in probably fixed with http://gitlab.haskell.org/ghc/ghc/merge_requests/95 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16147#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16147: ghc-pkg deadlocks on macOS -------------------------------------+------------------------------------- Reporter: rvl | Owner: (none) Type: bug | Status: infoneeded Priority: normal | Milestone: 8.6.4 Component: Runtime System | Version: 8.6.3 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: Blocked By: | Blocking: Related Tickets: 16147 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => infoneeded * milestone: => 8.6.4 Comment: That patch is now upstream; can someone check that it fixed the issue? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16147#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC