[GHC] #11776: RTS segfaults when printing profiling information which refers to unloaded objects

#11776: RTS segfaults when printing profiling information which refers to unloaded objects -------------------------------------+------------------------------------- Reporter: afarmer | Owner: afarmer Type: bug | Status: new Priority: normal | Milestone: Component: Runtime | Version: 7.10.3 System (Linker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Running a profiled binary which loads/unloads objects via the RTS's linker results in a CCS tree with pointers to the shared objects. These references are not checked by checkUnload before unloading the object. Then, when the profiling report is printed at the end of the program, a segfault occurs. Plan: 1. Add a test case for this. 2. Modify checkUnload to prevent objects from being unloaded if the CCS tree points to them. 3. Modify generateCCSReport to prune the CCS tree after a report is printed. 4. Expose some way to generate a report on demand, so long-running programs don't keep every object loaded forever. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11776 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11776: RTS segfaults when printing profiling information which refers to unloaded objects -------------------------------------+------------------------------------- Reporter: afarmer | Owner: afarmer Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 7.10.3 (Linker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:2067 Wiki Page: | Phab:2068 Phab:2069 Phab:2071 -------------------------------------+------------------------------------- Changes (by afarmer): * status: new => patch * differential: => Phab:2067 Phab:2068 Phab:2069 Phab:2071 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11776#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11776: RTS segfaults when printing profiling information which refers to unloaded objects -------------------------------------+------------------------------------- Reporter: afarmer | Owner: afarmer Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 7.10.3 (Linker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2067 Wiki Page: | Phab:D2068 Phab:D2069 Phab:D2071 -------------------------------------+------------------------------------- Changes (by afarmer): * differential: Phab:2067 Phab:2068 Phab:2069 Phab:2071 => Phab:D2067 Phab:D2068 Phab:D2069 Phab:D2071 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11776#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11776: RTS segfaults when printing profiling information which refers to unloaded objects -------------------------------------+------------------------------------- Reporter: afarmer | Owner: afarmer Type: bug | Status: patch Priority: normal | Milestone: 8.0.2 Component: Runtime System | Version: 7.10.3 (Linker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2067 Wiki Page: | Phab:D2068 Phab:D2069 Phab:D2071 -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: => 8.0.2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11776#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11776: RTS segfaults when printing profiling information which refers to unloaded
objects
-------------------------------------+-------------------------------------
Reporter: afarmer | Owner: afarmer
Type: bug | Status: patch
Priority: normal | Milestone: 8.0.2
Component: Runtime System | Version: 7.10.3
(Linker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2067
Wiki Page: | Phab:D2068 Phab:D2069 Phab:D2071
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11776: RTS segfaults when printing profiling information which refers to unloaded objects -------------------------------------+------------------------------------- Reporter: afarmer | Owner: afarmer Type: bug | Status: closed Priority: normal | Milestone: 8.0.2 Component: Runtime System | Version: 7.10.3 (Linker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2067 Wiki Page: | Phab:D2068 Phab:D2069 Phab:D2071 -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: Merged to `ghc-8.0` as 36a0b6dc27ae0ee2022afbef5d3cd49dfde9e82b. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11776#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11776: RTS segfaults when printing profiling information which refers to unloaded objects -------------------------------------+------------------------------------- Reporter: afarmer | Owner: afarmer Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Runtime System | Version: 7.10.3 (Linker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2067 Wiki Page: | Phab:D2068 Phab:D2069 Phab:D2071 -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.0.2 => 8.0.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11776#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC