bugGNU Octave - Bugs: bug #50664, upon normal exit GUI closes with...

 
 

bug #50664: upon normal exit GUI closes with " panic: Aborted -- stopping myself..."

Submitter:  None
Submitted:  Tue 28 Mar 2017 11:25:08 AM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  R. Rietbroek Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.1
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 18 Oct 2017 07:59:58 PM UTC, comment #10: 

I'd like to note that this happens even with --no-gui switch. I didn't know the octave-cli so I had octave aliased to 'octave -q --no-gui' and it failed with exact same error on exit. Hopefully it doesn't happen with octave-cli.

woky <woky>
Tue 05 Sep 2017 02:59:33 PM UTC, comment #9: 

doragasu - "octave -qW" doesn't actually work on any released version of Octave, so you were actually not running octave-cli, you were running the equivalent of "octave -q --no-gui". I've fixed that for the next major release 4.4. With Octave 4.2.x or older you'll want to use "octave -q -W" or use "octave-cli -qW". Refer to bug #51461 for that detail.

Mike Miller <mtmiller>
Group Member
Tue 05 Sep 2017 02:15:00 PM UTC, comment #8: 

I checked in the following changeset on stable.  It's similar to the change I made on default and it seems to fix the problem for me.

http://hg.savannah.gnu.org/hgweb/octave/rev/16fae04366b2

John W. Eaton <jwe>
Group administrator
Tue 05 Sep 2017 12:10:34 PM UTC, comment #7: 

I had the same problem on my ArchLinux x86_64 machine, but for me it happened on the CLI:

octave -qW
octave:1&gt; exit

panic: Aborted -- stopping myself...
attempting to save variables to 'octave-workspace'...
panic: attempted clean up failed -- aborting...
octave exited with signal 6
$

The interesting thing is that if I do not use the -q switch, octave gracefully closes!:

$ octave -W
GNU Octave, version 4.2.1
Copyright (C) 2017 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for &quot;x86_64-pc-linux-gnu&quot;.

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

octave:1&gt; exit

$

I had alias octave='octave -qW', so I was always suffering this problem. Maybe the GUI calls octave with the '-q' switch, causing this problem.

doragasu <doragasu>
Tue 05 Sep 2017 04:55:48 AM UTC, comment #6: 

Adding jwe to the CC list since this touches on recent work he has been doing about avoiding SIGABRT when closing the GUI.

There has been so many changes to this area of the code on the development branch that I don't think any change wil be backported to a 4.2.2 bug fix release.  Instead, its more likely that version 4.4.0 will be released which won't have this issue.

Rik <rik5>
Group administrator
Tue 05 Sep 2017 04:55:11 AM UTC, comment #5: 

Adding jwe to the CC list since this touches on recent work he has been doing about avoiding SIGABRT when closing the GUI.

There has been so many changes to this area of the code on the development branch that I don't think any change wil be backported to a 4.2.2 bug fix release.  Instead, its more likely that version 4.4.0 will be released which won't have this issue.

Rik <rik5>
Group administrator
Wed 19 Jul 2017 08:44:35 PM UTC, comment #4: 

I see the same problem on Arch Linux/amd64 octave 4.2.1 / qt5

Evgeniy <evgeniy>
Fri 23 Jun 2017 07:02:39 PM UTC, comment #3: 

I used Qt 5.

The relevant code has changed quite a bit in the development branch, so it is quite possible that the problem was fixed.
I'll try building that branch when I get the chance.

Dario Meluzzi <dariome>
Fri 23 Jun 2017 06:24:13 PM UTC, comment #2: 

Did you build Octave using Qt 4 or Qt 5? Does one exhibit this problem and not the other?

Can you try to reproduce this using the development branch of Octave, and see if something still needs to be done to resolve this going forward? I do not see this problem running Octave's development branch on either Debian or Ubuntu 14.04, but that could be my system or it could mean it has already been fixed. It would help if you can verify that it's fixed for you.

Mike Miller <mtmiller>
Group Member
Fri 23 Jun 2017 05:47:20 AM UTC, comment #1: 

I encountered the same problem with octave-4.2.1 compiled on Ubuntu 14.04 using GCC 5.3.0. However in my case I get the abort message also when I type quit after starting octave with option --no-gui.
The cause of the problem seems to be that the octave_qt_link destructor (in file libgui/src/octave-qt-link.cc) deletes a QThread object whose event queue is still busy, causing that object to call abort.
To solve this problem I inserted calls to QThread::quit and QThread::wait in the octave_qt_link destructor before it deletes the QThread object:

octave_qt_link::~octave_qt_link (void)
{
  main_thread->quit();
  main_thread->wait();
  delete command_interpreter;
  delete main_thread;
}

In addition, I modified interpreter::main_loop (in file libinterp/corefcn/interpreter.cc) to return without calling  clean_up_and_exit after catching octave::exit_exception, because clean_up_and_exit will get called later by interpreter::execute. Finally, I modified interpreter::clean_up_and_exit to avoid entering an infinite loop when the argument safe_to_return is false, which is the case after typing quit at the CLI.
With these changes the program exits without any error messages.
However these changes are not necessarily the proper way to resolve the problem. They are only presented to highlight the likely cause of the problem.

(file #41030, file #41031)

Dario Meluzzi <dariome>
Tue 28 Mar 2017 11:25:08 AM UTC, original submission:  

Description:
When simply typing 'exit' or 'quit' in the GUI, octave closes with:

>

panic: Aborted -- stopping myself...
attempting to save variables to 'octave-workspace'...
panic: attempted clean up failed -- aborting...
octave exited with signal 6
<
Steps to reproduce:
1 from a shell start: octave
2 type exit or quit in gui

This does not happen when the command line version is used. But it is somewhat annoying as it leaves (empty) octave-workspace files around.

See also:
http://stackoverflow.com/questions/42461527/octave-dumps-core-on-exit

I also reported it at Arch:
https://bugs.archlinux.org/task/53478


Additional info:

  • Archlinux package Octave version 4.2.1-4
  • coredump attached (possibly a race condition?)


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #41030:  libgui-src.diff added by dariome (437B - application/octet-stream - diffs of the files I modified in my attempt to solve this problem)
file #41031:  corefcn.diff added by dariome (152B - application/octet-stream - diffs of the files I modified in my attempt to solve this problem)
file #40180:  coredump.txt added by None (6KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by woky (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by doragasu (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by evgeniy (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by dariome (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-09-15 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2017-09-05 jwe StatusNeed Info Ready For Test
    2017-09-05 rik5 Carbon-Copy- Added jwe
    2017-06-23 mtmiller Item GroupUnexpected Error or Warning Segfault, Bus Error, etc.
        StatusNone Need Info
    2017-06-23 dariome Attached File- Added libgui-src.diff, #41030
        Attached File- Added corefcn.diff, #41031
    2017-03-28 None Attached File- Added coredump.txt, #40180

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code