bugGNU Octave - Bugs: bug #57424, Running the test suite on Windows...

 
 

bug #57424: Running the test suite on Windows crashes Octave

Submitter:  Markus Mützel <mmuetzel>
Submitted:  Mon 16 Dec 2019 11:17:52 AM UTC
   
 
Category:  Test Suite Severity:  5 - Blocker
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
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 18 Dec 2019 06:10:05 PM UTC, comment #12: 

I opened the following bug report about the publish.tst failure: bug #57439.

John W. Eaton <jwe>
Group administrator
Wed 18 Dec 2019 10:47:08 AM UTC, comment #11: 

Markus: I spent some time looking at the publish.tst failure yesterday.  I'll open a separate bug report about it.  The real problems there are related to handles to private functions and load-path caching/searching.

John W. Eaton <jwe>
Group administrator
Wed 18 Dec 2019 06:44:05 AM UTC, comment #10: 
Markus Mützel <mmuetzel>
Group administrator
Tue 17 Dec 2019 06:25:05 PM UTC, comment #9: 

After the last change (hg id 56d94f86a659), publish.tst now fails:

>>>>> processing D:\Repositories\Octave\test\octave-2019-12-17-18-16-w64\mingw64\share\octave\6.0.0\etc\tests\fixed\publish\publish.tst
***** test
 visibility = get (0, "defaultfigurevisible");
 toolkit = graphics_toolkit ();
 unwind_protect
   if (! __have_feature__ ("QT_OFFSCREEN")
       || ! strcmp (graphics_toolkit (), "qt"))
     try
       graphics_toolkit ("gnuplot");
     catch
       ## The system doesn't support gnuplot for drawing hidden
       ## figures.  Just return and have test marked as passing.
       return;
     end_try_catch
   endif
   set (0, "defaultfigurevisible", "off");

   scripts = dir ("test_script*.m");
   tmpDir = tempname ();
   mkdir (tmpDir);
   opts.outputDir = tmpDir;
   for fname = {scripts.name}
     publish (fname{1}, opts);
   endfor
   confirm_recursive_rmdir (false, "local");
   rmdir (tmpDir, "s");
 unwind_protect_cleanup
   set (0, "defaultfigurevisible", visibility);
   graphics_toolkit (toolkit);
 end_unwind_protect
!!!!! test failed
__imwrite__: invalid function handle
***** test
 visibility = get (0, "defaultfigurevisible");
 toolkit = graphics_toolkit ();
 unwind_protect
   if (! __have_feature__ ("QT_OFFSCREEN")
       || ! strcmp (graphics_toolkit (), "qt"))
     try
       graphics_toolkit ("gnuplot");
     catch
       ## The system doesn't support gnuplot for drawing hidden
       ## figures.  Just return and have test marked as passing.
       return;
     end_try_catch
   endif
   set (0, "defaultfigurevisible", "off");
   ## Create temporary directory
   tmpDir = tempname ();
   mkdir (tmpDir);
   opts.outputDir = tmpDir;
   ## Call publish and grabcode
   publish ("test_script.m", opts);
   str1 = fileread ("test_script.m");
   str2 = grabcode (fullfile (tmpDir, "test_script.html"));
   confirm_recursive_rmdir (false, "local");
   rmdir (tmpDir, "s");
   ## Canonicalize strings
   str1 = strjoin (deblank (strsplit (str1, "\n")), "\n");
   str2 = strjoin (deblank (strsplit (str2, "\n")), "\n");
   assert (hash ("md5", str1), hash ("md5", str2));
 unwind_protect_cleanup
   set (0, "defaultfigurevisible", visibility);
   graphics_toolkit (toolkit);
 end_unwind_protect
!!!!! test failed
__imwrite__: invalid function handle


It still passed yesterday.
Re-open or create a new bug?

Markus Mützel <mmuetzel>
Group administrator
Tue 17 Dec 2019 12:11:04 PM UTC, comment #8: 

So it looks like we can close this report and open another one for other failing tests.
I pushed the patch that removes all references to osmesa here:

http://hg.savannah.gnu.org/hgweb/octave/rev/56d94f86a659


Pantxo Diribarne <pantxo>
Group Member
Mon 16 Dec 2019 10:18:44 PM UTC, comment #7: 

