[GHC] #13531: GHC fails with "Dynamic linker not initialised" when -j is on and trying to load nonexistent .so file

GHC ghc-devs at haskell.org
Mon Aug 6 22:29:49 UTC 2018


#13531: GHC fails with "Dynamic linker not initialised" when -j is on and trying to
load nonexistent .so file
-------------------------------------+-------------------------------------
        Reporter:  nh2               |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13137, #9868,    |  Differential Rev(s):  Phab:D5012
  #10355, #13607, #10919             |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"4fc6524a2a4a0003495a96c8b84783286f65c198/ghc" 4fc6524/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="4fc6524a2a4a0003495a96c8b84783286f65c198"
 Stop the linker panic

 If we fail to initialize the liker properly, we still set the
 `initLinkerDone`. In fact we even set that prior to actually
 initializing the linker. However if the linker initialization fails, we
 the `Done` state is still true. As such we run into the `Dynamic Linker
 not initialised` error. Which while technically corret is confusing as
 it pulls the attation away from the real issue.

 This change puts the Done state into an MVar, and as such ensureing
 that all parallel access needs to wait for the linker to be actually
 initialized, or try to re-initilize if it fails.

 Reviewers: bgamari, RyanGlScott, simonmar, hvr

 Reviewed By: bgamari

 Subscribers: rwbarton, thomie, carter

 GHC Trac Issues: #9868, #10355, #13137, #13607, #13531

 Differential Revision: https://phabricator.haskell.org/D5012
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13531#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list