bugGNU Octave - Bugs: bug #40044, Octave is unresponsive after...

 
 

bug #40044: Octave is unresponsive after gnuplot crashes with segfault

Submitted by:  None
Submitted on:  Mon 16 Sep 2013 05:10:27 PM UTC  
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Confirmed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
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.

 

( Jump to the original submission)

Thu 08 Mar 2018 09:39:40 PM UTC, comment #6:

The test script causes gnuplot to crash. Octave doesn't know that's happened, so it continues on. In _gnuplot_draw_axes_, there is a call to

In _gnuplot_get_var_, Octave creates a fifo file and sends a request to gnuplot that is never answered.

I'm not sure how to detect this situation and work around it. The development version of Octave is not responding to Ctrl-C in this case because it is stuck in a system call:

and the interrupt signal just sets a flag that the interpreter checks. So we don't break out of the system call.

This is happening here:

Since the test code would probably work if gnuplot didn't fail, and because both the fltk and qt plotting widgets work with this code, I'm lowering the priority to normal.

John W. Eaton <jwe>
Project Administrator
Mon 08 Aug 2016 03:10:48 AM UTC, comment #5:

With dev and gnuplot 5.0.3 i see no plot window and get:

line 0: out of memory for pm3d_plot->quadrangles

line 0: out of memory for pm3d_plot->quadrangles

      • Error in `/usr/bin/gnuplot': double free or corruption (out): 0x0000561967f31de0 ***

======= Backtrace: =========
/lib64/libc.so.6(+0x755fb)[0x7f74007bf5fb]
/lib64/libc.so.6(+0x7dd4a)[0x7f74007c7d4a]
/lib64/libc.so.6(cfree+0x4c)[0x7f74007cb2ac]
/usr/bin/gnuplot(+0x8bfd5)[0x561966068fd5]
/usr/bin/gnuplot(+0x4bf60)[0x561966028f60]
/usr/bin/gnuplot(+0x8aae9)[0x561966067ae9]
/usr/bin/gnuplot(+0x2ccc9)[0x561966009cc9]
/usr/bin/gnuplot(+0x2ce3d)[0x561966009e3d]
/usr/bin/gnuplot(+0x1cd1c)[0x561965ff9d1c]
/lib64/libc.so.6(__libc_start_main+0xf1)[0x7f740076a731]
/usr/bin/gnuplot(+0x1d059)[0x561965ffa059]
======= Memory map: ========
561965fdd000-561966148000 r-xp 00000000 08:02 1442514 /usr/bin/gnuplot-qt
(etc...)

With octave 4.0.3 I get
line 0: out of memory for pm3d_plot->quadrangles

line 0: out of memory for pm3d_plot->quadrangles
and no memory dump and I see a gnuplot window with
5 plots (partially rendered).

Dmitri.

on a screen

Dmitri A. Sergatskov <dasergatskov>
Mon 08 Aug 2016 01:26:08 AM UTC, comment #4:

Confirmed that bug is still present with gnuplot 5.0.1 and the development branch from 8/7/16.

Rik <rik5>
Project Administrator
Mon 02 Feb 2015 04:46:42 AM UTC, comment #3:

Confirmed that the bug is still present with gnuplot version 4.6.6 and a development branch from 2/1/2015.

Rik <rik5>
Project Administrator
Mon 16 Sep 2013 06:53:44 PM UTC, comment #2:

It's probably a bug in gnuplot, but I can't confirm 100%. In testing with Octave versions 3.2.4, 3.4.3, 3.6.4, and development versions I can always reliably produce a crash. My version of gnuplot is 4.6.2.

Interestingly, If I vary the final plot I don't get a crash. I tried a 2-D plot [plot (1:10)], and the other 3-D plots that didn't use plot3 (mesh, surf, surfc).

Also, if I throw a line

after the first subplot, just to create the axes, then everything works.

Rik <rik5>
Project Administrator
Mon 16 Sep 2013 05:39:08 PM UTC, comment #1:

I can confirm this. At first blush, this might be a bug in gnuplot, not in Octave. As a workaround, you can try using Octave's own native plotting system. Before doing any plot commands, do

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Mon 16 Sep 2013 05:10:27 PM UTC, original submission:

I am trying to plot 8 graphs in one plot with Ubuntu 12.04.3 LTS but I allways get the error:
+verbose+

      • glibc detected *** gnuplot: double free or corruption (fasttop): 0x08d72878 ***

======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x75ee2)[0xb6d3fee2]
/lib/i386-linux-gnu/libc.so.6(realloc+0x21a)[0xb6d4452a]
gnuplot[0x8058e61]
gnuplot[0x80b9a69]
gnuplot[0x807e88d]
gnuplot[0x80b6916]
gnuplot[0x8062207]
gnuplot[0x806245f]
gnuplot[0x8058079]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xb6ce34d3]
gnuplot[0x8058ced]
======= Memory map: ========
-verbose-
(full message: see file below)
It also occured in other versions (I've tried 3.2.? (ubuntu standard and 3.4.?)

A minimal example is given below (try.m); if I remove one or more of the subplots, the error doesn't occur anymore

I hope, this is all information required.
Best regards,
Hubert

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29150:  error.dat added by None (14KiB - application/x-ns-proxy-autoconfig)
file #29151:  try.m added by None (395B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by None (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.

     

     

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-08 jwe Severity4 - Important => 3 - Normal
        Summary*** glibc detected *** gnuplot: double free or corruption (fasttop): 0x08d72878 *** => Octave is unresponsive after gnuplot crashes with segfault
    2016-07-01 rik5 Severity3 - Normal => 4 - Important
    2013-10-27 mtmiller CategoryPlotting => Plotting with gnuplot
        Release3.6.3 => dev
    2013-09-16 jordigh StatusNone => Confirmed
    2013-09-16 None Attached File- => Added error.dat, #29150
        Attached File- => Added try.m, #29151

    Back to the top


    Powered by Savane 3.3