bugGNU Octave - Bugs: bug #61834, determinant segfaults for matrix

 
 

bug #61834: determinant segfaults for matrix

Submitter:  Stephen Isard <steve>
Submitted:  Sun 16 Jan 2022 08:56:00 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Works For Me Assigned to:  None
Originator Name:  steve Open/Closed:  * Closed
Release:  * 5.2.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 17 Jan 2022 04:28:30 PM UTC, comment #9: 

It's a university departmental machine running, as I said, ubuntu 20.04 LTS.  lscpu says the cpu is an AMD Ryzen Threadripper 3970X 32-Core Processor.

Stephen Isard <steve>
Mon 17 Jan 2022 04:11:29 PM UTC, comment #8: 

Just out of curiosity: what machine is causing this trouble?

Kai Torben Ohlhus <siko1056>
Group Member
Mon 17 Jan 2022 03:35:28 PM UTC, comment #7: 

Thanks for your help.  It appears that the problem is machine-specific.  I've connected to a couple of other ubuntu 20.04 LTS machines with apparently identical octave 5.2 and blas libraries and they don't segfault.

Stephen Isard <steve>
Mon 17 Jan 2022 08:59:12 AM UTC, comment #6: 

As hint for the OP: There exist distribution independent versions of Octave for Linux:  https://wiki.octave.org/Octave_for_GNU/Linux#Distribution_independent

Snap and Flatpak are very convenient to use these days.

Kai Torben Ohlhus <siko1056>
Group Member
Mon 17 Jan 2022 04:28:43 AM UTC, comment #5: 

As suggested, this works in modern versions of Octave.  If you can't upgrade then you can try to get a BLAS library that works.

Rik <rik5>
Group administrator
Mon 17 Jan 2022 02:20:08 AM UTC, comment #4: 

I think in Ubuntu /usr/lib/x86_64-linux-gnu/libblas.so is a symlink to the default blas library (i.e. the broken openblas, I presume).
You need to figure out the actual location of the reference blas
(libblas3 or similar name). You may not have it installed.
I would guess it would be

/usr/lib/x86_64-linux-gnu/blas/libblas.so.3

So try:



LD_PRELOAD=/usr/lib/x86_64-linux-gnu/blas/libblas.so octave


I assume you should also be able to switch the default using "update-alternatives" mechanism.

Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Mon 17 Jan 2022 01:56:09 AM UTC, comment #3: 

Octave 5.2 is the latest in the long term stable ubuntu repository.  Part of "stable" is that they resist upgrading packages.  I'll report this bug.


LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libblas.so octave


still segfaults on this system.

Stephen Isard <steve>
Sun 16 Jan 2022 09:36:03 PM UTC, comment #2: 

For me, In current Octave (7.0.90 under linux) the code from comment #0 works fine, no crash.

Hartmut <hardy>
Sun 16 Jan 2022 09:02:03 PM UTC, comment #1: 

Octave 5.2 is ancient. But the most likely reason for this problem is bad blas (presumably openblas) library.
You can try to override it with reference blas by starting
octave as:



LD_PRELOAD=/usr/lib64/libblas.so octave


Adjust the path to libblas as needed for your OS.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 16 Jan 2022 08:56:00 PM UTC, original submission:  

Load the matrix "bad" from the attached badmat.oct file with

>load('badmat.oct','bad');

The command

> det(bad)

then produces a seg fault.

The matrix is approximately eye(18)/70 with a bit of noise.  The 17x17 minors of the matrix are ok.  det works and they can be inverted.

Stephen Isard <steve>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #52671:  badmat.oct added by steve (3KiB - 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 siko1056 (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by steve (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-01-17 rik5 StatusNone Works For Me
        Open/ClosedOpen Closed
    2022-01-16 steve Attached File- Added badmat.oct, #52671

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code