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

Submitted by:  Olaf Till <i7tiol>
Submitted on:  Mon 10 Oct 2016 09:13:47 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: FixedAssigned to: None
Originator Name: Olaf TillOpen/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)

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>
Project 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>
Project 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>
Project 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>
Project 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

Rik <rik5>
Project 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>
Project Member
Mon 10 Oct 2016 09:13:47 AM UTC, original submission:
Olaf Till <i7tiol>
Project Member

 

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

Attach File(s):
   
   
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
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by i7tiol (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 Jan 2017 08:21:25 PM UTCjweStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Mon 16 Jan 2017 07:18:08 PM UTCrik5Carbon-Copy-=>Added jwe
    Mon 16 Jan 2017 11:05:50 AM UTCi7tiolAttached File-=>Added rethrow-exit_exception.cset, #39489
    Wed 16 Nov 2016 06:52:23 PM UTCrik5CategoryNone=>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.1-cleanup1