[GHC] #13574: crash when using template haskell and ghc-mod

#13574: crash when using template haskell and ghc-mod --------------------------------------+--------------------------------- Reporter: quisquous | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: OpenBSD Architecture: x86_64 (amd64) | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: --------------------------------------+--------------------------------- GHC crashes whenever I try to use the ghc-mod tool with even a trivial Template Haskell project. I thought it might be ghc-mod's fault, but a ghc-mod maintainer looked at the info I collected about the bug and he says its a bug in GHC. Here's the discussion about the bug, with the relevant logs and troubleshooting so far: https://github.com/DanielG/ghc-mod/issues/880#issuecomment-293436359 Let me know if it would help to copy+paste that conversation here instead of just providing a link. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13574 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13574: crash when using template haskell and ghc-mod ---------------------------------+-------------------------------------- Reporter: quisquous | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: OpenBSD | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Comment (by bgamari): Is this issue reproducible with GHC 8.0.2? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13574#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13574: crash when using template haskell and ghc-mod ---------------------------------+-------------------------------------- Reporter: quisquous | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: OpenBSD | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Comment (by quisquous): Unfortunately I do not know because GHC 8.0.2 is not yet available as a binary package for OpenBSD 6.0 (or the just released 6.1) and I haven't yet been able to successfully build GHC 8.0.2 on OpenBSD 6.0 on my own. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13574#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13574: crash when using template haskell and ghc-mod ---------------------------------+-------------------------------------- Reporter: quisquous | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: OpenBSD | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Comment (by bgamari): Alright, I can try to reproduce on OpenBSD 6.0. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13574#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13574: crash when using template haskell and ghc-mod ---------------------------------+-------------------------------------- Reporter: quisquous | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: OpenBSD | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Comment (by bgamari): I put together [[https://github.com/bgamari/T13574-repro|this]] reproducer from the information you left on the `ghc-mod` ticket. I was unable to reproduce the crash with OpenBSD 6.0 on amd64 and GHC 7.10.3. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13574#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13574: crash when using template haskell and ghc-mod ---------------------------------+-------------------------------------- Reporter: quisquous | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: OpenBSD | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Changes (by DanielG): * cc: DanielG (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13574#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13574: crash when using template haskell and ghc-mod ---------------------------------+-------------------------------------- Reporter: quisquous | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: fixed | Keywords: Operating System: OpenBSD | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Changes (by quisquous): * status: new => closed * resolution: => fixed Comment: I upgraded my machine to OpenBSD 6.1 and I get a permissions issue when running ghc-mod instead: {{{ Failed to execute process '/home/scott/.local/bin/ghc-mod'. Reason: exec: Permission denied }}} and on the console I see: {{{ /home/scott/.local/bin/ghc-mod(78252): W^X binary outside wxallowed mountpoint }}} I suspect the crash I was seeing in 6.0 was related to OpenBSD not allowing WX by default. Workaround is to put the ghc-mod binary in a location that allows WX, like /usr/local, or by setting wxallowed on the /home partition by updating /etc/fstab. In any case, once I set wxallowed on /home, /home/scott/.local/bin/ghc-mod no longer gives a permissions error AND it does not crash when checking a Template Haskell project. I'm going to close the ticket for now, I'll reopen it if I am able repro the crash some other way. Thanks for looking into this! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13574#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC