bugGNU Octave - Bugs: bug #47554, logm(rand(i)) : i>=130 gives...

 
 

bug #47554: logm(rand(i)) : i>=130 gives segfault on mxe-octave 64bit (openblas issue)

Submitter:  Tatsuro MATSUOKA <tmacchant>
Submitted:  Mon 28 Mar 2016 05:24:20 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  lostbard
Originator Name:  Tatsuro MATUOKA Open/Closed:  * Closed
Release:  * 4.0.1 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 30 Mar 2016 11:14:04 PM UTC, comment #10: 

marking as fixed and closed

John Donoghue <lostbard>
Group Member
Wed 30 Mar 2016 02:45:04 AM UTC, comment #9: 

I pulled and update mxe-octave directory and confirmed the changeset was attached.
I executed "make" again and made a new installer.
This time log(rand(i)) (i>=130) works as expected.

Thanks!

Tatsuro MATSUOKA <tmacchant>
Tue 29 Mar 2016 05:01:35 PM UTC, comment #8: 

Appears to be fixed in openblas 0.2.16.

Pushed update to mxe-octave to new openblas.
http://hg.octave.org/mxe-octave/rev/14e8109c191a


John Donoghue <lostbard>
Group Member
Tue 29 Mar 2016 01:42:16 PM UTC, comment #7: 

Im trying openblas 0.2.16 that was just recently released to see if it is a problem still in it.


John Donoghue <lostbard>
Group Member
Tue 29 Mar 2016 01:35:45 PM UTC, comment #6: 

I see the same issue on a w64 build I created  with --enable-windows-64 --enable-64


John Donoghue <lostbard>
Group Member
Mon 28 Mar 2016 07:53:40 PM UTC, comment #5: 

That makes sense. Thanks Mike.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 28 Mar 2016 04:35:32 PM UTC, comment #4: 

Tatsuro is saying that the OpenBLAS that is cross-built for Windows in the mxe-octave build process (on his Ubuntu 14.04) shows this error, but one built natively for Windows fixes the error when the dll is dropped in as a replacement.

Mike Miller <mtmiller>
Group Member
Mon 28 Mar 2016 04:30:30 PM UTC, comment #3: 

Sorry, I am missing something:
How does the OpenBLAS on your Ubuntu system relate to the OpenBLAS cross-built in mxe-octave ?

FYI libopenblas.dll in my 64bit builds has md5sum:
00bbbbef17dad42ae517e9c2ff26ba70  libopenblas.dll

Philip Nienhuis <philipnienhuis>
Group Member
Mon 28 Mar 2016 09:40:09 AM UTC, comment #2: 

The PC used to build mxe-octave have a dual core Athlon-X2 (64 bit).

Looking into openblas.mk in mxe-octave system, the option DYNAMIC_ARCH=1 is used.

Therefore it should work but built OpenBLAS on my Ubuntu-14.04 PC is buggy.
It seem not to be the issue of mxe-octave but the OpenBLAS.

Tatsuro MATSUOKA <tmacchant>
Mon 28 Mar 2016 08:59:52 AM UTC, comment #1: 

It works fine with the 32-bit version (using openblas) from ftp.gnu.org:

>> tic; a = logm (rand(1000)); toc
Elapsed time is 53.309 seconds.


(where cpu time in task manager = 39 seconds).
I saw only 25% CPU load, I'm sure I had openblas selected at install time. Indeed libblas.dll's size in /bin equals that of libopenblas.dll)
I have no home-built 64-bit 4.0.1 version, I'll see if I can make one today and try this again.

With a development 4.1.0+ cross-build, also invoking openblas, I cannot reproduce it here either. It was configured with:
--enable-windows-64 --enable-devel-tools --enable-binary-packages --enable-octave=default
and an octave-4.1.0+ "make dist" based on 6187f1d2ca13 "zip.m: Restore processing of wildcards  ...."
Octave-4.1.0+ seems a bit faster:

>> tic; a = logm (rand(1000)); toc
Elapsed time is 44.1555 seconds.


(CPU time according to Task Manager 30 secs. CPU load 75 % for a while)

Philip Nienhuis <philipnienhuis>
Group Member
Mon 28 Mar 2016 05:24:20 AM UTC, original submission:  

A windows binary octave-4.0.1 64bit (using --enable-windows64),
I have met Segmentation fault using openblas built by mxe-octave system.


>> logm(rand(129));
>> logm(rand(130));
BLAS : Bad memory unallocation! :    3  000000000060CEF0
panic: Segmentation violation -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete


gdb back traces are:


