bugGNU Octave - Bugs: bug #53521, GUI freezes and requires SIGKILL...

 
 

bug #53521: GUI freezes and requires SIGKILL upon large pasted input

Submitted by:  Adrian <adaerr>
Submitted on:  Fri 30 Mar 2018 10:09:01 AM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Unexpected Error
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.3.90Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 30 Mar 2018 09:08:31 PM UTC, comment #3:

Interesting find. Nice work.

Dan Sebald <sebald>
Fri 30 Mar 2018 08:57:43 PM UTC, comment #2:

Thanks Dan for the additional observations. I was indeed talking about pasting into the Command Window, sorry for forgetting that detail.

I can also confirm that pasting large buffers into a terminal running "octave --no-gui" does not cause octave to hang.
It works nicely in an xterm, but I also observe the occasional glitches described by Dan when using an rxvt with a screen session. Here, these glitches are not merely problems echoing the pasted input. For example I see glitches such as

To test if all instructions are executed I slightly changed the test script to that generated by

It shows that some instructions are skipped or mangled. Indeed an example where all lines from the start to "N+=4000;" were pasted results in 3987 'digested' lines (from the command counter in the prompt) and a wrong final value for N:

As far as I tested, this non-gui problem seems terminal-related (glitches do not seem to occur when pasting into an xterm). I do not know if any of this helps with the GUI freeze that this bug report is about, though.

My computer is running an up-to-date Debian/testing GNU/Linux distribution.

Adrian <adaerr>
Fri 30 Mar 2018 05:30:17 PM UTC, comment #1:

Confirmed on linux, Mint, Cinnamon. We are talking pasting into the Command Window. Additional information is that if the file name extension is .m rather than .txt it can be run as a script and there are no problems--runs fast, N is the final value in the list. When Octave is run in command-line mode, cut-and-past of the large text buffer works. However, there is something peculiar in the fact "glitches" in the character stream appear. For example, every once in a while there is:

or

or

and so on. I don't understand what is happening there, but perhaps that same kind of thing is happening when pasted to the terminal emulator (Command Line) in the GUI but such activity in the GUI causes a hang.

The only other small detail I notice is that when running the GUI and pasting, the climb in CPU usage doesn't appear to happen immediately. There is a slight lag of about five to ten seconds (taking into consideration the filtering operation of my system monitor).

Dan Sebald <sebald>
Fri 30 Mar 2018 10:09:01 AM UTC, original submission:

If I past large input (10k-20k characters) into the octave GUI, CPU usage goes up for a few seconds and then drops to zero. No output is shown and the GUI becomes completely unresponsive, including to Ctrl-C. It does not redraw its window content either.

To reproduce:
1) Generate a large input, e.g.
for n in {1..10000} ; do
echo "N=${n};" >>octavepastetest.txt
done
2) Open that file in an editor, select 3500 lines or more and paste into octave-gui

The exact quantity of input that makes the GUI freeze does not seem to be reproducible. I observed freezes for as little as 340 pasted lines / 12000chars (though of a more complex script than the above example). With the above test some 3500 lines / 27000 chars freeze the GUI reliably on my box, while <2500 lines are processed without problem.

Once the GUI is frozen, sending the octave-gui process the TERM signal may result in either of the following:
- no effect
- termination of both the octave and the octave-gui processes ("octave exited with signal 6") if Ctrl-C had not been pressed; this seems to be the same behaviour (and signal) as when a normally responsive GUI is terminated via SIGTERM.
- GUI prints part of the pasted input, and becomes functional again (if Ctrl-C had been pressed before sending the TERM signal).

Adrian <adaerr>

 

(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 (Updated the item)
  • -unavailable- added by sebald (Posted a comment)
  • -unavailable- added by adaerr (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 10 Apr 2018 02:50:12 AM UTCmtmillerStatusNone=>Confirmed
      Release4.2.2=>4.3.90
    Tue 10 Apr 2018 02:50:11 AM UTCmtmillerItem GroupSegfault, Bus Error, etc.=>Unexpected Error

    Back to the top


    Powered by Savane 3.1-cleanup1