bugGNU Octave - Bugs: bug #53553, double free or corruption in...

 
 

bug #53553: double free or corruption in Matrix::finverse

Submitter:  Kenneth Hoste <kehoste>
Submitted:  Tue 03 Apr 2018 09:10:53 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.2 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 09 Apr 2018 07:31:08 PM UTC, comment #6: 

Okay, I'm just going to close this report.  If necessary, a new one can be opened if it re-appears with 4.4.0.

Rik <rik5>
Group administrator
Mon 09 Apr 2018 07:25:32 PM UTC, comment #5: 

I will test Octave 4.4.0 (or release candidates thereof) at my earliest convenience, but I can already say that Octave 4.2.2 with the backported fix works fine, the problem no longer presents itself with that installation.

Kenneth Hoste <kehoste>
Mon 09 Apr 2018 04:43:24 PM UTC, comment #4: 

The first release candidate for 4.4.0 is probably going to come out this week.  I think it probably makes most sense for the original reporter to download that and verify that the problem has been fixed rather than debug the existing code.

Rik <rik5>
Group administrator
Wed 04 Apr 2018 03:20:13 PM UTC, comment #3: 

Sorry for not being more specific...

I'm seeing this with Octave 4.2.2 (as well as 4.2.1) built with Intel compilers version 2017.1.132 on top of Intel MKL version 2017.1.132.

Octave is configured with:


./configure --prefix=/foo --disable-docs --enable-fortran-calling-convention=gfortran --with-blas="-Wl,-Bstatic -Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -Wl,-Bdynamic" --with-lapack="-Wl,-Bstatic -Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -Wl,-Bdynamic"


Providing a test case for this is quite difficult, since we've only seen this issue with a fairly complex application (http://homepages.see.leeds.ac.uk/~earahoo/stamps).

@Mike: with the above in mind, the issue you're pointing to indeed seems very relevant.
I've ported the patch to Octave 4.2.2 and will report back my findings.

Kenneth Hoste <kehoste>
Tue 03 Apr 2018 04:43:55 PM UTC, comment #2: 

This looks very similar to bug #49235, which was fixed on Octave's default branch with this change

https://hg.savannah.gnu.org/hgweb/octave/rev/bc0aa7e18c96

and will be part of Octave 4.4.

Are you able to build Octave 4.3.0+ from the stable branch and verify that this error is fixed for you?

Mike Miller <mtmiller>
Group Member
Tue 03 Apr 2018 12:29:35 PM UTC, comment #1: 

Please provide a test case that causes this problem for you.

Also, what BLAS and Lapack libraries are you using?

What compiler and configure options?

John W. Eaton <jwe>
Group administrator
Tue 03 Apr 2018 09:10:53 AM UTC, original submission:  

Error message:


  *** Error in `/software/Octave/4.2.1-intel-2017a-fixed-lscov/bin/octave-cli': double free or corruption (!prev): 0x0000000     0018bd160 ***


some hopefully useful output from GDB below

I'm trying to get some more useful info (from an Octave compiled with -g and -fsanitize=address)


  Program received signal SIGABRT, Aborted.
  0x00002aaabb3a41f7 in raise () from /lib64/libc.so.6
  #0  0x00002aaabb3a41f7 in raise () from /lib64/libc.so.6
  #1  0x00002aaabb3a58e8 in abort () from /lib64/libc.so.6
  #2  0x00002aaabb3e3f47 in __libc_message () from /lib64/libc.so.6
  #3  0x00002aaabb3eb619 in _int_free () from /lib64/libc.so.6
  #4  0x00002aaaab0d3b9c in Array<double>::~Array() ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #5  0x00002aaaad5f227b in Matrix::finverse(MatrixType&, int&, double&, bool, bool) const ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctave.so.4
  #6  0x00002aaaad5f128e in Matrix::inverse(MatrixType&, int&, double&, bool, bool) const ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctave.so.4
  #7  0x00002aaaabe9856a in Finv(octave_value_list const&, int) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #8  0x00002aaaab67cdc7 in octave_builtin::do_multi_index_op(int, octave_value_list const&, std::__cxx11::list<octave_lvalue, std::allocator<octave_lvalue> > const*) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #9  0x00002aaaab67bdca in octave_builtin::subsref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<octave_value_list, std::allocator<octave_value_list> > const&, int, std::__cxx11::list<octave_lvalue, std::allocator<octave_lvalue> > const*) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #10 0x00002aaaab67dfdc in octave_builtin::subsref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<octave_value_list, std::allocator<octave_value_list> > const&) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #11 0x00002aaaab85fdf4 in octave_value::subsref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<octave_value_list, std::allocator<octave_value_list> > const&, int) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #12 0x00002aaaab9c3f06 in tree_index_expression::rvalue(int, std::__cxx11::list<octave_lvalue, std::allocator<octave_lvalue> > const*) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #13 0x00002aaaab9c314c in tree_index_expression::rvalue1(int) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #14 0x00002aaaab9a3530 in tree_simple_assignment::rvalue1(int) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #15 0x00002aaaab9b4706 in octave::tree_evaluator::visit_statement(tree_statement&) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #16 0x00002aaaab9b4935 in octave::tree_evaluator::visit_statement_list(tree_statement_list&) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #17 0x00002aaaab84d20f in octave_user_function::do_multi_index_op(int, octave_value_list const&, std::__cxx11::list<octave_lvalue, std::allocator<octave_lvalue> > const*) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #18 0x00002aaaab9c0090 in tree_identifier::rvalue(int, std::__cxx11::list<octave_lvalue, std::allocator<octave_lvalue> > const*) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #19 0x00002aaaab9bef1c in tree_identifier::rvalue1(int) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #20 0x00002aaaab9b4706 in octave::tree_evaluator::visit_statement(tree_statement&) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #21 0x00002aaaab9b4935 in octave::tree_evaluator::visit_statement_list(tree_statement_list&) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #22 0x00002aaaab9b4766 in octave::tree_evaluator::visit_statement(tree_statement&) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #23 0x00002aaaab9b4935 in octave::tree_evaluator::visit_statement_list(tree_statement_list&) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #24 0x00002aaaab9b4766 in octave::tree_evaluator::visit_statement(tree_statement&) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #25 0x00002aaaab9b4935 in octave::tree_evaluator::visit_statement_list(tree_statement_list&) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #26 0x00002aaaab84d20f in octave_user_function::do_multi_index_op(int, octave_value_list const&, std::__cxx11::list<octave_lvalue, std::allocator<octave_lvalue> > const*) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #27 0x00002aaaab84c0aa in octave_user_function::subsref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<octave_value_list, std::allocator<octave_value_list> > const&, int, std::__cxx11::list<octave_lvalue, std::allocator<octave_lvalue> > const*) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #28 0x00002aaaab86000c in octave_value::subsref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<octave_value_list, std::allocator<octave_value_list> > const&, int) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #29 0x00002aaaab9c3f06 in tree_index_expression::rvalue(int, std::__cxx11::list<octave_lvalue, std::allocator<octave_lvalue> > const*) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #30 0x00002aaaab991740 in eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #31 0x00002aaaabe9d983 in octave::interpreter::execute_eval_option_code(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #32 0x00002aaaabe9a90d in octave::interpreter::execute() ()
     from /software/Octave/4.2.1-intel-2017a-fixed-lscov/lib/octave/4.2.1/liboctinterp.so.4
  #33 0x0000000000401ee6 in main ()


Kenneth Hoste <kehoste>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by kehoste (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
    2018-04-09 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2018-04-03 jwe StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code