bugGNU Octave - Bugs: bug #35140, Segfault executing Voronoi...

 
 

bug #35140: Segfault executing Voronoi functions

Submitter:  Melvin Robinson <melrobin>
Submitted:  Wed 21 Dec 2011 03:26:14 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Melvin Robinson Open/Closed:  * Closed
Release:  * 3.4.3 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 22 Dec 2011 06:43:16 AM UTC, comment #23: 

Compiled with qhull-2009 and this seems to have worked.  There are a few problems with make check that I need to work through, but things seem to be working.  Would you please close this?

Melvin Robinson <melrobin>
Wed 21 Dec 2011 02:30:02 PM UTC, comment #22: 

I don't think qhull uses lapack or blas, so I don't expect that to have any effect.

There are known problems with using qhull 2011 with Octave.  See for example the discussions about qhull here:

https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2011-December/subject.html

I would expect qhull 2009 to work with Octave 3.4.x.

John W. Eaton <jwe>
Group administrator
Wed 21 Dec 2011 11:54:39 AM UTC, comment #21: 

Just for grins I built this against a standard version of BLAS and LAPACK to see if it made any difference, but make check still fails multiple tests related to qhull.

Melvin Robinson <melrobin>
Wed 21 Dec 2011 09:00:46 AM UTC, comment #20: 

Compiled 3.5.90 against Qhull 2003 and indeed the install completes; however, there are still segfaults in these routines.  Below is the end of make check:

 scripts/geometry/convhull.m ............................ PASS    0/1    FAIL 1
  scripts/geometry/delaunay.m ............................ PASS    0/2    FAIL 2
  scripts/geometry/delaunay3.m ........................... PASS    0/1    FAIL 1
  scripts/geometry/dsearch.m ............................. PASS    2/2
  scripts/geometry/dsearchn.m ............................ PASS    6/6
  scripts/geometry/griddata.m ............................ PASS    1/1
  scripts/geometry/griddata3.m ........................... PASS    0/2    FAIL 2
  scripts/geometry/griddatan.m ........................... PASS    2/2
  scripts/geometry/inpolygon.m ........................... PASS    6/6
  scripts/geometry/rectint.m ............................. PASS    9/9
  scripts/geometry/tsearchn.m ............................ PASS    5/5
  scripts/geometry/voronoi.m .............................panic: Segmentation fault -- stopping myself...
