[GHC] #15382: heapprof001 segfaults in prof_hc_hb way on i386

#15382: heapprof001 segfaults in prof_hc_hb way on i386 --------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple Architecture: x86 | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: --------------------------------+------------------------------------- I am seeing the `heapprof001` testcase segmentation fault in the `prof_hc_hb` testsuite way on i386. For instance, https://circleci.com/gh/ghc/ghc/7104. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15382 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15382: heapprof001 segfaults in prof_hc_hb way on i386 -------------------------------------+------------------------------ Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------ Description changed by bgamari: Old description:
I am seeing the `heapprof001` testcase segmentation fault in the `prof_hc_hb` testsuite way on i386. For instance, https://circleci.com/gh/ghc/ghc/7104.
New description: I am seeing the `heapprof001` testcase segmentation fault in the `prof_hc_hb` testsuite way on i386. For instance, https://circleci.com/gh/ghc/ghc/7104: {{{ Wrong exit code for heapprof001(prof_hc_hb)(expected 0 , actual 139 ) Stdout ( heapprof001 ): a <= a <= a <= a <= a <= a <= a <= Stderr ( heapprof001 ): Segmentation fault *** unexpected failure for heapprof001(prof_hc_hb) }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15382#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15382: heapprof001 segfaults in prof_hc_hb way on i386 -------------------------------------+------------------------------ Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------ Comment (by bgamari): This also seems to fail periodically on amd64. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15382#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15382: heapprof001 segfaults in prof_hc_hb way on i386
-------------------------------------+------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: x86
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+------------------------------
Comment (by Ben Gamari

bt #0 LDV_recordDead (c=c@entry=0x42000a60c8, size=4, size@entry=6) at rts/ProfHeap.c:205 #1 0x0000000000a790f4 in processHeapClosureForDead (c=0x42000a60c8) at rts/LdvProfile.c:124 #2 processNurseryForDead () at rts/LdvProfile.c:192 #3 LdvCensusForDead (N=1) at rts/LdvProfile.c:236 #4 0x0000000000a8174b in GarbageCollect (collect_gen=collect_gen@entry=1, do_heap_census=do_heap_census@entry=false, gc_type=gc_type@entry=0, cap=cap@entry=0x12afd80 <MainCapability>, idle_cap=idle_cap@entry=0x0) at rts/sm/GC.c:461 #5 0x0000000000a6ff55 in scheduleDoGC (pcap=pcap@entry=0x7ffc87622758, force_major=force_major@entry=true, task=0x1e0d660) at rts/Schedule.c:1806 #6 0x0000000000a71110 in exitScheduler (wait_foreign=wait_foreign@entry=false) at rts/Schedule.c:2663 #7 0x0000000000a7cb12 in hs_exit_ (wait_foreign=false) at rts/RtsStartup.c:392 #8 0x0000000000a7cfc5 in shutdownHaskellAndExit (n=0, fastExit=fastExit@entry=0) at rts/RtsStartup.c:553 #9 0x0000000000a6dde1 in hs_main (argc=<optimized out>, argv=<optimized out>, main_closure=<optimized out>, rts_config=...) at rts/RtsMain.c:99 #10 0x0000000000410fd3 in main () }}} `ctr` is `NULL` (which there happens to be an `ASSERT` to check for, but
#15382: heapprof001 segfaults in prof_hc_hb way on i386 -------------------------------------+------------------------------ Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------ Comment (by bgamari): I have been able to reproduce this issue under `rr`. The backtrace looks like, {{{ LDV_recordDead (c=c@entry=0x42000a60c8, size=4, size@entry=6) at rts/ProfHeap.c:205 205 ctr->c.ldv.void_total += size; the testcase isn't compiled against the debug RTS). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15382#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15382: heapprof001 segfaults in prof_hc_hb way on i386 -------------------------------------+------------------------------ Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------ Changes (by bgamari): * cc: simonmar (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15382#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15382: heapprof001 segfaults in prof_hc_hb way on i386
-------------------------------------+------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: x86
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+------------------------------
Comment (by Ben Gamari

#15382: heapprof001 segfaults in prof_hc_hb way on i386 -------------------------------------+------------------------------ Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15463 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------ Changes (by RyanGlScott): * cc: RyanGlScott (added) * related: => #15463 Comment: cc'ing since I'm also seeing this failure on `validate-x86_64-linux- fedora27` ([https://ghc- gitlab.s3.amazonaws.com/43/4c/434c9b5ae514646bbd91b50032ca579efec8f22bf0b4aac12e65997c418e0dd6/2019_01_31/19893/29214/job.log ?response-content-type=text/plain%3B%20charset%3Dutf-8&response-content- disposition=inline&X-Amz-Expires=600&X-Amz-Date=20190131T232149Z&X-Amz- Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAI3NPPHETCY4XXTOA/20190131 /us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz- Signature=aa92a0872c8d7ee3a515f8b94b3a6a0c6aee43b9702e8718ca8508d00bc046e0 here]) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15382#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15382: heapprof001 segfaults in prof_hc_hb way on i386 -------------------------------------+----------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: ci-breakage Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15463 | Differential Rev(s): Wiki Page: | -------------------------------------+----------------------------------- Changes (by RyanGlScott): * keywords: => ci-breakage -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15382#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15382: heapprof001 segfaults in prof_hc_hb way on i386 -------------------------------------+----------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: ci-breakage Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15463 | Differential Rev(s): Wiki Page: | -------------------------------------+----------------------------------- Comment (by bgamari): I have also seen it fail in a similarly-looking mode on x86-64 when building GHC with LLVM: {{{ Wrong exit code for heapprof001(prof_hc_hb)(expected 0 , actual 134 ) Stdout ( heapprof001 ): a <= a <= a <= a <= a <= a <= a <= Stderr ( heapprof001 ): heapprof001: internal error: LDV_recordDead: Failed to find counter for closure 0x42000af050 (GHC version 8.9.20190225 for x86_64_unknown_linux) Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug Aborted (core dumped) *** unexpected failure for heapprof001(prof_hc_hb) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15382#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15382: heapprof001 segfaults in prof_hc_hb way on i386 -------------------------------------+----------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: ci-breakage Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15463 | Differential Rev(s): Wiki Page: | -------------------------------------+----------------------------------- Comment (by RyanGlScott): I believe the failure in comment:11 has been previously reported as #16100. It's worth noting that two other tests besides `heapprof001` (`T11627a` and `T949`) have also been observed to exhibit this `LDV_recordDead` panic. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15382#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15382: heapprof001 segfaults in prof_hc_hb way on i386
-------------------------------------+-----------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.10.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords: ci-breakage
Operating System: Unknown/Multiple | Architecture: x86
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #15463 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-----------------------------------
Comment (by Marge Bot
participants (1)
-
GHC