bugGNU Octave - Bugs: bug #50210, octave-gui crashes on exit

 
 

bug #50210: octave-gui crashes on exit

Submitted by:  Elvis Angelaccio <eang>
Submitted on:  Thu 02 Feb 2017 06:35:42 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.2.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 15 Sep 2017 03:26:46 PM UTC, comment #7:

Thanks for testing. I'm going to close the report.

Rik <rik5>
Project Administrator
Fri 15 Sep 2017 01:44:37 PM UTC, comment #6:

I can't reproduce anymore with octave 4.2.1. The archlinux package also applies this patch [1] but I'm not sure if that's relevant.

[1]: http://hg.savannah.gnu.org/hgweb/octave/raw-rev/16fae04366b2

Elvis Angelaccio <eang>
Tue 05 Sep 2017 05:05:12 AM UTC, comment #5:

Do things work now? I see that jwe just checked in another attempt

Rik <rik5>
Project Administrator
Sat 02 Sep 2017 04:02:30 AM UTC, comment #4:

I'm referencing previous work on the exit sequence:

https://savannah.gnu.org/bugs/?44485

I believe I tried something similar to what is done here, i.e., terminate and wait, but that wasn't quite right. Octave core wasn't exiting properly and would cause an error message at the command line at exit...and wait() had some issues too, but I can't remember them right now. One thing was as pointed out in the patch:

The way I had approached this is to start a Qt timer and connect it to the signal expected to come from Octave core. If that signal didn't arrive by time the timer expired, then it would toss up a dialog and ask if the thread should be terminated. It's tricky in the sense that the signal could arrive while the dialog box is up. Or the user could impatiently press "exit" multiple times, so we had to make sure to not put up multiple dialog boxes to confirm forced-terminate. It all worked fairly well, but I was never quite happy that every scenario was covered in a robust way so after a few days I decided to let it sit.

Part of the reason I suspended work on that is, if I recall correctly, the Cnrtl-C handling wasn't worked out very well. I thought the Cntrl-C would be the way to break out of a busy Octave core command. At the time, the only way to terminate Octave core was to send an "exit" command. Of course, if Octave is busy processing, it may be a long time, if ever, before the process finishes and the "exit" is handled. So, I guess I was waiting to see how the SIGABRT evolved before putting a close-but-not-quite exit routine in the GUI.

Dan Sebald <sebald>
Thu 31 Aug 2017 08:48:14 PM UTC, comment #3:

I checked in this changeset on default:

http://hg.savannah.gnu.org/hgweb/octave/rev/fb9b024a6041

It seems to fix the problem for me.

Maybe I should have made this change on stable? Hmm.

John W. Eaton <jwe>
Project Administrator
Thu 16 Mar 2017 07:09:22 PM UTC, comment #2:

This issue occurs with Qt 5.8.0 because the error message

QThread: Destroyed while thread is still running

is now emitted by qFail() instead of qWarning(). It means that now Qt issues a SIGABRT that is caught by octave.

The following patch works for me:

Anonymous
Wed 08 Feb 2017 08:59:00 PM UTC, comment #1:

The error message from Qt appears in the backtrace you attached:

> QThread: Destroyed while thread is still running


This indicates that the main_thread QThread object was destroyed but the thread had not yet exited. A full backtrace of all running threads at the time of the error might be helpful ("thread apply all backtrace" in gdb).

I am unable to reproduce on Debian with Qt 5.7.1

Mike Miller <mtmiller>
Project Administrator
Thu 02 Feb 2017 06:35:42 PM UTC, original submission:

octave-gui crashes on exit on Archlinux systems. Happens (every time) on two different machines of mine, one with Qt 5.7.1 and the other one with Qt 5.8.0. Attached are backtrace and valgrind logs.

Elvis Angelaccio <eang>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #39708:  thread-all-backtrace.txt added by eang (7KiB - text/plain - Backtrace from all active threads)
file #39647:  octave-backtrace.txt added by eang (3KiB - text/plain - gdb backtrace and valgrind log)
file #39648:  octave-valgrind.txt added by eang (207KiB - text/plain - gdb backtrace and valgrind log)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by sebald (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by eang (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 15 Sep 2017 03:26:46 PM UTCrik5StatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 31 Aug 2017 08:48:14 PM UTCjweStatusNeed Info=>Ready For Test
    Thu 09 Feb 2017 10:14:51 AM UTCeangAttached File-=>Added thread-all-backtrace.txt, #39708
    Wed 08 Feb 2017 08:59:00 PM UTCmtmillerStatusNone=>Need Info
    Thu 02 Feb 2017 06:35:42 PM UTCeangAttached File-=>Added octave-backtrace.txt, #39647
      Attached File-=>Added octave-valgrind.txt, #39648

    Back to the top


    Powered by Savane 3.1-cleanup1