bugGNU Octave - Bugs: bug #53355, "octave" is not the same...

 
 

bug #53355: "octave" is not the same as "octave --no-gui"

Submitter:  Dan Sebald <sebald>
Submitted:  Fri 16 Mar 2018 05:06:21 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 17 Mar 2018 10:01:07 AM UTC, comment #9: 

Seems to work here, linux Mint with Cinnamon.  Thanks.

Dan Sebald <sebald>
Fri 16 Mar 2018 07:31:26 PM UTC, comment #8: 

The remaining issue of a backgrounded octave not initializing its terminal settings correctly is bug #53364.

Mike Miller <mtmiller>
Group Member
Fri 16 Mar 2018 07:14:53 PM UTC, comment #7: 

I think I've fixed this on the stable branch with

https://hg.savannah.gnu.org/hgweb/octave/rev/91331c76d9c1

Not yet merged to default.

The problem was that the "octave" wrapper executable was still following the old rules about the GUI being on by default. It now works correctly for me, in that the behavior is the same between "octave" and "octave --no-gui".

Thanks for the test case!

Mike Miller <mtmiller>
Group Member
Fri 16 Mar 2018 06:18:49 PM UTC, comment #6: 

I think there are two bugs here.

When I run "octave --no-gui" I get one set of behavior, both with 4.0 or 4.2, and with the default branch. This seems to put Octave in the background, and when I press Enter a few times in my shell, bash tells me that it has been put in the Stopped state. When I "fg" it, the Octave prompt is shown, but echo has been disabled, maybe other weird terminal initialization things.

The second bug is when I run "octave" with the new default behavior of not running the GUI. In this mode, I get what Dan is seeing, that Octave and the shell seem to be sharing the terminal. Characters are randomly sent to either bash or Octave. With a few tries, I can get "fg" to work, and get back to the state of what I describe in the first paragraph.

Mike Miller <mtmiller>
Group Member
Fri 16 Mar 2018 05:42:10 PM UTC, comment #5: 

Here, with older versions and the latest tip I'm getting


[1]+  Stopped                 octave --no-gui



[1]+  Stopped                 /usr/local/src/octave/octave-temporary/tip/run-octave --no-gui


after the initial command-line "splash screen" info, but maybe this is indeterminate and system dependent.

Dan Sebald <sebald>
Fri 16 Mar 2018 05:26:34 PM UTC, comment #4: 

I tested here.  Other CLI apps can be put in the background and brought back to the foreground.  (I wasn't aware of "fg".)  However, the two I tested (mail and python) both issue


[1]+  Stopped                 mail

[2]+  Stopped                 python


leaving a normal operating bash command line.  Basically, it's different than what I'm used to with "run-octave --no-gui &".

Dan Sebald <sebald>
Fri 16 Mar 2018 05:16:48 PM UTC, comment #3: 

I don't think this is completely new bad behavior.  There were already similar problems with 4.2.x using either "octave-cli &" or "octave --no-gui &".

John W. Eaton <jwe>
Group administrator
Fri 16 Mar 2018 05:14:03 PM UTC, comment #2: 

Carlo is correct that starting Octave in the background does not create zombie processes, at least in the traditional meaning of "zombie process" in the Unix world.

But Dan is also correct the octave wrapper program is not behaving properly when it is put in the background by the shell.

The behavior of octave-cli is closer to correct.  When octave-cli is started in the background, the shell shows that it is stopped and then it doesn't accept input.  But when you bring it back to the foreground, the terminal is not reinitialized properly.

So some work is needed to make both of these behave properly.

John W. Eaton <jwe>
Group administrator
Fri 16 Mar 2018 10:20:35 AM UTC, comment #1: 

that's not really a zombie process, it's just running in the background, but you can simply bring it back to foreground by typing "fg" at the prompt.

That seems the standard behaviour of any CLI interpreter in UNIX, I'm not sure why you think that is a problem ...

c.


Carlo de Falco <cdf>
Group Member
Fri 16 Mar 2018 05:06:21 AM UTC, original submission:  

The changesets that introduced the --gui option no longer account for the possibility of the user inadvertently running as a background process.  It leaves an active zombie or daemon-like process running in the background that affects future bash input:


linux@ ~/octave/bug/53276 $ /usr/local/src/octave/octave-temporary/tip/run-octave &
[2] 19552
linux@ ~/octave/bug/53276 $ GNU Octave, version 4.5.0+
Copyright (C) 2016 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 "x86_64-pc-linux-gnu".

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>
linux@ ~/octave/bug/53276 $
linux@ ~/octave/bug/53276 $ octave:1>
linux@ ~/octave/bug/53276 $


Since the meaning of "run-octave" without option has changed from launching the GUI--in which case "run-octave &" would be fine--this now has to be addressed, likely in a way that the "run-octave --no-gui &" behaves:


linux@ ~ $ /usr/local/src/octave/octave-temporary/tip/run-octave --no-gui &
[1] 17013
sebald@moorglade ~ $ GNU Octave, version 4.3.0+
Copyright (C) 2016 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 "x86_64-pc-linux-gnu".

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'.



[1]+  Stopped                 /usr/local/src/octave/octave-temporary/tip/run-octave --no-gui
linux@ ~ $


at which point there may be a zombie still, but it stopped and not affecting future keyboard input.

Dan Sebald <sebald>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by sebald (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-20 mtmiller StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2018-03-16 mtmiller Summaryoctave wrapper program "octave" is not the same as "octave --no-gui"
    2018-03-16 mtmiller Open/ClosedClosed Open
    2018-03-16 mtmiller StatusNone Ready For Test
        Open/ClosedOpen Closed
        SummaryNo option (since --gui option change) leaves daemon-like processes when run as background &amp; octave wrapper program

    Back to the top

    Powered by Savane 3.14-0608.
    Corresponding source code