bugGNU Octave - Bugs: bug #49729, octave in background dies when...

 
 

bug #49729: octave in background dies when disconnecting ssh

Submitted by:  Muhali <muhali>
Submitted on:  Mon 28 Nov 2016 09:57:03 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 13 Jun 2017 05:19:09 PM UTC, comment #5:

Yes, Octave 3.8 runs octave-cli by default, Octave 4.0 and newer runs octave-gui by default (if an X server is available). Octave-gui runs as a QApplication, and Qt's event loop probably doesn't like it when the X server connection disappears from underneath it.

If you want Octave to not rely on a persistent active X server, use "octave -W" or "octave --no-gui-libs" or "octave-cli".

Mike Miller <mtmiller>
Project Administrator
Tue 13 Jun 2017 12:46:23 PM UTC, comment #4:

I got a little closer now. The reason is X11 forwarding. Apparently, older versions such as octave-3.8 do not crash when the X-channel is closed. Newer versions (>= 4.0) do:

%> ssh -X some.host
%some.host> nohup octave --no-gui foo.m &
%some.host> logout
%> ssh -X some.host
%some.host> tail -1 nohup.out
%some.host> panic: Segmentation fault -- stopping myself...

Note that the logout hangs and has to be interrupted with "^C". By using "-x" instead nothing hangs and no segfault occurs.

Why does the newer octave depend on the X11 channel, and is it intended?

Muhali <muhali>
Thu 15 Dec 2016 10:31:26 AM UTC, comment #3:

just noticed that I get the same behaviour on a non-systemd machine. When starting instead a looping bash script similar to the octave script here, I can log off and on without interrupting that script. Not so for the octave script, so something peculiar with octave is indeed happening.

Muhali <muhali>
Tue 29 Nov 2016 07:35:56 AM UTC, comment #2:

yeah, systemd was the culprit.

The debian bug report suggests to set

KillUserProcesses=no

in /etc/systemd/logind.conf, which didn't work for me. But replacing nohup with the systemd-run command did work.

Thanks!

Muhali <muhali>
Mon 28 Nov 2016 10:31:51 PM UTC, comment #1:

Are you sure this is an Octave bug? Are you able to run any other processes under nohup and verify that they are still running after logging out? Could this be related to a systemd update (see e.g. https://bugs.debian.org/825394)?

Mike Miller <mtmiller>
Project Administrator
Mon 28 Nov 2016 09:57:03 PM UTC, original submission:

I often put octave jobs in the background and then disconnect the ssh session. This used to work fine.

Since a few weeks, e.g. with the current dev version, this no longer works. For example, when starting the script

via

%> nohup octave --no-gui -f foo.m &

and then disconnect and reconnect the ssh session, octave has died on the remote machine. With more complicated scripts, I even get a segfault.

Muhali <muhali>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by muhali (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 29 Nov 2016 04:58:59 PM UTCmtmillerStatusNeed Info=>Invalid
      Open/ClosedOpen=>Closed
    Mon 28 Nov 2016 10:31:51 PM UTCmtmillerStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1