Ticket #4988 (closed bug: fixed)

Opened 2 years ago

Last modified 19 months ago

Hang in GHCi debugger

Reported by: simonmar Owned by: simonmar
Priority: high Milestone: 7.2.2
Component: GHCi Version: 7.0.1
Keywords: Cc: pepeiborra@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHCi crash Difficulty:
Test Case: break024 Blocked By:
Blocking: Related Tickets:

Description

GHCi hangs when loading a file after stopping at an exception breakpoint:

$ cd testsuite/tests/ghc-regress/ghci.debugger/scripts
$ ../../../../../inplace/bin/ghc-stage2 --interactive break024 -fbreak-on-error
GHCi, version 7.1.20110227: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
[1 of 1] Compiling Main             ( break024.hs, interpreted )
Ok, modules loaded: Main.
*Main> exception_uncaught 
Stopped at <exception thrown>
_exception :: e = _
[<exception thrown>] *Main> :l break024
^CInterrupted.
*Main> 

Change History

Changed 2 years ago by mnislaih

  • cc pepeiborra@… added

The hang also happens when one tries to :abandon the debugging session after stopping at an error (with -fbreak-on-error). I didn't manage to reproduce it with -fbreak-on-exception.

GHCi, version 7.0.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
[1 of 1] Compiling Main             ( scripts/break024.hs, interpreted )
Ok, modules loaded: Main.
*Main> :set -fbreak-on-error
*Main> exception_uncaught 
Stopped at <exception thrown>
_exception :: e = _
[<exception thrown>] *Main> :abandon
^CInterrupted.
*Main> 

Changed 21 months ago by simonmar

  • owner set to simonmar

Changed 21 months ago by marlowsd@…

commit fa71e6c795489ec267e0d048395c2c52bea6a164

Author: Simon Marlow <marlowsd@gmail.com>
Date:   Wed Aug 31 22:45:01 2011 +0100

    Fix #4988: we were wrongly running exception handlers in the
    maskUninterruptible state instead of ordinary mask, due to a
    misinterpretation of the way the TSO_INTERRUPTIBLE flag works.
    
    Remarkably this must have been broken for quite some time.  Indeed we
    even had a test that demonstrated the wrong behaviour (conc015a) but
    presumably I didn't look hard enough at the output to notice that it
    was wrong.

 rts/Exception.cmm |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

Changed 21 months ago by simonmar

  • status changed from new to closed
  • resolution set to fixed

Changed 19 months ago by simonmar

  • milestone changed from 7.4.1 to 7.2.2

Changed 19 months ago by simonmar

  • status changed from closed to merge

Changed 19 months ago by igloo

  • status changed from merge to closed

Merged as changeset:63e2cde7a259256a0e4925611ae8184bc4da68a4

Note: See TracTickets for help on using tickets.