Ticket #1583 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

GHCi + large Integer arithmetic + Ctrl-C = bad

Reported by: Isaac Dupree Owned by: simonmar
Priority: normal Milestone: 6.8.3
Component: GHCi Version: 6.6.1
Keywords: Cc:
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Now detected and mostly repeatable on x86, not just powerpc.

$ ghci
Prelude> product [1..50000]
[press control-C repeatedly, without pausing the assault,
  until the following line appears:]
3347320509<interactive>: exception :: GhcException
[sometimes this line appears instead, in which case try
  again until GhcException reproduced:
  3347320509Interrupted.]

The exact number of digits printed can vary - they ARE the initial digits of 50000! (factorial), by the way. The GhcException can happen whether this expression is the first thing to be entered into the ghci prompt session or not. Once it happens, the terminal is rather frozen, although control-Z to suspend ghci and regain a shell prompt, seems to make the terminal usable again, and kill (ghc's pid) or kill -9 (ghc's pid) (I needed the -9/-KILL once and not another time I tried, inexplicably) also returns from ghci to my shell.

Even when not so many control-C's are used and it just says Interrupted, ghci takes an awfully long time before returning to the ghci prompt, which is undesirable.

Change History

Changed 4 years ago by igloo

  • milestone set to 6.8

Changed 4 years ago by simonmar

  • owner set to simonmar
  • milestone changed from 6.8 branch to 6.8.3

I'll look into this for 6.8.3

Changed 4 years ago by simonmar

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

Fixed, I think. See also #1922 and #1946.

Changed 3 years ago by simonmar

  • architecture changed from Multiple to Unknown/Multiple
Note: See TracTickets for help on using tickets.