bugGNU Octave - Bugs: bug #55047, Running the test suite causes...

 
 

bug #55047: Running the test suite causes Octave to segfault on Windows

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Sun 18 Nov 2018 02:02:38 PM UTC  
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Microsoft Windows

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 17 Jan 2019 04:10:36 AM UTC, comment #20:

Oops, I forgot that mlock doesn't take a function name but must be called from inside the function you wish to lock.

Closing this report as fixed.

John W. Eaton <jwe>
Project Administrator
Wed 16 Jan 2019 10:52:31 PM UTC, comment #19:

JWE:
Your fix works, nice, thanks.

As to mlock:

(with a cross-build from yesterday evening)

Philip Nienhuis <philipnienhuis>
Project Member
Wed 16 Jan 2019 09:33:43 PM UTC, comment #18:

JWE wrote:

As a quick test, you can also take one of the builds you have that shows the
crash and do

and see if that works. It should be essentially the same as my change.

Avinoam Kalma <avinoam>
Project Member
Wed 16 Jan 2019 09:23:38 PM UTC, comment #17:

As a quick test, you can also take one of the builds you have that shows the crash and do

John W. Eaton <jwe>
Project Administrator
Wed 16 Jan 2019 08:59:15 PM UTC, comment #16:

Thanks,
I'll give it a try. Will take some time (make dist, cross-build, install ...

Philip Nienhuis <philipnienhuis>
Project Member
Wed 16 Jan 2019 08:44:14 PM UTC, comment #15:

My test shows that locking _init_qt_ also avoids the crash, so I pushed this changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/8953dd219f4c

John W. Eaton <jwe>
Project Administrator
Wed 16 Jan 2019 05:08:23 PM UTC, comment #14:

Philip: For testing, I backed out the following changesets along with a few updates to account for conflicts due to other unrelated changes since these were made:

332be8be16eb
4b661d535ddb
553278e5aac7
14e844f1459a

But now I'm wondering whether we just need to mlock _init_qt_.oct when _init_qt_ is called. We already do that for _init_gnuplot_ and _init_fltk_.

I'll try that before pushing a changeset.

See also bug #55254.

John W. Eaton <jwe>
Project Administrator
Wed 16 Jan 2019 05:00:43 PM UTC, comment #13:

@JWE: is that this one: 25931:332be8be16eb ?

According to the log that cset dates from Sep 28, while a Windows binary from Oct 14 still runs __run_test_suite__ fine.
Depends a bit on when that cset was actually pushed.
I tested another binary from Sep 30, it doesn't segfault on __run_test_suite__ either.

But maybe there's some other magic involved.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 16 Jan 2019 04:39:31 PM UTC, comment #12:

It looks like dynamically loading the Qt graphics code on Windows is the problem. I should have a changeset ready sometime later today.

John W. Eaton <jwe>
Project Administrator
Wed 16 Jan 2019 03:23:07 PM UTC, comment #11:

@Markus comment #9:
No, sorry, I usually build Windows binaries after merging default with my local adaptations so I expect the HGID to be that of those merges. I usually do that in the evenings (Central Eur. time).
I'll try to check if I can pinpoint it a little more precisely based om m-file csets (-changes) around Nov. 14.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 16 Jan 2019 03:00:53 PM UTC, comment #10:

A simple script which demonstrates a crash which may be related:

Avinoam Kalma <avinoam>
Project Member
Wed 16 Jan 2019 08:08:46 AM UTC, comment #9:

@Philip: Do know know which hg id the October 14 build was based on?

Markus Mützel <mmuetzel>
Project Member
Wed 16 Jan 2019 07:44:28 AM UTC, comment #8:

@jwe, comment #4: This cset also causes Octave to crash (or hang, I don't remember) when building the doc on Mac OS (see http://octave.1599824.n4.nabble.com/building-on-macOS-td4689952.html). So if you think it is possible to back it out until we understand what is going wrong, then it would probably be good to do that.

Pantxo Diribarne <pantxo>
Project Member
Tue 15 Jan 2019 09:25:18 PM UTC, comment #7:

Based on my archive of Windows binaries, all I can see is that the change happened between Oct 14 (still good) and Oct 25 (segfaults).

IIRC the long interval between these builds is due to a vacation :-)

