[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes seg
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults |
Date: |
Wed, 8 Jun 2016 16:15:40 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Update of bug #37672 (project octave):
Severity: 4 - Important => 5 - Blocker
Summary: GUI doesn't react to CTRL+C => CTRL+C interrupt
processing causes segfaults
_______________________________________________________
Follow-up Comment #62:
Octave's handling of Ctrl+C interrupts is seriously compromised. To begin
with, I did all my testing on Linux (most stable of the OSes we support) with
an up to date development tip (21835:f250714c629d). I can repeatedly, and
easily, get segfaults which lose all the work in the interpreter. This is
serious, so I have changed the severity to Blocker for the 4.2 release.
Test #1
I used Thorsten's code from comment #6 as the test vehicle. I've attached
that code to the bug report as tst_ctrlc.m.
Steps to reproduce:
./run-octave
tst_ctrlc
# Type Ctrl+C
Results:
./run-octave -f --no-gui-libs --no-line-editing : segfault
./run-octave -f --no-gui-libs : segfault
./run-octave -f --no-gui : segfault
./run-octave -f : segfault
Test #2
Try to interrupt pause, which has always been problematic and has a different
implemenation on Windows versus Linux. See bug #44470 for a more complete
description of the problems specific to Windows.
Steps to reproduce:
./run-octave
pause (5)
# Type Ctrl+C
Results:
./run-octave -f --no-gui-libs --no-line-editing : WORKS
./run-octave -f --no-gui-libs : WORKS
./run-octave -f --no-gui : FAILS, 3 Ctrl+C to kill
Octave
./run-octave -f : WORKS
Test #3
Try to interrupt a call to system() which has created a child process.
Steps to reproduce:
./run-octave
system ("sleep 5");
# Type Ctrl+C
Results:
./run-octave -f --no-gui-libs --no-line-editing : WORKS
./run-octave -f --no-gui-libs : WORKS
./run-octave -f --no-gui : WORKS
./run-octave -f : FAILS, Ctrl+C never
acknowledged
This appears to be multiple bugs manifesting in roughly the same way. The
segfault in test #1 is most likely due to the multithreaded nature of the BLAS
library. If I use
setenv OMP_NUM_THREADS 1
before starting run-octave then I no longer get segfaults and Ctrl+C seems to
work.
Similarly, pause() has very different implementations between operating
systems and it is likely that each OS needs that bit of code adapted in order
to resolve test #2.
For test #3, it looks like the issue will be who is receiving the Ctrl+C
indication. Is it the embedded terminal process, the GUI Shortcut Manager, Qt
itself, someone else?
My suggestion is that we start by building our understanding on the Linux
platform and getting that to work correctly in 100% of cases. From there, we
can take what we know and apply it to solutions for Mac and Windows platforms.
(file #37432)
_______________________________________________________
Additional Item Attachment:
File name: tst_ctrlc.m Size:0 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37672>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #37672] GUI doesn't react to CTRL+C, Lachlan Andrew, 2016/06/08
- [Octave-bug-tracker] [bug #37672] GUI doesn't react to CTRL+C, Ben Abbott, 2016/06/08
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults,
Rik <=
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults, Mike Miller, 2016/06/08
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults, Mike Miller, 2016/06/08
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults, Mike Miller, 2016/06/08
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults, Rik, 2016/06/09
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults, Mike Miller, 2016/06/09
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults, Rik, 2016/06/10
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults, Mike Miller, 2016/06/10
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults, Rik, 2016/06/10
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults, Mike Miller, 2016/06/10
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults, Rik, 2016/06/11