bugGNU Octave - Bugs: bug #49304, On SIGTERM, 'octave-workspace' is...

 
 

bug #49304: On SIGTERM, 'octave-workspace' is saved, but Octave returns to prompt rather than terminating

Submitter:  Olaf Till <i7tiol>
Submitted:  Mon 10 Oct 2016 09:13:47 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Olaf Till Open/Closed:  * Closed
Release:  * 4.2.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 16 Jan 2017 09:05:10 PM UTC, comment #6: 

Oops, part of my patch added a throw from a destructor.  I fixed that here:

http://hg.savannah.gnu.org/hgweb/octave/rev/7f91376af4d3

John W. Eaton <jwe>
Group administrator
Mon 16 Jan 2017 08:21:25 PM UTC, comment #5: 

It seems like the right thing to me.  I modified the patch to do the same in two other similar instances and pushed it to the stable branch under Olaf's ID, then merged with default.

http://hg.savannah.gnu.org/hgweb/octave/rev/7351f2c93389

Thanks.

John W. Eaton <jwe>
Group administrator
Mon 16 Jan 2017 07:18:08 PM UTC, comment #4: 

I'm adding jwe to the CC list since he re-wrote most of the exception handling mechanisms.

Rik <rik5>
Group administrator
Mon 16 Jan 2017 11:05:50 AM UTC, comment #3: 

What goes on is that the signal handler, after dumping core, calls clean_up_and_exit(), which in turn throws octave::exit_exception. But in parser::run, this exception is caught by the default catch block, which calls error() (the latter probably being the reason for returning to the prompt).

Of course I can't anticipate the planned design changes, but I think handling the newly introduced exit_exception as a special case has just been forgotten for the moment ...? So I suggest the patch in the attached changeset, which does the trick for me.

(file #39489)

Olaf Till <i7tiol>
Group Member
Wed 16 Nov 2016 06:52:23 PM UTC, comment #2: 

Confirmed with 4.2.0.  To make sure there was no interaction with Qt, or with user settings in a .octaverc file, I ran


octave-4.2.0 -f --no-gui-libs



octave:3> attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
error: unexpected exception while parsing input
octave:3>



Rik <rik5>
Group administrator
Mon 10 Oct 2016 09:18:12 AM UTC, comment #1: 

Sorry, I hit the submit button by mistake, before filling in the text. I currently have only 4.2-rc1 installed, not -rc2, but validating is simple.

If I send Octave a SIGTERM with 'kill', I'd expect it to terminate (as Octave-4.0 did), but it returns to the prompt, although octave-workspace is saved.

Ocave started with:

/usr/local/bin/octave --no-gui

GNU Octave, version 4.2.0-rc1
...
octave:1> attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
error: unexpected exception while parsing input
octave:1>

This happens after a

kill <process-number-of-octave>

from another x-terminal.

Olaf Till <i7tiol>
Group Member
Mon 10 Oct 2016 09:13:47 AM UTC, original submission:  


Olaf Till <i7tiol>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39489:  rethrow-exit_exception.cset added by i7tiol (829B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by i7tiol (Submitted 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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-16 jwe StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2017-01-16 rik5 Carbon-Copy- Added jwe
    2017-01-16 i7tiol Attached File- Added rethrow-exit_exception.cset, #39489
    2016-11-16 rik5 CategoryNone Interpreter
        StatusNone Confirmed
        Release4.2.0-rc1 4.2.0
        SummaryOn SIGTERM, 'octave-workspace' is saved, but Octave returns to prompt. On SIGTERM, 'octave-workspace' is saved, but Octave returns to prompt rather than terminating

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code