Philip Nienhuis <philipnienhuis>
Project Member
Tue 15 Jan 2019 06:20:56 PM UTC, comment #6:

The 2 fails are because I am using fltk:

I also see the same regression on Linux. So all in all: Everything looks good (apart from this crash).

Markus Mützel <mmuetzel>
Project Member
Tue 15 Jan 2019 06:17:39 PM UTC, comment #5:

To be honest, I am just guessing as to what is causing the crash.
But it looks like this might "solve" the issue. Running the test suite with fltk does NOT segfault for me:

(I see 2 fails and 1 regression.)

Markus Mützel <mmuetzel>
Project Member
Tue 15 Jan 2019 05:53:39 PM UTC, comment #4:

Markus, thanks for doing the bisecting.

Ah, so I'd bet that the first bad changeset is the one in which I made Octave dynamically load the qt graphics toolkit. If undoing that change does fix the problem, then maybe I should just remove it for the release?

John W. Eaton <jwe>
Project Administrator
Sun 13 Jan 2019 07:15:49 PM UTC, comment #3:

Octave is still crashing at the fixed tests for me with hg id 8c3e727c44b5.

Is this a blocker for Octave 5?

What can I do to help solve this?

Attached is the backtrace with gdb of that segmentation fault. The top of that backtrace:

So together with the window of changesets, this could be an issue with how we initialize the qt graphics toolkit.

The last test appearing in the command window is that for bug #55308.

(file #45956)

Markus Mützel <mmuetzel>
Project Member
Fri 30 Nov 2018 10:08:56 PM UTC, comment #2:

Just as a info point, if I change runtestsuit to run the fixed tests before the integrated tests, it does not crash.

John Donoghue <lostbard>
Project Member
Sun 18 Nov 2018 05:00:16 PM UTC, comment #1:

On my 64-bit Windows 7 Professional box and Windows 7 Enterprise box at work, _run_test_suite_ segfaults in the fixed tests section, and fntests.log always ends with the colormap test.

Insofar it is consistent on just my boxes and ends elsewhere on other people's boxes I can't say. What might matter there is that I have several binary patches in my cross-builds (h5read, uitable, matrix right division, shortcut keys for variable editor).

The individual tests run fine (cd-ing to the fixed test dir and running them one by one (using "test <blabla>.tst").
I also tried running just the fixed tests:
_run_test_suite ({}, {'/path/to/fixed/tests'}, {})
and also then I saw no segfault.
Echo of screen messages attached.
Because of that I didn't pay much attention, but I agree with Markus that _run_test_suite_ shouldn't end in a segfault.

Maybe the amount of tests, or amount of some type(s) of tests, induces oversaturation of Octave's resources somewhere?

(file #45482)

Philip Nienhuis <philipnienhuis>
Project Member
Sun 18 Nov 2018 02:02:38 PM UTC, original submission:

When executing "__run_test_suite__" with Octave from the default branch on Windows causes it to crash with a segmentation fault. See the attached backtraces.
The crash happens at the fixed tests towards the end of the test suite at different tests that seem to be unrelated. But the backtraces look similar.

The last version that completes the test suite without crashing is hg id a0079f6f8c4 with 466c405ee09b and ac0b3c09c3db grafted on top.
I am having trouble cross-compiling a lot of the sub-sequent nodes for Windows. The next version I managed to cross-compile is hg id 14e844f1459a. That version already shows the segfault.

So this leaves a window of ~25 changesets starting with:

And ending with:

Markus Mützel <mmuetzel>
Project Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45956:  gdb_log_8c3e727c44b5.log added by mmuetzel (37KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by philipnienhuis
  • -email is unavailable- added by mmuetzel (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-17 jwe StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2019-01-16 jwe StatusConfirmed => Ready For Test
    2019-01-13 mmuetzel Attached File- => Added gdb_log_8c3e727c44b5.log, #45956
    2018-11-18 philipnienhuis Carbon-Copy- => Added philipnienhuis
    2018-11-18 philipnienhuis StatusNone => Confirmed
    2018-11-18 philipnienhuis Attached File- => Added one_single_and_fixed_tests_bug_55047.txt, #45482
    2018-11-18 mmuetzel Attached File- => Added gdb_log_e5acf1d94d33.txt, #45477
        Attached File- => Added gdb_log_e142769913f8.txt, #45478

    Back to the top


    Powered by Savane 3.4