Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#375 closed defect (invalid)

PG goes into infinite loop with 100% CPU usage

Reported by: megacz Owned by: David Aspinall
Priority: blocker Milestone: PG-Emacs-4.0
Component: 2:pg-emacs Keywords:
Cc:

Description

To reproduce: download the attachment. Then type:

emacs -nw pg_bug3.v

Pick your nose while admiring the cromulent proof general splash screen.

Type "C-c ." to turn on electric terminator.

Move to the end of the file. Delete the existing period and re-type it.

Type a new period.

Watch your computer furiously increase the entropy level in the room.

FWIW, executing "coqc pg_bug3.v" reports an error, so this script clearly is not valid. However, the fact that PG goes into a 100% CPU usage situation is probably not the best reaction.

Attachments (2)

pg_bug3.v (131 bytes) - added by megacz 14 years ago.
proof-always-interrupt-process.patch (942 bytes) - added by David Aspinall 14 years ago.
Patch to make C-c C-c in script buffers always cause a process interrupt

Download all attachments as: .zip

Change History (4)

Changed 14 years ago by megacz

Attachment: pg_bug3.v added

comment:1 Changed 14 years ago by David Aspinall

Resolution: invalid
Status: newclosed

This is indeed ugly, but it isn't PG's fault.

Instead of testing with coqc, try the interactive interpreter that PG runs, coqtop. You'll see that it goes into an infinite loop printing "Syntax error: Bad token".

You can switch to the *coq* buffer and hit C-c C-c there to interrupt, the script buffer C-c C-c function will refuse to do this unless it expects the prover to be busy. I'm uploading a tiny patch (for personal use) that relaxes this a bit but really this infinite loop is pretty much destined to bring Emacs to its knees.

Please report to the Coq team. Biased recommendation: try PG's Unicode Tokens instead of these unsafe Unicode characters.

Changed 14 years ago by David Aspinall

Patch to make C-c C-c in script buffers always cause a process interrupt

comment:2 Changed 14 years ago by megacz

Hrm, I don't see anything about "unsafe" in the Unicode specification... what does it mean for a Unicode character to be unsafe?

Thanks for the patch. You sure you don't want to commit it? One of the most frustrating things in the world is when proof general won't let me interrupt Coq for one reason or another; it would seem to be wise to err on the side of sending the interrupt whenever the user asks for it, regardless of whether or not proof general thinks it's necessary...

Note: See TracTickets for help on using tickets.