make[1]: * [check] Segmentation fault
make[1]: Leaving directory `/home/melrobin/octave_test/octave-3.5.90/test'
make: * [check] Error 2

Here the delaunay routines fail and this might cause the segfaults in voronoi.

Melvin Robinson <melrobin>
Wed 21 Dec 2011 07:54:08 AM UTC, comment #19: 

This still crashed after installing the RPMs from Qhull 2003 with stable sources.  I'm going to try 3.5.90 next.

Melvin Robinson <melrobin>
Wed 21 Dec 2011 07:12:46 AM UTC, comment #18: 

Strangely I had the package Fedora package installed as well as the library I built.  I am going to remove both, and see which one causes the segfault to go away.

That will be a good step to report to qhull too.

Melvin Robinson <melrobin>
Wed 21 Dec 2011 06:39:16 AM UTC, comment #17: 

It might be simpler to just install the qhull
that comes with FC16:
qhull-2003.1.-15.fc15.x86_64 and
qhull-devel-2003.1-15.fc15.x86_64

That is what my system is using.  If you
really need the newer qhull installed then
someone involved in qhull development may be
able to help.

Michael Godfrey <godfrey>
Group Member
Wed 21 Dec 2011 05:53:47 AM UTC, comment #16: 

I built it with qhull 2011.2.  I don't know how to go farther. :(  I do not mind rebuilding if you think that will help.

Melvin Robinson <melrobin>
Wed 21 Dec 2011 05:47:27 AM UTC, comment #15: 

It crashes on this line:
t = _delaunayn_ (p, varargin{:});

This does not seem to be a .m file.

With the 'convhull' parameter, Octave crashes at this line:
i = convhulln ([x(:), y(:)]);


Melvin Robinson <melrobin>
Wed 21 Dec 2011 05:44:35 AM UTC, comment #14: 

What version of the qhull library do you have?

John W. Eaton <jwe>
Group administrator
Wed 21 Dec 2011 05:39:49 AM UTC, comment #13: 

Got it to crash with the parameters 'griddata','voronoi', 'triplot','convhull', and 'delaunay'.  Yes, I'm going to step through these and see where it crashes. 

I'm using gnuplot 4.4.3

Melvin Robinson <melrobin>
Wed 21 Dec 2011 05:37:53 AM UTC, comment #12: 

geometryimages.m is a .m file in
doc/interpreter.  So, you can put in debug
statements in it and see where it dies.
The "unrecognised plot requested" suggests
something wrong in the plot code.  This
function selects gnuplot as the graphics_toolkit.
So, what version of gnuplot are you using?

Anyhow stepping through geometryimages.m
should get closer to the specific problem.


Michael Godfrey <godfrey>
Group Member
Wed 21 Dec 2011 05:26:22 AM UTC, comment #11: 

I just tried from the console.  No X11 warning, but still a segfault no matter what 2nd parameter is passed.  geometryimages is interpreting the first parameter though:

[melrobin@melrobin interpreter]$ ../../run-octave -f -q -H -p . --eval "geometryimages('Nothing', 'l');"
warning: X11 DISPLAY environment variable not set
error: unrecognized plot requested
error: called from:
error:   /home/melrobin/octave_test/octave-3.5.90/doc/interpreter/geometryimages.m at line 99, column 5

What libraries does the geometryimages script use?  Maybe I could rebuild those and build Octave again.

Melvin Robinson <melrobin>
Wed 21 Dec 2011 05:20:47 AM UTC, comment #10: 

The X11 warning may be relevant.  I sshed
into the system on which I just tested,
but I do not get any X11 warning.  Do you
have X11 forwarding turned on?

If you run under gdb is the segfault in X11 code?

Michael Godfrey <godfrey>
Group Member
Wed 21 Dec 2011 05:17:54 AM UTC, comment #9: 

Yes, it failed on that one too.  I can get segfaults for anything being the second parameter:

[melrobin@melrobin interpreter]$ ../../run-octave -f -q -H -p . --eval "geometryimages('voronoi', 'l');"
warning: X11 DISPLAY environment variable not set
panic: Segmentation fault -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete
Segmentation fault

The X11 stuff comes up because I've just SSH'd in.

Melvin Robinson <melrobin>
Wed 21 Dec 2011 05:17:17 AM UTC, comment #8: 

I had not seen your comment #5 when I just posted,
but trying 3.5.90+ is a good idea before spending
more debug effort. 

Michael Godfrey <godfrey>
Group Member
Wed 21 Dec 2011 05:13:35 AM UTC, comment #7: 

Oh, the current stable branch is 3.5.90+
You might try that.
It is the current 3.6 release candidate.

Michael Godfrey <godfrey>
Group Member
Wed 21 Dec 2011 05:10:57 AM UTC, comment #6: 

How can I dig into it even further?  I have been trying to "capture" the segfault with gdb, but no luck.  The octave-core file does not give much useful information.

Melvin Robinson <melrobin>
Wed 21 Dec 2011 05:07:32 AM UTC, comment #5: 

Also runs correctly on FC16 x86-64 for me.
This could be an X11-related problem.
My FC16 is a pretty standard system.
Had to install epstool-3.05-1.i386.rpm,
but even before that, no segfault.

Michael Godfrey <godfrey>
Group Member
Wed 21 Dec 2011 04:00:55 AM UTC, comment #4: 

And, please correct my comment below:
I was testing on Fedora 14 x86-64.

Compiling on Fedora 16 now.

Michael Godfrey <godfrey>
Group Member
Wed 21 Dec 2011 03:49:45 AM UTC, comment #3: 

X86_64.

Melvin Robinson <melrobin>
Wed 21 Dec 2011 03:49:03 AM UTC, comment #2: 

Yes, I'm sorry about that, I am running on Fedora 16.

Melvin Robinson <melrobin>
Wed 21 Dec 2011 03:47:37 AM UTC, comment #1: 

This works correctly in current stable version and
Fedora 16 x86_64.

It would help to know the system you were using when
this error occurred.

Michael Godfrey <godfrey>
Group Member
Wed 21 Dec 2011 03:26:14 AM UTC, original submission:  

I can produce a segfault on versions 3.4.3, 3.5.90 and Mercurial sources of Octave.  Here is the command that is run from the installation:

make[3]: Entering directory `/home/melrobin/octave/current_octave/octave/doc/interpreter'
../../run-octave -f -q -H -p . --eval "geometryimages ('voronoi', 'eps');"

Here are the results:
panic: Segmentation fault -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete
make[3]: * [voronoi.eps] Segmentation fault

This was for a build on Mercurial sources, but I am able to reproduce this for 3.4.3 and 3.5.90:
octave:1> version
ans = 3.4.3
octave:2> geometryimages ('voronoi', 'eps');
warning: X11 DISPLAY environment variable not set
panic: Segmentation fault -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete
Segmentation fault
[melrobin@melrobin interpreter]$

and

octave:1> version
ans = 3.5.90
octave:2> geometryimages('voronoi','eps');
panic: Segmentation fault -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete
Segmentation fault
[melrobin@melrobin interpreter]$

The octave-core file seems pretty empty save for a variable called ans.

I can try to troubleshoot some more, but don't really know where to go.  It seems to be raised as a bug because the problem occurs in multiple versions.




Melvin Robinson <melrobin>

 

(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 rik5 (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by melrobin (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-12-22 rik5 StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code