bugGNU Octave - Bugs: bug #64770, [MXE] Crash while running test...

 
 

bug #64770: [MXE] Crash while running test suite in lu.cc-tst & qr.cc-tst

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Thu 12 Oct 2023 09:35:20 AM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  9.1.0 Planned Release:  9.1.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 14 Oct 2023 09:52:18 AM UTC, comment #9: 

With a 64bit indexing crossbuild I see no more crashes (that is, with lu.cc-tst and qz.cc-tst. I trust the rest will behave as well).
Thanks very much mmuetzel for the fix.

Closing as fixed.

Philip Nienhuis <philipnienhuis>
Group Member
Fri 13 Oct 2023 09:41:33 AM UTC, comment #8: 

With a 32bit indexing crossbuild the bug doesn't appear, so you guess from comment #1 seems accurate.

Trying the patch will happen later this weekend (real life creeps in).

Philip Nienhuis <philipnienhuis>
Group Member
Thu 12 Oct 2023 07:16:55 PM UTC, comment #7: 

Thanks!
ATM I'm having a "32 bit indexing" dev Octave being crossbuilt, on my box that'll probably take the rest of this evening. Tomorrow or otherwise this weekend I'll have a chance to try the patch.

> (I haven't tested yet whether that actually avoids that crash though.)

Sure, but IMO your guess seems right. The SuiteSparse update is from ~2 weeks ago, could well match the time frame I expect the bug crept in.
We'll see soon enough ...

Philip Nienhuis <philipnienhuis>
Group Member
Thu 12 Oct 2023 06:39:25 PM UTC, comment #6: 

That turned out to be less complicated than I thought.

I was confused by the name of the configure flag of SuiteSparse. And I thought CMake would be able to identify if a BLAS library it found uses a given Fortran integer size. But that logic seems to be purely based on library names and doesn't work with the generic BLAS.

So, we need to let SuiteSparse know that information beforehand. The configure flag that it uses for that is ALLOW_64BIT_BLAS (which different to what the name might suggest enforces the usage of 64-bit integers in the interface to the BLAS library):
https://hg.octave.org/mxe-octave/rev/7bfdd2c60a25

Marking as ready for test.

(I haven't tested yet whether that actually avoids that crash though.)

Markus Mützel <mmuetzel>
Group administrator
Thu 12 Oct 2023 01:17:48 PM UTC, comment #5: 


> I suppose indices rather than integers?


It's all Fortran integers that are either 32-bit or 64-bit. Of course that includes those that are used for indexing.

Markus Mützel <mmuetzel>
Group administrator
Thu 12 Oct 2023 01:14:13 PM UTC, comment #4: 

OK, as I don't run Octave on machines with > 64 GB RAM anymore (I only did that occasionally in the past) I think I can do with just 32-bit Fortran indices. (I suppose indices rather than integers? AFAIK in Fortran, at least -77 where I used to be well-versed in, all variables have the same bit size.)

Or I could try to backout that SuiteSparse cset + later ones, but TBH I wouldn't feel confident doing that on my own.

In the mean time I'll await more thorough investigation by the gurus (incl. you) - this is far beyond me :-)

Thanks !

Philip Nienhuis <philipnienhuis>
Group Member
Thu 12 Oct 2023 12:46:58 PM UTC, comment #3: 

I only skimmed the CMake configure files for SuiteSparse. But it looks like they are making some wrong assumptions when it comes to detecting a BLAS library. (Not sure though.) It might be a bit more involved than just setting a configure flag.
I'll try to have a closer look and possibly prepare a patch for their build system when I come around to it.
A quicker "workaround" might be to build with 32-bit Fortran integers in the meantime.

Regarding the second question: There are no prebuilt binaries for Windows of Octave dev that are using 64-bit Fortran integers.
The closest to that (without 64-bit Fortran integers) might be the build artifacts from the GitHub-CI:
https://wiki.octave.org/Continuous_Build#GitHub_build_artifacts

Markus Mützel <mmuetzel>
Group administrator
Thu 12 Oct 2023 12:34:02 PM UTC, comment #2: 

Thanks Markus for swift reply.
How can that flag be set?
I'm happy to try it if you have a diff or cset for me (or other instruction). I could do that tonight.

About the 2nd question, are there nightly dev (cross-)builds? On octave.space I only see 8.3+ builds.

Philip Nienhuis <philipnienhuis>
Group Member
Thu 12 Oct 2023 12:06:20 PM UTC, comment #1: 

I haven't tested with 64-bit Fortran integers in a long time.
Maybe, the update to SuiteSparse 7 didn't respect that configuration correctly. If that is the case, the following commit is likely to blame:
https://hg.octave.org/mxe-octave/rev/e7e566396211

Maybe, we'll need to explicitly set `BLA_SIZEOF_INTEGER`?

Markus Mützel <mmuetzel>
Group administrator
Thu 12 Oct 2023 09:35:20 AM UTC, original submission:  

Since a few weeks, running the test suite after installation on Windows (10) Octave crashes consistently on lu.cc-tst. I've managed to capture a screenshot just before Octave disappears from the screen, see attachment.
After moving lu.cc-tst out of the way Octave crashes on qr.cc-tst. With that test Octave crashes too fast to get a screenshot.
I didn't investigate further which other tests might make Octave crash as well.

The PC's I tried on have Intel Core i5 (10 yrs old), AMD Ryzen 7 and (virtual) Xeon CPUs, so I guess hardware isn't the problem.
Qt version seems irrelevant as this started before the switch to Qt6 in mxe-octave.
I tried with OpenBlas and reference Blas, no difference either.
So it looks like some other math library (than blas) might be the culprit.

I crossbuilt Octave-9.0.0 with fortran 64bit indexing incl all of mxe-octave anew.

The last months I have only occasionally made crossbuilds so I have no exact idea when it started. Crossbuilds from before the summer run fine.

Do we have dev Octave nightly builds that I can try?

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2023-10-14 mmuetzel Fixed ReleaseNone 9.1.0
    2023-10-14 philipnienhuis StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2023-10-12 mmuetzel Planned ReleaseNone 9.1.0
    2023-10-12 mmuetzel StatusNone Ready For Test
    2023-10-12 mmuetzel SummaryCrash while running test suite in lu.cc-tst &amp; qr.cc-tst [MXE] Crash while running test suite in lu.cc-tst & qr.cc-tst
    2023-10-12 philipnienhuis Attached File- Added lu.cc-tst_Oct900.png, #55231

    Back to the top

    Powered by Savane 3.13-ee12.
    Corresponding source code