The pusblish.tst now passes (still without Pantxo's patch).

Unfortunately, Octave now exits unexpectedly a few tests later with ...\tests\fixed\sparse.tst being the last line in fntests.log.

I'll try and get a backtrace probably later this week.

Markus Mützel <mmuetzel>
Group administrator
Mon 16 Dec 2019 08:01:56 PM UTC, comment #6: 

I pushed a fix for bug #57245.  Can you verify whether this bug is also fixed now?

I agree we should remove all references to OSMESA.

John W. Eaton <jwe>
Group administrator
Mon 16 Dec 2019 07:47:40 PM UTC, comment #5: 

@Philip: A "clear all" or "clear functions" after initializing the gnuplot graphics toolkit and then trying to access it again triggers the bug.
Might be that swapping the parts moved the "clear" to after the last access of the gnuplot toolkit. But I haven't checked actually.

Markus Mützel <mmuetzel>
Group administrator
Mon 16 Dec 2019 07:39:31 PM UTC, comment #4: 

Interestingly, as IIRC JohnD discovered, swapping stanzas L.62-72 and L.73-83 in __run-test_suite__.m avoids the crash.
Just curious, does that fit into the conclusions so far as regards the cause of the crash?

Philip Nienhuis <philipnienhuis>
Group Member
Mon 16 Dec 2019 04:56:25 PM UTC, comment #3: 

Yes this looks like the same bug as bug #57245. In any event, the condition for running this test should be


- if (ispc () || ! __have_feature__ ("OSMESA"))
+ if (! __have_feature__ ("QT_OFFSCREEN")
+     || ! strcmp (graphics_toolkit (), "qt"))


AFAIK recent versions of Octave don't support OSMESA anymore. Here is an excerpt of the NEWS file for Octave 5.1



- The OSMesa library is no longer used.  To print invisible figures
  when using OpenGL graphics, the Qt `QOFFSCREENSURFACE` feature must be
  available and you must use the qt graphics toolkit.


I attached a patch meant to remove leftover references to osmesa.
To make myself clear, I am not suggesting to workaround this bug with the patch but rather to apply the patch once this bug is properly fixed.


(file #48071)

Pantxo Diribarne <pantxo>
Group Member
Mon 16 Dec 2019 02:04:00 PM UTC, comment #2: 

Looking at the backtrace and the code snippet from the test Kai shows in comment #1, this might be caused by bug #57245 (or it is a different bug revolving around the gnuplot graphics toolkit).

Markus Mützel <mmuetzel>
Group administrator
Mon 16 Dec 2019 01:34:04 PM UTC, comment #1: 

For the mentioned tests, there seems to be a workaround for MS Windows:

https://hg.savannah.gnu.org/hgweb/octave/file/e79999c5d782/test/publish/publish.tst#l25


if (ispc () || ! __have_feature__ ("OSMESA"))
     try
       graphics_toolkit ("gnuplot");
     catch
       ## The system doesn't support OSMESA or gnuplot for drawing hidden
       ## figures.  Just return and have test marked as passing.
       return;
     end_try_catch
   endif


Does your build support "gnuplot"?  As on MS Windows "ispc()" should always be "1", it might only be triggered if "gnuplot" is available and used.  What happens, if you comment out the respective line.  Which "graphics_toolkit()" is in use and what are the "available_graphic_toolskits()"?

Is "gnuplot" in combination with


set (0, "defaultfigurevisible", "off");


working on MS Windows?

Finally, does this happen with CLI as well, or where do you run the test-suite?

End of the week I can look into this issue myself.

Kai Torben Ohlhus <siko1056>
Group Member
Mon 16 Dec 2019 11:17:52 AM UTC, original submission:  

Since some time now, Octave is exiting unexpectedly when executing _run_test_suite_.
The last reported test in the log file is ...\fixed\publish\publish.tst.

See also this messages on the mailing list:
https://octave.1599824.n4.nabble.com/Heisenbug-on-Windows-with-current-dev-sources-tt4692433.html
https://octave.1599824.n4.nabble.com/Crash-while-running-the-test-suite-on-Windows-at-publish-tst-td4693125.html

I haven't found a report yet. But this should be fixed for the next major release.

Markus Mützel <mmuetzel>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #48071:  no_osmesa.patch added by pantxo (5KiB - text/x-patch)

 

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 pantxo (Updated the item)
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by mmuetzel (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-17 pantxo StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2019-12-16 pantxo Attached File- Added no_osmesa.patch, #48071
    2019-12-16 siko1056 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code