[GHC] #8291: unloadObj doesn't work on Mac OS X

#8291: unloadObj doesn't work on Mac OS X --------------------------+------------------------------------------------ Reporter: ezyang | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.7 Runtime System | Operating System: MacOS X Keywords: | Type of failure: Incorrect result at runtime Architecture: | Test Case: linker_unload Unknown/Multiple | Blocking: Difficulty: | Unknown | Blocked By: | Related Tickets: | --------------------------+------------------------------------------------ Shows up as the linker_unload test going very slowly and triggering the timeout on my box. Verified by looking at the unloaded_objects list, which contains multiple copies of Test.o. I haven't investigated any further. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8291 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8291: unloadObj doesn't work, unloaded_objects list keeps growing in size ------------------------------------------------+-------------------------- Reporter: ezyang | Owner: Type: bug | simonmar Priority: normal | Status: new Component: Runtime System | Milestone: Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect result at runtime | Architecture: Test Case: linker_unload | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by ezyang): * os: MacOS X => Unknown/Multiple Comment: Scratching Mac OS X specificity; I'm seeing this behavior on Linux x86_64 too. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8291#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8291: unloadObj doesn't work, unloaded_objects list keeps growing in size ------------------------------------------------+-------------------------- Reporter: ezyang | Owner: Type: bug | simonmar Priority: highest | Status: new Component: Runtime System | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect result at runtime | Architecture: Test Case: linker_unload | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by simonmar): * priority: normal => highest * milestone: => 7.8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8291#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8291: unloadObj doesn't work, unloaded_objects list keeps growing in size ------------------------------------------------+-------------------------- Reporter: ezyang | Owner: Type: bug | simonmar Priority: highest | Status: Component: Runtime System | infoneeded Resolution: | Milestone: 7.8.1 Operating System: Unknown/Multiple | Version: 7.7 Type of failure: Incorrect result at runtime | Keywords: Test Case: linker_unload | Architecture: Blocking: | Unknown/Multiple | Difficulty: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by simonmar): * status: new => infoneeded Comment: I can't reproduce this - clean validate on Linux/x86_64, linker_unload is showing as an unexpected pass, and it is correctly unloading objects for me. Anyone else experiencing this? Is there anything special about your build? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8291#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8291: unloadObj doesn't work, unloaded_objects list keeps growing in size ------------------------------------------------+-------------------------- Reporter: ezyang | Owner: Type: bug | simonmar Priority: highest | Status: Component: Runtime System | infoneeded Resolution: | Milestone: 7.8.1 Operating System: Unknown/Multiple | Version: 7.7 Type of failure: Incorrect result at runtime | Keywords: Test Case: linker_unload | Architecture: Blocking: | Unknown/Multiple | Difficulty: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Comment (by ezyang): No, I don't think there's anything special. For good measure, I reproduced on my laptop. Anyway, I've tracked it down; recall that foreign export code produces an initializer (`compiler/deSugar/DsForeign.lhs`), which registers the foreign export in Test.hs as a stable pointer. Well, stable pointers constitute roots, so since the foreign export stable pointers are not getting cleaned up, it is retaining a reference to the object, preventing it from being freed. I don't know why the error is not triggering on your box. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8291#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8291: unloadObj doesn't work, unloaded_objects list keeps growing in size ------------------------------------------------+-------------------------- Reporter: ezyang | Owner: Type: bug | simonmar Priority: highest | Status: new Component: Runtime System | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect result at runtime | Architecture: Test Case: linker_unload | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by ezyang): * status: infoneeded => new -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8291#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8291: unloadObj doesn't work, unloaded_objects list keeps growing in size ------------------------------------------------+-------------------------- Reporter: ezyang | Owner: Type: bug | simonmar Priority: highest | Status: new Component: Runtime System | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect result at runtime | Architecture: Test Case: linker_unload | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Comment (by simonmar): Of course, it isn't triggering on my machine, because for some reason your fix for #5435 isn't working on my machine either. The stable pointer isn't getting created because the constructor isn't being run. I'll try to look into this further. FWIW this is 64-bit Ubuntu 12.04, with gcc 4.6.3 and binutils 2.22. I'll also need to figure out a way to unload objects that have stable pointers created by the constructor for the object itself. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8291#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8291: unloadObj doesn't work, unloaded_objects list keeps growing in size ------------------------------------------------+-------------------------- Reporter: ezyang | Owner: Type: bug | simonmar Priority: highest | Status: new Component: Runtime System | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect result at runtime | Architecture: Test Case: linker_unload | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Comment (by ezyang): I've fixed #5435 enough so that you should now be able to reproduce on Linux (Mac OS X and Windows forthcoming). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8291#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8291: unloadObj doesn't work, unloaded_objects list keeps growing in size
------------------------------------------------+--------------------------
Reporter: ezyang | Owner:
Type: bug | simonmar
Priority: highest | Status: new
Component: Runtime System | Milestone: 7.8.1
Resolution: | Version: 7.7
Operating System: Unknown/Multiple | Keywords:
Type of failure: Incorrect result at runtime | Architecture:
Test Case: linker_unload | Unknown/Multiple
Blocking: | Difficulty:
| Unknown
| Blocked By:
| Related Tickets:
------------------------------------------------+--------------------------
Comment (by Simon Marlow

#8291: unloadObj doesn't work, unloaded_objects list keeps growing in size ------------------------------------------------+-------------------------- Reporter: ezyang | Owner: Type: bug | simonmar Priority: highest | Status: closed Component: Runtime System | Milestone: 7.8.1 Resolution: fixed | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect result at runtime | Architecture: Test Case: linker_unload | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by simonmar): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8291#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC