bugGNU Octave - Bugs: bug #55028, plots executed from script...

 
 

bug #55028: plots executed from script containing many plots seg fault

Submitted by:  Michael Godfrey <godfrey>
Submitted on:  Thu 15 Nov 2018 01:15:22 PM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  None Assigned to:  None
Originator Name:  Godfrey Open/Closed:  Open
Release:  dev Operating 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 11 Dec 2018 09:40:22 AM UTC, comment #5:

Some background: this has been a problem for a long
time, but was fixed at some point. I had put pause(1)
calls in the code and then about a year ago I found
that the pause was not needed. Then recently the seg
fault returned. The plots require a quite large set of
data.

I will try to isolate the problem, but I do not right
now have the time to work on it. bisecting may be useful...

One point: it seems odd that pause(0.00001) prevents
the seg fault. This pause is placed just after the previous
plot and there is considerable computing before the plot
that seg faults.

Anyhow, I will work on it more when I can.

Michael Godfrey <godfrey>
Project Member
Mon 10 Dec 2018 11:11:56 PM UTC, comment #4:

Can you make a test script? I cannot reproduce it.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 10 Dec 2018 10:29:25 PM UTC, comment #3:

I should add that the "many" plots in the title is
inaccurate. The seg fault occurs on the second of the
plots. So, 2 plots a re sufficient to cause the fault.

Michael Godfrey <godfrey>
Project Member
Mon 10 Dec 2018 10:07:01 PM UTC, comment #2:

I looked at this again using current dev.
Just running under gdb I get
essentially the same seg fault as below:

Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffcb7fe700 (LWP 27417)]
0x00007ffff5a37dd2 in QMetaObject::activate(QObject*, int, int, void**) ()
from /lib64/libQt5Core.so.5

Also, the timing window seems to be pretty small.
pause(0.00001) prevents the seg fault.

Right now I have very limited time to debug this. Sorry.

Michael Godfrey <godfrey>
Project Member
Thu 15 Nov 2018 01:36:15 PM UTC, comment #1:

Definitely timing. I placed pause(5) after each plot
and script completes normally.

I will open a new report for the fact that
pause with no argument hangs. ^C is required to continue.

Michael Godfrey <godfrey>
Project Member
Thu 15 Nov 2018 01:15:22 PM UTC, original submission:

This problem has returned in the current dev.
HG 1861e2ea0a4b

When I run a script containing many plots Octave seg faults
after only a few plots. Running under gdb I get:
++verbatim
Thread 8 "QThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffcb7fe700 (LWP 30871)]
0x00007ffff5a45dd2 in QMetaObject::activate(QObject*, int, int, void**) ()
from /lib64/libQt5Core.so.5

and bt:
#0 0x00007ffff5a45dd2 in QMetaObject::activate(QObject*, int, int, void**) ()
at /lib64/libQt5Core.so.5
#1 0x00007fffe00ea8ea in QtHandles::Figure::updateBoundingBoxHelper(void*) (data=0xe54cd0)
at libgui/graphics/Figure.cc:639
#2 0x00007ffff7785f90 in graphics_event::execute() (this=0x7fffcb7fae10)
at libinterp/corefcn/graphics.h:12891
#3 0x00007ffff7785f90 in gh_manager::do_process_events(bool) (this=0x7fffbc19a340, force=false)
at libinterp/corefcn/graphics.cc:11396
#4 0x00007ffff773a55b in gh_manager::process_events() () at libinterp/corefcn/graphics.h:12937
#5 0x00007ffff773a55b in Fdrawnow(octave_value_list const&, int) (args=...)
at libinterp/corefcn/graphics.cc:12737
#6 0x00007ffff738bbd0 in octave_builtin::call(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7fffbc0734a0, tw=..., nargout=0, args=...) at libinterp/octave-value/ov-builtin.cc:65
#7 0x00007ffff750ed6e in octave::tree_evaluator::visit_index_expression(octave::tree_index_expression&) (this=0x7fffbc003e08, idx_expr=...) at libinterp/parse-tree/pt-eval.cc:1913
#8 0x00007ffff73cc0be in octave::tree_evaluator::evaluate(octave::tree_expression*, int)
(this=this@entry=0x7fffbc003e08, expr=expr@entry=0x7fffbcd1cdd0, nargout=<optimized out>,
nargout@entry=0) at libinterp/parse-tree/pt-eval.h:302
#9 0x00007ffff750a679 in octave::tree_evaluator::visit_statement(octave::tree_statement&)
(this=0x7fffbc003e08, stmt=...) at libinterp/parse-tree/pt-eval.cc:2680

--verbatim
This may be related to the fact that after each plot I adjust the size of the bounding box.
I will try a few experiments as time permits.
My system is: Current Linux FC29: 4.18.17-300.fc29.x86_64

Michael Godfrey <godfrey>
Project Member

 

(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 dasergatskov (Posted a comment)
  • -email is unavailable- added by godfrey (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3