Le 11/10/2017 à 11:16, James Cowgill a écrit :
Control: tags -1 moreinfo

On 11/10/17 00:11,gperr...@free.fr  wrote:
[...]
How do you trigger this bug? If you need any module files, can you
attach them to the bug report.
I use no openmpt module. I can trigger the bug by running minidlnad on the command line, e.g. :

guillaume@exodus ~> /usr/sbin/minidlnad
fish: '/usr/sbin/minidlnad' terminated by signal SIGILL (Instruction illégale)

The same thing happens when I try to run the testsuite:

guillaume@exodus ~/s/libopenmpt-0.3.1+release.autotools> ./libopenmpttest
fish: './libopenmpttest' terminated by signal SIGILL (Instruction illégale)
Can you provide a GDB backtrace and the disassembly around the
instruction which causes the SIGILL?
I attached the traces from both minidlnad and the testsuite.
minidlnad does not directly depend on libopenmpt0, so presumably this is
triggered through ffmpeg. Can you run ffmpeg on some module files to see
if that also fails with SIGILL? Can you run openmpt123 on the same files?
According to https://packages.debian.org/stretch/minidlna, minidlnad depends on libavformat57, which in turn depends on libopenmpt0, so neither openmpt123 nor ffmpeg are involved in this bug, and I am not using them on any fill either.
[...]
Kernel: Linux 4.4.52-gnu (SMP w/4 CPU cores)
Where is this kernel from? I note the CPU you are using does not have an
FPU, so this could be a bug in the kernel FPU emulator. I can't remember
what fixes have gone in since 4.4 though.
This kernel is provided by the manufacturer of the board. I used this binary to update the firmware : https://github.com/gnubee-git/gnubee-git.github.io/blob/master/debian/librecmc-ramips-mt7621-gb-pc1-squashfs-sysupgrade_2017-07-22.bin. In normal operation, only the bootloader, kernel and initramfs are used. The initramfs pivots to a GNUBEE-ROOT partition if it finds one. The LibreCMC distribution is only used as a fallback.

cat /proc/version
Linux version 4.4.52-gnu (dgazineu@olimpo) (gcc version 5.4.0 (LEDE GCC 5.4.0 r20-646beea) ) #0 SMP Wed Jul 5 16:50:03 2017

I can contact dgazineu if need be.

Best regards,
--
Guillaume.
guillaume@exodus ~/s/libopenmpt-0.3.1+release.autotools> gdb ./libopenmpttest
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 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 "mipsel-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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 ./libopenmpttest...done.
(gdb) run
Starting program: 
/home/guillaume/src/libopenmpt-0.3.1+release.autotools/libopenmpttest

Program received signal SIGILL, Illegal instruction.
OpenMPT::izero (y=<optimized out>) at soundlib/Tables.cpp:817
817                     d = d + 2; ds = ds * (y*y)/(d*d);
(gdb) backtrace
#0  OpenMPT::izero (y=<optimized out>) at soundlib/Tables.cpp:817
#1  OpenMPT::getsinc (
    psinc=0x557adc38 
<OpenMPT::CResampler::InitializeTablesFromCache()::s_CachedResampler+131112>, 
beta=<optimized out>, lowpass_factor=0.96999999999999997)
    at soundlib/Tables.cpp:844
#2  0x556e82e8 in OpenMPT::CResampler::InitializeTablesFromScratch (
    this=0x5578dc10 
<OpenMPT::CResampler::InitializeTablesFromCache()::s_CachedResampler>, 
force=<optimized out>) at soundlib/Tables.cpp:942
#3  0x556e856c in OpenMPT::CResampler::CResampler (fresh_generate=true,
    this=0x5578dc10 
<OpenMPT::CResampler::InitializeTablesFromCache()::s_CachedResampler>) at 
soundlib/Resampler.h:110
#4  OpenMPT::CResampler::InitializeTablesFromCache (this=0x7ffafc30)
    at soundlib/Tables.cpp:971
#5  0x556e8df0 in OpenMPT::CResampler::InitializeTables (this=0x7ffafc30)
    at soundlib/Resampler.h:119
#6  OpenMPT::CResampler::CResampler (fresh_generate=false, this=0x7ffafc30)
    at soundlib/Resampler.h:113
#7  OpenMPT::ResampleCacheInitialzer::ResampleCacheInitialzer (
    this=<optimized out>) at soundlib/Tables.cpp:988
