Dear Sébastien

Sorry, I could not find a dbg package for octave.

Running octave-cli with gdb I get the transcript below.

The command used (bug1) is a script included below and also attached as a file.

I then tried to run with octave in gui mode (I normally don't use it), and in 
this case segfault

does not occur.

With octave-cli, segfault happens on amd64 bullseye (all systems I have tried), 
but I think

(will confirm later) on bookworm and archlinux the problem disappears. Stack 
corruption

might still occur but is somehow masked.

In case you are curious, the P_6x6 matrix is from the 802.11ac (wifi) standard.

Thank you,

Leonardo



--------------------- bash session ---------------------------
bash> octave --eval "version -blas"
ans = OpenBLAS (config: OpenBLAS 0.3.13 NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY 
Haswell MAX_THREADS=64)



bash> \gdb octave-cli

GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git

Copyright (C) 2021 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

Type "show copying" and "show warranty" for details.

This GDB was configured as "x86_64-linux-gnu".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<https://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

    <http://www.gnu.org/software/gdb/documentation/>.



For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from octave-cli...

(No debugging symbols found in octave-cli)

(gdb) r --no-init-file

Starting program: /usr/bin/octave-cli --no-init-file

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

[New Thread 0x7fffee50a700 (LWP 19721)]

[New Thread 0x7fffedd09700 (LWP 19722)]

[New Thread 0x7fffe5508700 (LWP 19723)]

[New Thread 0x7fffd4d07700 (LWP 19724)]

[New Thread 0x7fffcc506700 (LWP 19725)]

[New Thread 0x7fffcbd05700 (LWP 19726)]

[New Thread 0x7fffbb504700 (LWP 19727)]

[New Thread 0x7fffb2906700 (LWP 19728)]

GNU Octave, version 6.2.0

Copyright (C) 2021 The Octave Project Developers.

This is free software; see the source code for copying conditions.

There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or

FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.



Octave was configured for "x86_64-pc-linux-gnu".



Additional information about Octave is available at https://www.octave.org.



Please contribute if you find this software useful.

For more information, visit https://www.octave.org/get-involved.html



Read https://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type 'news'.



octave:1> bug1



Thread 1 "octave-cli" received signal SIGSEGV, Segmentation fault.

0x00007fff9964b62d in ?? ()

(gdb) bt

#0  0x00007fff9964b62d in ?? ()

#1  0x0000000000000202 in ?? ()

#2  0x00007fff9964b724 in ?? ()

#3  0x00007fffb2094d58 in ?? () from 
/usr/lib/jvm/default-java/lib/server/libjvm.so

#4  0x00007fffffff66f0 in ?? ()

#5  0x00007fffb1cd3c6a in ?? () from 
/usr/lib/jvm/default-java/lib/server/libjvm.so

Backtrace stopped: previous frame inner to this frame (corrupt stack?)

quit)

A debugging session is active.



        Inferior 1 [process 19716] will be killed.



Quit anyway? (y or n) y



--------------------- end of bash session ---------------------------



--------------------- bug1 script ---------------------------


pkg load io
w = exp(-1i*pi/3);
P_6x6 = [ 1, -1,    1,    1,    1,    -1; ...
           1, -w,    w^2,  w^3,  w^4,  -w^5; ...
           1, -w^2,  w^4,  w^6,  w^8,  -w^10; ...
           1, -w^3,  w^6,  w^9,  w^12, -w^15; ...
           1, -w^4,  w^8,  w^12, w^16, -w^20; ...
           1, -w^5,  w^10, w^15, w^20, -w^25];
Pi_6x6 = inv(P_6x6); % causes segfault
D_6x6  = det(P_6x6); % causes segfault



--------------------- end of bug1 script ---------------------------



-----Original Message-----
From: Sébastien Villemot <sebast...@debian.org>
Sent: Monday, December 20, 2021 2:52 PM
To: Leonardo Vainsencher <leonardo.vainsenc...@dspg.com>; 998...@bugs.debian.org
Subject: Re: Bug#998842: octave: inv() causes segfault if io package pre-loaded



Control: tags -1 + moreinfo



Dear Leonardo,



Le lundi 08 novembre 2021 à 13:18 +0000, Leonardo Vainsencher a écrit :

The following code causes 'Segmentation fault' when inv() is

executed:

%%% begin octave code %%%

 pkg load io

 w = exp(-1i*pi/3);

 P_6x6 = [ 1, -1,    1,    1,    1,    -1; ...

           1, -w,    w^2,  w^3,  w^4,  -w^5; ...

           1, -w^2,  w^4,  w^6,  w^8,  -w^10; ...

           1, -w^3,  w^6,  w^9,  w^12, -w^15; ...

           1, -w^4,  w^8,  w^12, w^16, -w^20; ...

           1, -w^5,  w^10, w^15, w^20, -w^25];

 Pi_6x6 = inv(P_6x6); % causes segfault

 D_6x6  = det(P_6x6); % causes segfault

%%% end octave code %%%



Octave run command (bash):

 octave-cli --no-init-file



If `pkg load io` is omitted, no segfault occurs (io package is a dependency of 
communications). If pinv() is used instead of inv(), segfault does not occur 
either.



Thanks for your bug report.



I am unable to replicate your problem. This code works fine for me (tested on 
both Debian stable and unstable).



Can you provide a full backtrace of the segfault? For instructions,

see:

https://wiki.debian.org/HowToGetABacktrace



Can you also report the output of the following command:

octave --eval "version -blas"



Best,



--

⢀⣴⠾⠻⢶⣦⠀  Sébastien Villemot

⣾⠁⢠⠒⠀⣿⡁  Debian Developer

⢿⡄⠘⠷⠚⠋⠀  https://sebastien.villemot.name ⠈⠳⣄⠀⠀⠀⠀  https://www.debian.org


Attachment: bug1.m
Description: bug1.m

Reply via email to