bugGNU Octave - Bugs: bug #59044, octave session terminates...

 
 

bug #59044: octave session terminates prematurely inside of tmux

Submitter:  None
Submitted:  Mon 31 Aug 2020 03:48:48 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  None Assigned to:  None
Originator Name:  Calvin Eiber Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.2
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 28 Sep 2020 07:04:58 PM UTC, comment #2: 

No answer in almost a month.
Closing report.

If you are able to reproduce in a newer version of Octave, please comment here again or open a new report.

Markus Mützel <mmuetzel>
Group administrator
Mon 31 Aug 2020 07:57:59 AM UTC, comment #1: 

Octave 4.2.2 is old and no longer supported.
Can you try to replicate the issue with Octave 5.2 or the release candidate for the next version (currently Octave 6.0.90)?

Markus Mützel <mmuetzel>
Group administrator
Mon 31 Aug 2020 03:48:48 AM UTC, original submission:  

Hello all,


I'm running GNU Octave, version 4.2.2 on a remote server (Ubuntu 4.15.0-76-generic).

I've encountered the problem that octave sessions inside of tmux get prematurely terminated when I close the ssh connection (I'm using mobaXterm v20.3 as my ssh client). This is true whether I invoke octave with or without the gui, or whether I try to eval my code using $ octave -i my_script.m or $ octave -i -eval 'my_script args'

I can escape my tmux session using ^b,d and return to it and the process isn't interrupted, but if I close mobaXterm (inside or outside the tmux session) my currently running octave function is terminated with no explanation or output.

observed output (example, this all worked fine):


home/octave $ tmux new -s 'tmux-octave-ses'
     [tmux] $ ls
'my_script.m'

     [tmux] $ octave --eval 'my_script 1'
... wait a couple seconds

     [tmux] $ ls
'my_script.m' 'it-worked (1).mat'

     [tmux] $ octave  -i --eval 'my_script 11'
... (exit tmux session using ^b,d)

home/octave $ tmux ls
tmux-octave-ses:  1 windows (created Mon Aug 31 02:25:51 2020) [110x51]

... wait about 12 seconds
home/octave $ ls
'my_script.m' 'it-worked (1).mat' 'it-worked (11).mat'
home/octave $ tmux attach -t tmux-octave-ses

   [tmux]
GNU Octave, version 4.2.2
Copyright (C) 2018 John W. Eaton and others.
This is free software; see the source code for copying conditions. ... warrenty, yadda yadda, ...
For information about changes from previous versions, type 'news'.

 [11 / 11 s] ...  done!


So that all works fine, but if I for instance reset my ssh connection:


     [tmux] $ octave --eval 'my_script 100'
... wait a couple seconds

GNU Octave, version 4.2.2
Copyright (C) 2018 John W. Eaton and others.
This is free software; see the source code for copying conditions. ... warrenty, yadda yadda, ...
For information about changes from previous versions, type 'news'.
 [2 / 100 s] ...

... (exit tmux session using ^b,d)
... (and then close mobaXterm)


And then reconnect:

home/octave $ tmux ls
tmux-octave-ses: 1 windows (created Mon Aug 31 02:25:51 2020) [110x51]
home/octave $ tmux attach -t tmux-octave-ses

GNU Octave, version 4.2.2
Copyright (C) 2018 John W. Eaton and others.
This is free software; see the source code for copying conditions. ... warrenty, yadda yadda, ...
For information about changes from previous versions, type 'news'.
 [14 / 100 s] ...
    [tmux] $


So the octave process is obviously killed when I close the ssh connection, which tmux is supposed to prevent.

Interestingly, if I'm polite and close the connection using $ exit (outside of tmux), it waits for octave to finish before exiting (which again is not the desired behavior, as the code I intend to run has runtimes of hours to days). 

IS this an issue with the command-line instruction I'm passing to octave? if so, what are the appropriate flags to preserve the octave instance beyond the duration of the ssh connection?


demo example script:

function my_script(tDelay_s)
if nargin == 0, tDelay_s = 10; end
if ischar(tDelay_s), tDelay_s = str2double(tDelay_s); end
s = '';

for tt = 1 : tDelay_s

  fprintf('%s',char(8*ones(size(s))))
  s = sprintf(' [%d / %d s] ... ', tt, tDelay_s);
  fprintf('%s',s)

  pause(1)
end
fprintf('done!\n')
save(sprintf('it-worked (%d).mat',tt), 'tt')
return









tmux version is 2.6-3ubuntu0.2 amd64

Anonymous

 

(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 mmuetzel (Posted a comment)
  • -email is unavailable- added by None (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-09-28 mmuetzel StatusNeed Info None
        Open/ClosedOpen Closed
    2020-08-31 mmuetzel CategoryPerformance Interpreter
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code