(gdb) bt
#0  0x0000000001076950 in libopenblas!dcopy_ () from E:\octave\octave-4.0.1-w64\bin\libblas.dll
#1  0x00000000619282c6 in liblapack!dlahr2_ () from E:\octave\octave-4.0.1-w64\bin\liblapack.dll
#2  0x00000000618e78bb in liblapack!dgehrd_ () from E:\octave\octave-4.0.1-w64\bin\liblapack.dll
#3  0x00000000618dfcbb in liblapack!dgeesx_ () from E:\octave\octave-4.0.1-w64\bin\liblapack.dll
#4  0x0000000069454b05 in liboctave-3!_ZN5SCHUR4initERK6MatrixRKSsb () from E:\octave\octave-4.0.1-w64\bin\liboctave-3.dll
#5  0x000000006af39fb0 in liboctinterp-3!_Z6FschurRK17octave_value_listi () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#6  0x000000006aa7d745 in liboctinterp-3!_ZN14octave_builtin17do_multi_index_opEiRK17octave_value_listPKSt4listI13octave_lvalueSaIS4_EE () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#7  0x000000006aa7bd97 in liboctinterp-3!_ZN14octave_builtin7subsrefERKSsRKSt4listI17octave_value_listSaIS3_EEiPKS2_I13octave_lvalueSaIS8_EE () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#8  0x000000006ab31a1d in liboctinterp-3!_ZN12octave_value7subsrefERKSsRKSt4listI17octave_value_listSaIS3_EEiPKS2_I13octave_lvalueSaIS8_EE () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#9  0x000000006ab7fe63 in liboctinterp-3!_ZN21tree_index_expression6rvalueEiPKSt4listI13octave_lvalueSaIS1_EE () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#10 0x000000006ab5a598 in liboctinterp-3!_ZN21tree_multi_assignment6rvalueEi () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#11 0x000000006ab5896f in liboctinterp-3!_ZN21tree_multi_assignment7rvalue1Ei () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#12 0x000000006ab6d60b in liboctinterp-3!_ZN14tree_evaluator15visit_statementER14tree_statement () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#13 0x000000006ab6cbea in liboctinterp-3!_ZN14tree_evaluator20visit_statement_listER19tree_statement_list () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#14 0x000000006ab2f033 in liboctinterp-3!_ZN20octave_user_function17do_multi_index_opEiRK17octave_value_listPKSt4listI13octave_lvalueSaIS4_EE () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#15 0x000000006ab2a9e5 in liboctinterp-3!_ZN20octave_user_function7subsrefERKSsRKSt4listI17octave_value_listSaIS3_EEiPKS2_I13octave_lvalueSaIS8_EE () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#16 0x000000006ab2ab5e in liboctinterp-3!_ZN20octave_user_function7subsrefERKSsRKSt4listI17octave_value_listSaIS3_EEi () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#17 0x000000006ab319a4 in liboctinterp-3!_ZN12octave_value7subsrefERKSsRKSt4listI17octave_value_listSaIS3_EEi () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#18 0x000000006ab31a3d in liboctinterp-3!_ZN12octave_value7subsrefERKSsRKSt4listI17octave_value_listSaIS3_EEiPKS2_I13octave_lvalueSaIS8_EE () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#19 0x000000006ab7fe63 in liboctinterp-3!_ZN21tree_index_expression6rvalueEiPKSt4listI13octave_lvalueSaIS1_EE () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#20 0x000000006ab80cae in liboctinterp-3!_ZN21tree_index_expression7rvalue1Ei () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#21 0x000000006ab6d60b in liboctinterp-3!_ZN14tree_evaluator15visit_statementER14tree_statement () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#22 0x000000006ab6cbea in liboctinterp-3!_ZN14tree_evaluator20visit_statement_listER19tree_statement_list () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#23 0x000000006afbc6f5 in liboctinterp-3!_Z9main_loopv () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#24 0x000000006a6c4796 in octave_execute_interpreter () from E:\octave\octave-4.0.1-w64\bin\liboctinterp-3.dll
#25 0x00000000004013e8 in ?? ()
#26 0x000000000040151b in ?? ()
#27 0x00007ff82cdd8102 in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\system32\kernel32.dll
#28 0x00007ff82d89c5b4 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#29 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)


If I use refblas (mxe) or openblas built on windows, this issue does not occur.


Tatsuro MATSUOKA <tmacchant>

 

(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 lostbard (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by tmacchant (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-30 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2016-03-29 lostbard StatusNone Ready For Test
        Assigned toNone lostbard

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code