#8  0x5572b3a8 in __libc_csu_init ()
Backtrace stopped: frame did not save the PC
(gdb) disas /m
Dump of assembler code for function OpenMPT::getsinc(OpenMPT::SINC_TYPE*, 
double, double):
814             double s=1, ds=1, d=0;
   0x556e793c <+128>:   lw      s3,-32728(gp)
   0x556e7940 <+132>:   lw      s4,-32728(gp)
   0x556e7944 <+136>:   lw      s5,-32732(gp)
   0x556e7948 <+140>:   ldc1    $f0,24712(s3)
   0x556e794c <+144>:   mtc1    zero,$f4
   0x556e7950 <+148>:   mul.d   $f10,$f30,$f30
   0x556e795c <+160>:   mthc1   zero,$f4
   0x556e7960 <+164>:   mov.d   $f28,$f0
   0x556e7a2c <+368>:   ldc1    $f0,24712(s3)
   0x556e7a34 <+376>:   mtc1    zero,$f4
   0x556e7a3c <+384>:   mov.d   $f12,$f0
   0x556e7a40 <+388>:   mul.d   $f6,$f6,$f6
   0x556e7a44 <+392>:   mthc1   zero,$f4

815             do
816             {
817                     d = d + 2; ds = ds * (y*y)/(d*d);
   0x556e7954 <+152>:   ldc1    $f8,24728(s4)
   0x556e7964 <+168>:   add.d   $f4,$f4,$f8
   0x556e7968 <+172>:   mul.d   $f0,$f0,$f10
---Type <return> to continue, or q <return> to quit---
   0x556e796c <+176>:   mul.d   $f2,$f4,$f4
   0x556e7970 <+180>:   div.d   $f0,$f0,$f2
   0x556e7a30 <+372>:   ldc1    $f10,24728(s4)
=> 0x556e7a48 <+396>:   add.d   $f4,$f4,$f10
   0x556e7a4c <+400>:   mul.d   $f0,$f0,$f6
   0x556e7a50 <+404>:   mul.d   $f2,$f4,$f4
   0x556e7a54 <+408>:   div.d   $f0,$f0,$f2

818                     s = s + ds;
   0x556e7974 <+184>:   add.d   $f28,$f28,$f0
   0x556e7a58 <+412>:   add.d   $f12,$f12,$f0

819             } while (ds > 1E-7 * s);
   0x556e7958 <+156>:   ldc1    $f6,15560(s5)
   0x556e7978 <+188>:   mul.d   $f2,$f28,$f6
   0x556e797c <+192>:   c.lt.d  $fcc1,$f2,$f0
   0x556e7980 <+196>:   bc1t    $fcc1,0x556e7964 
<OpenMPT::getsinc(OpenMPT::SINC_TYPE*, double, double)+168>
   0x556e7984 <+200>:   lw      v0,-32732(gp)
   0x556e7988 <+204>:   move    s7,zero
   0x556e7a38 <+380>:   ldc1    $f8,15560(s5)
   0x556e7a5c <+416>:   mul.d   $f2,$f12,$f8
   0x556e7a60 <+420>:   c.lt.d  $fcc3,$f2,$f0

guillaume@exodus ~> gdb /usr/sbin/minidlnad
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 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 "mipsel-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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 /usr/sbin/minidlnad...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/sbin/minidlnad
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/mipsel-linux-gnu/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0x7625eb84 in ?? () from /usr/lib/mipsel-linux-gnu/libopenmpt.so.0
(gdb) backtrace
#0  0x7625eb84 in ?? () from /usr/lib/mipsel-linux-gnu/libopenmpt.so.0
#1  0x7625f47c in ?? () from /usr/lib/mipsel-linux-gnu/libopenmpt.so.0
#2  0x7625f620 in ?? () from /usr/lib/mipsel-linux-gnu/libopenmpt.so.0
#3  0x7625ff68 in ?? () from /usr/lib/mipsel-linux-gnu/libopenmpt.so.0
#4  0x77fdc0bc in call_init (l=<optimized out>, argc=1, argv=0x7ffffe14,
    env=0x7ffffe1c) at dl-init.c:72
#5  0x77fdc210 in call_init (env=0x7ffffe1c, argv=0x7ffffe14, argc=1,
    l=<optimized out>) at dl-init.c:30
#6  _dl_init (main_map=0x77ff8000, argc=1, argv=0x7ffffe14, env=0x7ffffe1c)
    at dl-init.c:120
#7  0x77fcad14 in _dl_start_user () from /lib/ld.so.1
Backtrace stopped: frame did not save the PC
(gdb)

Reply via email to