jehan Monnier
2005-Apr-20 20:21 UTC
[Speex-dev] Speex-1.1.7 seems to crash with --enable-sse (on P3/GCC-3.2)..
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <b></b>Hi,<br> <br> I also tried to build speex 1.1.7 with sse enabled on a RAS 3 (P4). <br> Both version 1.1.6 and 1.1.7 crash:<br> <br> [root@tomb root]# speexenc -n loup.wav loup.spx<br> Encoding 8000 Hz audio using narrowband mode (stereo)<br> Segmentation fault (core dumped)<br> <br> Stack trace:<br> Loaded symbols for /lib/ld-linux.so.2<br> #0 fir_mem2_10 (x=0x80552a8, _num=0x80566b4, y=0x80558ac, N=160, ord=10, _mem=0x80568cc) at xmmintrin.h:790<br> 790 {<br> (gdb) bt<br> #0 fir_mem2_10 (x=0x80552a8, _num=0x80566b4, y=0x80558ac, N=160, ord=10, _mem=0x80568cc) at xmmintrin.h:790<br> #1 0xb75dc509 in fir_mem2 (x=0x80552a8, _num=0x80566b4, y=0x80558ac, N=160, ord=0, _mem=0x1) at filters_sse.h:330<br> #2 0xb75d2ca7 in nb_encode (state=0x80551b0, vin=0xbfff88e0, bits=0xbfff9f70) at nb_celp.c:351<br> #3 0xb75dd560 in speex_encode_int (state=0x80551b0, in=0xb75e9400, bits=0xbfff9f70) at speex.c:141<br> #4 0x0804a071 in main (argc=0, argv=0xbfffafe4) at speexenc.c:688<br> <br> <br> Just a question, how to increase the "encoder/decoder" the stack size ?<br> Any other suggestion ?<br> <br> Regards<br> <br> <br> <br> <br> <!--beginarticle--> Hi,<br> <blockquote><br> First question is do you run a 2.4 kernel or later (2.2 doesn't support<br> SSE). Next thing to check, does 1.1.6 work? You may also want to<br> increase the encoder/decoder stack size just in case. Oh, and don't<br> compile with -mfpmath=sse .<br> <br> Jean-Marc<br> <br> Le mardi 08 mars 2005 à 12:02 -0500, Steve Kann a écrit :<br>><i> I tried building speex with SSE, and found that it crashes forme here:</i><br>><i> </i><br> ><i> [This is on RH=8.0]:</i><br> ><i> </i><br> ><i> # libtool gdb ./src/speexenc</i><br> ><i> GNU gdb Red Hat Linux (5.2.1-4)</i><br> ><i> [...]</i><br> ><i> This GDB was configured as "i386-redhat-linux"...</i><br> ><i> (gdb) r --rate 8000 --16bit -n /dev/zero /tmp/foo</i><br> ><i> Starting program: /usr/src/speex-1.1.7/src/.libs/lt-speexenc--rate 8000 </i><br>><i> --16bit -n /dev/zero /tmp/foo</i><br> ><i> Encoding 8000 Hz audio using narrowband mode (mono)</i><br> ><i> </i><br> ><i> Program received signal SIGSEGV, Segmentation fault.</i><br> ><i> fir_mem2_10 (x=0x8054a88, _num=0x8055e94, y=0x805508c, N=160,ord=10, </i><br>><i> _mem=0x80560ac)</i><br> ><i> at/usr/lib/gcc-lib/i386-redhat-linux/3.2/include/xmmintrin.h:774</i><br>><i> 774 {</i><br> ><i> (gdb)</i><br> ><i> (gdb) bt</i><br> ><i> #0 fir_mem2_10 (x=0x8054a88, _num=0x8055e94, y=0x805508c,N=160, </i><br>><i> ord=10, _mem=0x80560ac)</i><br> ><i> at/usr/lib/gcc-lib/i386-redhat-linux/3.2/include/xmmintrin.h:774</i><br>><i> #1 0x40020add in fir_mem2 (x=0x8054a88, _num=0x8055e94,y=0x805508c, </i><br>><i> N=160, ord=0, _mem=0x1) at filters_sse.h:330</i><br> ><i> #2 0x40016c23 in nb_encode (state=0x8054990, vin=0xbfffd420, </i><br> ><i> bits=0xbfffeaa0) at nb_celp.c:351</i><br> ><i> #3 0x400215f4 in speex_encode_int (state=0x8054990,in=0xbfffead0, </i><br>><i> bits=0xbfffeaa0) at speex.c:141</i><br> ><i> #4 0x0804a089 in main (argc=-80, argv=0xbffffad4) atspeexenc.c:688</i><br>><i> #5 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6</i><br> ><i> (gdb) q</i><br> ><i> The program is running. Exit anyway? (y or n) y</i><br> ><i> </i><br> ><i> </i><br> ><i> If I build without sse, things are OK.</i><br> ><i> </i><br> ><i> This box is running RH-8 on a PIII (katmai), which seems tosupport sse:</i><br>><i> flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca </i><br> ><i> cmov pat pse36 mmx fxsr sse</i><br> ><i> </i><br> ><i> If I compile the same thing on another box with an Athlon CPUinstead, </i><br>><i> it seems to work without crashing..</i><br> ><i> </i><br> ><i> I guess it's not critical in this case, but does anyone know ifthis is </i><br>><i> an issue with the SSE intrinsics in gcc-3.2, or is it aCPU-support </i><br>><i> issue (or something else?).</i><br> ><i> </i><br> ><i> -SteveK</i><br> ><i> </i><br> ><i> </i><br> ><i> _______________________________________________</i><br> ><i> Speex-dev mailing list</i><br> ><i> <a href="http://lists.xiph.org/mailman/listinfo/speex-dev">Speex-devat xiph.org</a></i><br> <i></i>><i> <a href="http://lists.xiph.org/mailman/listinfo/speex-dev">http://lists.xiph.org/mailman/listinfo/speex-dev</a></i><br> <i></i>><i> </i><br> -- <br> Jean-Marc Valin <<a href="http://lists.xiph.org/mailman/listinfo/speex-dev">Jean-Marc.Valin at USherbrooke.ca</a>><br> Université de Sherbrooke<br> </blockquote> <pre> </pre> </body> </html>
Jean-Marc Valin
2005-Apr-20 20:27 UTC
[Speex-dev] Speex-1.1.7 seems to crash with --enable-sse (on P3/GCC-3.2)..
Hi, To increase the stack size, you can increase the value in the speex_alloc() call in nb_celp.c. Let me know if it solves the problem. Also, what compiler are you using. I think some older versions of gcc may have problems with SSE intrinsics. Jean-Marc Le mardi 19 avril 2005 ? 16:02 +0200, jehan Monnier a ?crit :> Hi, > > I also tried to build speex 1.1.7 with sse enabled on a RAS 3 (P4). > Both version 1.1.6 and 1.1.7 crash: > > [root@tomb root]# speexenc -n loup.wav loup.spx > Encoding 8000 Hz audio using narrowband mode (stereo) > Segmentation fault (core dumped) > > Stack trace: > Loaded symbols for /lib/ld-linux.so.2 > #0 fir_mem2_10 (x=0x80552a8, _num=0x80566b4, y=0x80558ac, N=160, > ord=10, _mem=0x80568cc) at xmmintrin.h:790 > 790 { > (gdb) bt > #0 fir_mem2_10 (x=0x80552a8, _num=0x80566b4, y=0x80558ac, N=160, > ord=10, _mem=0x80568cc) at xmmintrin.h:790 > #1 0xb75dc509 in fir_mem2 (x=0x80552a8, _num=0x80566b4, y=0x80558ac, > N=160, ord=0, _mem=0x1) at filters_sse.h:330 > #2 0xb75d2ca7 in nb_encode (state=0x80551b0, vin=0xbfff88e0, > bits=0xbfff9f70) at nb_celp.c:351 > #3 0xb75dd560 in speex_encode_int (state=0x80551b0, in=0xb75e9400, > bits=0xbfff9f70) at speex.c:141 > #4 0x0804a071 in main (argc=0, argv=0xbfffafe4) at speexenc.c:688 > > > Just a question, how to increase the "encoder/decoder" the stack > size ? > Any other suggestion ? > > Regards > > > > > Hi, > > First question is do you run a 2.4 kernel or later (2.2 > doesn't support > SSE). Next thing to check, does 1.1.6 work? You may also want > to > increase the encoder/decoder stack size just in case. Oh, and > don't > compile with -mfpmath=sse . > > Jean-Marc > > Le mardi 08 mars 2005 ? 12:02 -0500, Steve Kann a ?crit : > > I tried building speex with SSE, and found that it crashes > for me here: > > > > [This is on RH=8.0]: > > > > # libtool gdb ./src/speexenc > > GNU gdb Red Hat Linux (5.2.1-4) > > [...] > > This GDB was configured as "i386-redhat-linux"... > > (gdb) r --rate 8000 --16bit -n /dev/zero /tmp/foo > > Starting program: /usr/src/speex-1.1.7/src/.libs/lt-speexenc > --rate 8000 > > --16bit -n /dev/zero /tmp/foo > > Encoding 8000 Hz audio using narrowband mode (mono) > > > > Program received signal SIGSEGV, Segmentation fault. > > fir_mem2_10 (x=0x8054a88, _num=0x8055e94, y=0x805508c, > N=160, ord=10, > > _mem=0x80560ac) > > > at /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/xmmintrin.h:774 > > 774 { > > (gdb) > > (gdb) bt > > #0 fir_mem2_10 (x=0x8054a88, _num=0x8055e94, y=0x805508c, > N=160, > > ord=10, _mem=0x80560ac) > > > at /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/xmmintrin.h:774 > > #1 0x40020add in fir_mem2 (x=0x8054a88, _num=0x8055e94, > y=0x805508c, > > N=160, ord=0, _mem=0x1) at filters_sse.h:330 > > #2 0x40016c23 in nb_encode (state=0x8054990, > vin=0xbfffd420, > > bits=0xbfffeaa0) at nb_celp.c:351 > > #3 0x400215f4 in speex_encode_int (state=0x8054990, > in=0xbfffead0, > > bits=0xbfffeaa0) at speex.c:141 > > #4 0x0804a089 in main (argc=-80, argv=0xbffffad4) at > speexenc.c:688 > > #5 0x420158d4 in __libc_start_main () > from /lib/i686/libc.so.6 > > (gdb) q > > The program is running. Exit anyway? (y or n) y > > > > > > If I build without sse, things are OK. > > > > This box is running RH-8 on a PIII (katmai), which seems to > support sse: > > flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca > > cmov pat pse36 mmx fxsr sse > > > > If I compile the same thing on another box with an Athlon > CPU instead, > > it seems to work without crashing.. > > > > I guess it's not critical in this case, but does anyone know > if this is > > an issue with the SSE intrinsics in gcc-3.2, or is it a > CPU-support > > issue (or something else?). > > > > -SteveK > > > > > > _______________________________________________ > > Speex-dev mailing list > > Speex-dev at xiph.org > > http://lists.xiph.org/mailman/listinfo/speex-dev > > > -- > Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca> > Universit? de Sherbrooke > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev-- Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca> Universit? de Sherbrooke
jehan Monnier
2005-Apr-22 04:29 UTC
[Speex-dev] Speex-1.1.7 seems to crash with --enable-sse (on P3/GCC-3.2)..
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Hi Jean-Marc,<br> <br> I have increased the stack size from 8000 to 16000:<br> <blockquote> /*st (EncState*)speex_alloc(sizeof(EncState)+8000*sizeof(spx_sig_t));*/<br> st (EncState*)speex_alloc(sizeof(EncState)+16000*sizeof(spx_sig_t));<br> </blockquote> But the result is the same (core dump) :-(<br> <br> The compiler version I used is the following:<br> <br> <blockquote>[root@tomb speex-1.1.7]# gcc -v<br> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs<br> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux<br> Thread model: posix<br> gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)<br> </blockquote> <br> <br> Compiled with gcc 3.4.3, speex 1.1.7 works fine (both with and without SSE)<br> So this issue seems to be in gcc 3.2.3<br> <br> Best Regards,<br> <br> Jehan<br> <br> Jean-Marc Valin wrote: <blockquote cite="mid1114053926.7347.1.camel@localhost" type="cite"> <pre wrap="">Hi, To increase the stack size, you can increase the value in the speex_alloc() call in nb_celp.c. Let me know if it solves the problem. Also, what compiler are you using. I think some older versions of gcc may have problems with SSE intrinsics.         Jean-Marc Le mardi 19 avril 2005 à 16:02 +0200, jehan Monnier a écrit : </pre> <blockquote type="cite"> <pre wrap="">Hi, I also tried to build speex 1.1.7 with sse enabled on a RAS 3 (P4). Both version 1.1.6 and 1.1.7 crash: [root@tomb root]# speexenc -n loup.wav loup.spx Encoding 8000 Hz audio using narrowband mode (stereo) Segmentation fault (core dumped) Stack trace: Loaded symbols for /lib/ld-linux.so.2 #0 fir_mem2_10 (x=0x80552a8, _num=0x80566b4, y=0x80558ac, N=160, ord=10, _mem=0x80568cc) at xmmintrin.h:790 790 { (gdb) bt #0 fir_mem2_10 (x=0x80552a8, _num=0x80566b4, y=0x80558ac, N=160, ord=10, _mem=0x80568cc) at xmmintrin.h:790 #1 0xb75dc509 in fir_mem2 (x=0x80552a8, _num=0x80566b4, y=0x80558ac, N=160, ord=0, _mem=0x1) at filters_sse.h:330 #2 0xb75d2ca7 in nb_encode (state=0x80551b0, vin=0xbfff88e0, bits=0xbfff9f70) at nb_celp.c:351 #3 0xb75dd560 in speex_encode_int (state=0x80551b0, in=0xb75e9400, bits=0xbfff9f70) at speex.c:141 #4 0x0804a071 in main (argc=0, argv=0xbfffafe4) at speexenc.c:688 Just a question, how to increase the "encoder/decoder" the stack size ? Any other suggestion ? Regards Hi, First question is do you run a 2.4 kernel or later (2.2 doesn't support SSE). Next thing to check, does 1.1.6 work? You may also want to increase the encoder/decoder stack size just in case. Oh, and don't compile with -mfpmath=sse . Jean-Marc Le mardi 08 mars 2005 à 12:02 -0500, Steve Kann a écrit : > I tried building speex with SSE, and found that it crashes for me here: > > [This is on RH=8.0]: > > # libtool gdb ./src/speexenc > GNU gdb Red Hat Linux (5.2.1-4) > [...] > This GDB was configured as "i386-redhat-linux"... > (gdb) r --rate 8000 --16bit -n /dev/zero /tmp/foo > Starting program: /usr/src/speex-1.1.7/src/.libs/lt-speexenc --rate 8000 > --16bit -n /dev/zero /tmp/foo > Encoding 8000 Hz audio using narrowband mode (mono) > > Program received signal SIGSEGV, Segmentation fault. > fir_mem2_10 (x=0x8054a88, _num=0x8055e94, y=0x805508c, N=160, ord=10, > _mem=0x80560ac) > at /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/xmmintrin.h:774 > 774 { > (gdb) > (gdb) bt > #0 fir_mem2_10 (x=0x8054a88, _num=0x8055e94, y=0x805508c, N=160, > ord=10, _mem=0x80560ac) > at /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/xmmintrin.h:774 > #1 0x40020add in fir_mem2 (x=0x8054a88, _num=0x8055e94, y=0x805508c, > N=160, ord=0, _mem=0x1) at filters_sse.h:330 > #2 0x40016c23 in nb_encode (state=0x8054990, vin=0xbfffd420, > bits=0xbfffeaa0) at nb_celp.c:351 > #3 0x400215f4 in speex_encode_int (state=0x8054990, in=0xbfffead0, > bits=0xbfffeaa0) at speex.c:141 > #4 0x0804a089 in main (argc=-80, argv=0xbffffad4) at speexenc.c:688 > #5 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6 > (gdb) q > The program is running. Exit anyway? (y or n) y > > > If I build without sse, things are OK. > > This box is running RH-8 on a PIII (katmai), which seems to support sse: > flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca > cmov pat pse36 mmx fxsr sse > > If I compile the same thing on another box with an Athlon CPU instead, > it seems to work without crashing.. > > I guess it's not critical in this case, but does anyone know if this is > an issue with the SSE intrinsics in gcc-3.2, or is it a CPU-support > issue (or something else?). > > -SteveK > > > _______________________________________________ > Speex-dev mailing list > Speex-dev at xiph.org > <a class="moz-txt-link-freetext" href="http://lists.xiph.org/mailman/listinfo/speex-dev">http://lists.xiph.org/mailman/listinfo/speex-dev</a> > -- Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca> Université de Sherbrooke _______________________________________________ Speex-dev mailing list <a class="moz-txt-link-abbreviated" href="mailto:Speex-dev@xiph.org">Speex-dev@xiph.org</a> <a class="moz-txt-link-freetext" href="http://lists.xiph.org/mailman/listinfo/speex-dev">http://lists.xiph.org/mailman/listinfo/speex-dev</a> </pre> </blockquote> </blockquote> <br> </body> </html>