[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: |
Fri, 10 Jun 2016 17:52:03 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #69, bug #37672 (project octave):
I can confirm two fixes to use for breaking pause() statements
1) setenv OMP_NUM_THREADS 1 in the shell before starting Octave.
2) execute system() command that returns output.
The first solution is mostly for multi-threaded BLAS libraries, but it also
works here indicating some dependence on threads.
The second case is pretty interesting. A simple example that seems to reset
the interrupt handlers is
system ("", 1)
All this does is call system and ask for the output back. Internally, it
seems that it is the creation of an iprocstream which probably resets things.
This is more easily proved by the following which also works
fid = popen ("", "r");
and the code in file-io.cc is
if (mode == "r")
{
octave_stream ips = octave_iprocstream::create (name);
retval = octave_stream_list::insert (ips);
}
Just for fun, I commented out the retval statement and it still works so it is
really the one statement to create an iprocstream that fixes things.
So, maybe jwe has an idea, but it seems that during the start-up sequence
there is a lot of forking/execing and maybe not all of the std::streams get
associated with the correct PID.
_______________________________________________________
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, 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, 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 <=
- [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
- [Octave-bug-tracker] [bug #37672] CTRL+C interrupt processing causes segfaults, Lachlan Andrew, 2016/06/27