[GHC] #14705: ghc-iserv sometimes segfaults in profiled way
#14705: ghc-iserv sometimes segfaults in profiled way -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Profiling | Version: 8.5 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Runtime crash Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I have seen a few testsuite failures due to `ghc-iserv` crashes like these, {{{ --- ./profiling/should_run/T5363.run/T5363.stdout.normalised 2018-01-22 18:57:49.401773263 +0000 +++ ./profiling/should_run/T5363.run/T5363.run.stdout.normalised 2018-01-22 18:57:49.401773263 +0000 @@ -1 +1 @@ -1250030000000 +ghc-stage2: ghc-iserv terminated (-7) *** unexpected failure for T5363(ghci-ext-prof) Actual stdout output differs from expected: --- ./profiling/should_run/scc001.run/scc001.stdout.normalised 2018-01-22 18:57:45.177724120 +0000 +++ ./profiling/should_run/scc001.run/scc001.run.stdout.normalised 2018-01-22 18:57:45.177724120 +0000 @@ -1,3 +1,3 @@ True 3 -'a' +ghc-stage2: ghc-iserv terminated (-11) *** unexpected failure for scc001(ghci-ext-prof) }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14705> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14705: ghc-iserv sometimes segfaults in profiled way -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Profiling | Version: 8.5 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Looking at `scc001`, it looks like we get into trouble in the interpreter, {{{ Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff647f700 (LWP 108910)] interpretBCO (cap=0x216c5c0 <MainCapability>) at rts/Interpreter.c:395 395 switch ( get_itbl(obj)->type ) { (gdb) print obj $1 = <optimized out> (gdb) print get_itbl(obj) value has been optimized out (gdb) print get_itbl(obj)->type value has been optimized out (gdb) info locals Sp = 0x420029fcc0 SpLim = 0x42002980d0 tagged_obj = 0x1c7b9b8 <stg_ctoi_R1p_info> obj = <optimized out> n = <optimized out> m = <optimized out> }}} For future reference, getting here involved, {{{ $ cd testsuite/tests/profiling/should_run/ $ make test TEST=scc001 VERBOSE=4 CLEANUP=NO $ gdb --args $HOME/project/inplace/lib/bin/ghc-stage2 -B$HOME/project/inplace/lib scc001.hs -dcore-lint -ddump-bcos -v -fexternal-interpreter -prof -fno-state-hack -fno-full-laziness --interactive ... (gdb) set follow-fork-mode child (gdb) run ... *Main> :main }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14705#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14705: ghc-iserv sometimes segfaults in profiled way -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Profiling | Version: 8.5 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"55aea8fda42dfa29face29292b298994fabfb962/ghc" 55aea8f/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="55aea8fda42dfa29face29292b298994fabfb962" testsuite: Mark scc001 and T5363 as broken due to #14705 These two tests have been failing on CircleCI. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14705#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14705: ghc-iserv sometimes segfaults in profiled way -------------------------------------+------------------------------------- Reporter: bgamari | Owner: simonmar Type: bug | Status: new Priority: highest | Milestone: 8.4.1 Component: Profiling | Version: 8.5 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4437 Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonmar): * owner: (none) => simonmar * priority: normal => highest * differential: => Phab:D4437 * milestone: => 8.4.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14705#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14705: ghc-iserv sometimes segfaults in profiled way -------------------------------------+------------------------------------- Reporter: bgamari | Owner: simonmar Type: bug | Status: new Priority: highest | Milestone: 8.4.1 Component: Profiling | Version: 8.5 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4437 Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonmar): FYI @bgamari, in the future we need to consider these things to be release-blocking. Running the interpreter with profiling is supposed to work (and we rely on it heavily at FB), but unfortunately we only have a few tests for it. Basically what should have happened here is that CI should have picked up the failing tests on the diff that broke it - so this is an argument for keeping profiling turned on in our new CircleCI setup. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14705#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14705: ghc-iserv sometimes segfaults in profiled way -------------------------------------+------------------------------------- Reporter: bgamari | Owner: simonmar Type: bug | Status: new Priority: highest | Milestone: 8.4.1 Component: Profiling | Version: 8.5 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4437 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Duly noted. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14705#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14705: ghc-iserv sometimes segfaults in profiled way -------------------------------------+------------------------------------- Reporter: bgamari | Owner: simonmar Type: bug | Status: new Priority: highest | Milestone: 8.4.1 Component: Profiling | Version: 8.5 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4437 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"488d63d6899d223ef87c26c218f0cf81ac670a90/ghc" 488d63d6/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="488d63d6899d223ef87c26c218f0cf81ac670a90" Fix interpreter with profiling This was broken by D3746 and/or D3809, but unfortunately we didn't notice because CI at the time wasn't building the profiling way. Test Plan: ``` cd testsuite/test/profiling/should_run make WAY=ghci-ext-prof ``` Reviewers: bgamari, michalt, hvr, erikd Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14705 Differential Revision: https://phabricator.haskell.org/D4437 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14705#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14705: ghc-iserv sometimes segfaults in profiled way -------------------------------------+------------------------------------- Reporter: bgamari | Owner: simonmar Type: bug | Status: closed Priority: highest | Milestone: 8.4.1 Component: Profiling | Version: 8.5 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4437 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed Comment: Merged for 8.4.1 as well. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14705#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14705: ghc-iserv sometimes segfaults in profiled way -------------------------------------+------------------------------------- Reporter: bgamari | Owner: simonmar Type: bug | Status: closed Priority: highest | Milestone: 8.4.2 Component: Profiling | Version: 8.5 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4437 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.4.1 => 8.4.2 Comment: Unfortunately due to an oversight in the release preparation process, the fix for this issue was not included in the 8.4.1 release. It will, however, be present in the soon-to-arrive 8.4.2. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14705#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC