bugGNU Octave - Bugs: bug #45577, Solving systems using complex NaN...

 
 

bug #45577: Solving systems using complex NaN causes crash

Submitted by:  Lachlan Andrew <lachlan>
Submitted on:  Sun 19 Jul 2015 10:31:18 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: LachlanOpen/Closed: Closed
Release: devOperating System: GNU/Linux

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 Jump to the original submission)

Fri 15 Jul 2016 11:56:24 PM UTC, comment #6:

It works for me too. Closing as fixed.

Lachlan Andrew <lachlan>
Project Member
Fri 15 Jul 2016 10:58:25 PM UTC, comment #5:

@Lachlan: Can you re-verify that

still causes a segfault? Use anything after

It works for me.

Rik <rik5>
Project Administrator
Fri 08 Jul 2016 01:19:09 PM UTC, comment #4:

I'm re-opening this because calculating

still crashes, with coeff given in the original post.

I'll copy Rik's changes into fCMatrix.cc soon.

Lachlan Andrew <lachlan>
Project Member
Sat 10 Oct 2015 11:48:52 PM UTC, comment #3:

The problem seems not to be in Octave, but rather in the ZGETRF function from lapack. The code which calls ZGETRF is in liboctave/array/CMatrix.cc. In Octave we use the exact same code sequence for double matrices, single matrices, single complex matrices, and double complex matrices. There are only slight changes to reflect the different inputs. Thus, for single complex matrices the routine is CGETRF and for regular double matrices it is DGETRF. None of the other routines produce segfaults if the input matrix has a row or column of NaN values--it is only double complex matrices which call ZGETRF.

Because it is only one routine, I have worked around the issue in Octave. The norm of the matrix is calculated before the LU decomposition and if the norm is NaN that is an indication not to call lapack and, instead, issue a warning.

Interestingly, in searching through CMatrix.cc for calls to ZGETRF I found three other instances: finverse, determinant, rcond. Sure enough, trying to calculate the determinant or rcond of the problem matrix in this bug report produces a segfault. So I patched those too.

Since this is a serious crash of the interpreter I fixed the problem on the stable branch. See this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/ffc6cdcd02c5).

Closing report.

Rik <rik5>
Project Administrator
Sat 12 Sep 2015 09:59:57 PM UTC, comment #2:

This is not quite the same as bug #45484, that bug is about BLAS errors that are caught correctly on Linux. This error causes a crash even on Linux, probably a different error. It looks like a memory double-free error in a destructor:

Mike Miller <mtmiller>
Project Administrator
Wed 22 Jul 2015 04:57:31 PM UTC, comment #1:

Marking as a duplicate of bug #45484.

Rik <rik5>
Project Administrator
Sun 19 Jul 2015 10:31:18 AM UTC, original submission:

The following code causes Octave 4.0.0 to crash:

The diagnostics are:

I'm not sure if the issue is related to the following error. The following code
gives the error

Lachlan Andrew <lachlan>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #34464:  octave-workspace added by lachlan (422B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by lachlan (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 12 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 15 Jul 2016 11:56:24 PM UTClachlanStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Fri 15 Jul 2016 10:58:25 PM UTCrik5StatusFixed=>Ready For Test
    Fri 08 Jul 2016 01:19:09 PM UTClachlanOpen/ClosedClosed=>Open
      Release4.0.0=>dev
    Sat 10 Oct 2015 11:48:52 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Sat 12 Sep 2015 10:00:42 PM UTCmtmillerDependenciesRemoved dependancy to bugs #45484=>-
    Sat 12 Sep 2015 09:59:57 PM UTCmtmillerStatusDuplicate=>Confirmed
    Wed 22 Jul 2015 04:57:31 PM UTCrik5StatusNone=>Duplicate
    Wed 22 Jul 2015 04:56:58 PM UTCrik5Dependencies-=>Depends on bugs #45484
    Sun 19 Jul 2015 10:31:18 AM UTClachlanAttached File-=>Added octave-workspace, #34464

    Back to the top


    Powered by Savane 3.1-cleanup1