bugGNU Octave - Bugs: bug #45484, mldivide/mrdivide crashes octave 4...

 
 

bug #45484: mldivide/mrdivide crashes octave 4 on windows, triggers exception on Linux and MacOSX

Submitted by:  Alois Schlögl <schloegl>
Submitted on:  Mon 06 Jul 2015 08:27:35 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: DuplicateAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.0Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 03 Dec 2015 03:52:51 AM UTC, comment #4:

This is essentially a duplicate of bug #39000: The inability to install a XERBLA handler in Windows. If we had that we could catch the exception in the Fortran code and just issue an error rather than segfaulting. Closing this report as a duplicate.

Rik <rik5>
Project Administrator
Tue 07 Jul 2015 06:35:27 PM UTC, comment #3:

@jwe: The Windows build installs OpenBLAS by default so that is what I was using on that OS. On Linux, I tried both OpenBLAS and reference BLAS with the same result.

Rik <rik5>
Project Administrator
Tue 07 Jul 2015 05:11:00 PM UTC, comment #2:

@Rik: Are you using the same BLAS on both systems?

John W. Eaton <jwe>
Project Administrator
Tue 07 Jul 2015 03:52:14 PM UTC, comment #1:

Confirmed on Windows XP Virtual Machine, Octave 4.0.0 from installer. I tried both with octave-gui.exe and octave-cli.exe and both have the problem. When running from the CLI there is at least some reporting of the problem, the same error message you saw.

I also get a pop-up error message from Windows that an instruction tried to read from memory location 0x10 which is bound to be a segmentation violation.

However, on Linux (Ubuntu 12.04), I don't get an exception. I do get a warning about the matrix being singular. In addition, the output is all zeros instead of being all NaNs.

Interestingly, if I change the matrix slightly, I can generate the same warning on Linux as well.

Rik <rik5>
Project Administrator
Mon 06 Jul 2015 08:27:35 PM UTC, original submission:

The following commands crash octave 4 on windows 7.

The binary download
https://ftp.gnu.org/gnu/octave/windows/octave-4.0.0_0-installer.exe
was used.

The same commands cause an exception on Octave 3.8.2 and 4.0 on Linux (compiled from source on debian 8), as well as in MacOSX/homebrew.

octave:1> x=repmat(NaN,4); y=x/x
warning: matrix singular to machine precision, rcond = nan

    • On entry to DLASCL parameter number 4 had an illegal value

error: exception encountered in Fortran subroutine dgelsd_
octave:1> x=repmat(NaN,4); y=xx
warning: matrix singular to machine precision, rcond = nan

    • On entry to DLASCL parameter number 4 had an illegal value

error: exception encountered in Fortran subroutine dgelsd_
octave:1> y=mldivide(x,x)
warning: matrix singular to machine precision, rcond = nan

    • On entry to DLASCL parameter number 4 had an illegal value

error: mldivide: exception encountered in Fortran subroutine dgelsd_
octave:1> y=mrdivide(x,x)
warning: matrix singular to machine precision, rcond = nan

    • On entry to DLASCL parameter number 4 had an illegal value

error: mrdivide: exception encountered in Fortran subroutine dgelsd_

and the result is undefined.

I'd expect that no exception is triggered, but a result should be a matrix of proper size as the following:

That's what Matlab is providing.

Alois

Alois Schlögl <schloegl>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by schloegl (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 03 Dec 2015 03:52:51 AM UTCrik5StatusConfirmed=>Duplicate
      Open/ClosedOpen=>Closed
    Sat 12 Sep 2015 10:00:42 PM UTCmtmillerDependenciesRemoved dependancy from bugs #45577=>-
    Sat 12 Sep 2015 09:54:22 PM UTCmtmillerDependencies-=>Depends on bugs #39000
    Tue 01 Sep 2015 03:26:12 PM UTCrik5Dependencies-=>bugs #45849 is dependent
    Wed 22 Jul 2015 04:56:58 PM UTCrik5Dependencies-=>bugs #45577 is dependent
    Tue 07 Jul 2015 03:52:14 PM UTCrik5StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1