Illegal Instruction on a MPC 8241 cpu (kurobox)

*nix specific usage questions
twdowiak
New Cone
New Cone
Posts: 2
Joined: 26 Mar 2007 01:49

Illegal Instruction on a MPC 8241 cpu (kurobox)

Postby twdowiak » 26 Mar 2007 11:48

system:
-------
I am running a Debian unstable on a MPC 8241 processor, which is a variant of a ppc 603e.
uname -a
Linux millipano 2.6.17.1-mh1_kuro-box #4 Fri Jun 23 02:52:02 CEST 2006 ppc GNU/Linux

contrib libraries:
-----------------
freetype-2.3.1
libdvbpsi4-0.1.5
libmad-0.15.1b
mpeg2dec-0.4.1

For each of these libraries, I cd into the directory and type in :
./configure --disable-altivec --enable-debug
make
make install

vlc:
---
I got these 3 versions either from the main ftp repository or from the nightly builds (bugfix version):

vlc-0.8.5
vlc-0.8.6-bugfix
vlc-0.8.6a

I compiled these versions this way:

./configure --disable-altivec --disable-ffmpeg --with-libmpeg2-tree=../mpeg2dec-0.4.1/ --with-dvbpsi-tree=../libdvbpsi4-0.1.5/ --with-mad-tree=../libmad-0.15.1b/ --disable-wxwidgets --disable-skins2 --disable-smb --enable-debug
make
make install

which worked fine. I can play files without problem using the file output (--sout-standatrd-access=file) and I can also use the http interface.

problem:
-------
I want to run vlc this way:
/usr/local/bin/vlc --sout=#std --sout-standard-access=udp --sout-standard-mux=ts --sout-standard-url=212.27.38.253:1234 --sout-ts-pid-video=68 --sout-ts-pid-audio=69 --sout-ts-pid-spu=70 --sout-ts-pcr=80 --sout-ts-dts-delay=400 --subsdec-encoding=ISO-8859-1 --sout-transcode-maxwidth=720 --sout-transcode-maxheight=576 -vvvv /mnt/audio/mp3/Angra/Fireworks/01\ -\ Wings\ Of\ Reality.mp3

* this is the stdout output:

Remote control interface initialized. Type `help' for help.
status change: ( stop state: 0 )
status change: ( quit )

* this is the stderr output:

VLC media player 0.8.5 Janus
[00000001] main vlc debug: opening config file /home/thibaut/.vlc/vlcrc
[00000001] main vlc warning: config file /home/thibaut/.vlc/vlcrc does not exist yet
[00000001] main vlc debug: checking builtin modules
[00000001] main vlc debug: checking plugin modules
[00000001] main vlc debug: loading plugins cache file /home/thibaut/.vlc/cache/plugins-0404be.dat
[00000001] main vlc debug: recursively browsing `modules'
[00000001] main vlc debug: recursively browsing `/usr/local/lib/vlc'
[00000001] main vlc debug: recursively browsing `plugins'
[00000001] main vlc debug: module bank initialized, found 180 modules
[00000001] main vlc debug: opening config file /home/thibaut/.vlc/vlcrc
[00000001] main vlc warning: config file /home/thibaut/.vlc/vlcrc does not exist yet
Warning: option --sout-standard-url is deprecated. You should use --sout-standard-dst instead.
[00000001] main vlc debug: CPU has capabilities FPU
[00000001] main vlc debug: looking for memcpy module: 1 candidate
[00000001] main vlc debug: using memcpy module "memcpy"
[00000225] main playlist debug: waiting for thread completion
[00000225] main playlist debug: thread 813864160 (playlist) created at priority 0 (playlist/playlist.c:184)
[00000226] main private debug: waiting for thread completion
[00000226] main private debug: thread 822252768 (preparser) created at priority 0 (playlist/playlist.c:210)
[00000227] main interface debug: looking for interface module: 1 candidate
[00000227] main interface debug: using interface module "hotkeys"
[00000227] main interface debug: thread 830641376 (interface) created at priority 0 (interface/interface.c:231)
[00000229] main interface debug: looking for interface module: 1 candidate
[00000229] main interface debug: using interface module "screensaver"
[00000229] main interface debug: thread 839029984 (interface) created at priority 0 (interface/interface.c:231)
[00000225] main playlist debug: adding playlist item `/mnt/audio/mp3/Angra/Fireworks/01 - Wings Of Reality.mp3' ( /mnt/audio/mp3/Angra/Fireworks/01 - Wings Of Reality.mp3 )
[00000231] main interface debug: looking for interface module: 1 candidate
[00000231] main interface debug: using interface module "rc"
[00000231] main interface debug: thread 847418592 (manager) created at priority 0 (interface/interface.c:216)
[00000225] main playlist debug: creating statistics handler
[00000225] main playlist debug: creating new input thread
[00000234] main input debug: waiting for thread completion
[00000235] main stream output debug: stream=`std'
[00000236] main private debug: looking for sout stream module: 1 candidate
[00000234] main input debug: thread 855807200 (input) created at priority 0 (input/input.c:261)
[00000236] stream_out_standard private debug: creating `udp/ts://212.27.38.253:1234'
[00000236] stream_out_standard private debug: extension is 253:1234
[00000236] stream_out_standard private debug: extension -> mux=(null)
[00000236] stream_out_standard private debug: using `udp/ts://212.27.38.253:1234'
[00000238] main private debug: looking for sout access module: 1 candidate

then, I get this message:
Illegal Instruction

and vlc exits.

* some alternatives:

- If I strip out some options, it is all the same:
/usr/local/bin/vlc --sout=#std --sout-standard-access=udp --sout-standard-mux=ts --sout-standard-url=212.27.38.253:1234 -vvvv /mnt/audio/mp3/Angra/Fireworks/01\ -\ Wings\ Of\ Reality.mp3

- If I use a path without blanks in it for the music file and if I use the telnet interface this way:
/usr/local/bin/vlc --sout=#std --sout-standard-access=udp --sout-standard-mux=ts --sout-standard-url=212.27.38.253:1234 -vvvv
add /home/thibaut/w.mp3

Then I get the same output.

- If I use the debian releases of vlc (apt-get) (stable, unstable, sid), it is all the same.

* gdb output:

Here is the gdb bt using this last scenario:

gdb /usr/local/bin/vlc
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-linux-gnu"...
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) set args --sout="#std" --sout-standard-access=udp --sout-standard-mux=ts --sout-standard-url=212.27.38.253:1234
(gdb) run
Starting program: /usr/local/bin/vlc --sout="#std" --sout-standard-access=udp --sout-standard-mux=ts --sout-standard-url=212.27.38.253:1234
[Thread debugging using libthread_db enabled]
[New Thread 805450784 (LWP 31314)]

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 805450784 (LWP 31314)]
CPUCapabilities () at misc/cpu.c:281
281 asm volatile ("mtspr 256, %0\n\t"
(gdb) bt
#0 CPUCapabilities () at misc/cpu.c:281
#1 0x1000cc0c in VLC_Create () at libvlc.c:212
#2 0x10003824 in main (i_argc=5, ppsz_argv=0x7f9b4aa4) at src/vlc.c:81
(gdb) quit
The program is running. Exit anyway? (y or n)

personal research:
------------------

I found an old message in a forum, dont't know if this can be helpful.
viewtopic.php?t=3689&highlight=illegal+instruction

I believe this is a bug in some module with respect to the cpu support. That said, I really dont't know what to do. Anyways, fyi what I want to do is stream some content from my box (which is a kurobox hg, you can find some info googling for it) using the vlc streaming capabilities to another box (which is a freebox).

thanks guys for your help.

pamynx
New Cone
New Cone
Posts: 1
Joined: 11 Apr 2007 21:25

Postby pamynx » 11 Apr 2007 22:20

Bonjour

I have the same configuration, and the same problem.
It was working with vlc 0.8.5 but "Illegal Instruction" with "0.8.6.a" that I got either with debian apt-get or compiling sources.

Did you solve your problem ?

Merci.

tiico

Postby tiico » 19 Apr 2007 10:18

Bonjour

I have the same configuration, and the same problem.
It was working with vlc 0.8.5 but "Illegal Instruction" with "0.8.6.a" that I got either with debian apt-get or compiling sources.

Did you solve your problem ?

Merci.
Hi!

I have the same probleme with my kurobox hg which is on Debian Etch distro.
I use vlc 0.8.6a from debian-multimedia package (and all dependencies).

I'have the same VLC crash and the log says :
[00000236] stream_out_standard private debug: creating `udp/ts://212.27.38.253:1234'
[00000236] stream_out_standard private debug: extension is 253:1234
[00000236] stream_out_standard private debug: extension -> mux=(null)
[00000236] stream_out_standard private debug: using `udp/ts://212.27.38.253:1234'
[00000238] main private debug: looking for sout access module: 1 candidate

Have you found any solution about this problem?
I will try to use another version of VLC (0.8.5 or 0.8.6b - when they were available on deb package....)

I will inform you if i found any solution.... or not.

Regards

Tiico

Rémi Denis-Courmont
Developer
Developer
Posts: 14998
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Postby Rémi Denis-Courmont » 21 Apr 2007 15:48

./configure --disable-optimizations ?
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

twdowiak
New Cone
New Cone
Posts: 2
Joined: 26 Mar 2007 01:49

got it!!

Postby twdowiak » 01 May 2007 22:46

I configured these libs with --disable-altivec. Then, make, make install:
a52dec-0.7.4

libmad-0.15.1b

mpeg2dec-0.4.1

libogg-1.1.3

libvorbis-1.1.2

flac-1.1.4

libtheora-1.0alpha7

libdvdcss-1.2.9

libdvdread-0.9.7

libdvbpsi4-0.1.5

freetype-2.1.10

lame-3.97

I configured ffmpeg with --enable-pp --enable-gpl --disable-altivec. Then make, make install.


Then I apply 2 patches to vlc-0.8.6a:

This one, from the gentoo community (but I do not remember where exactly, sorry....):

===================================================================
Index: vlc-0.8.6_p18636/configure.ac
===================================================================
--- vlc-0.8.6_p18636.orig/configure.ac
+++ vlc-0.8.6_p18636/configure.ac
@@ -1301,10 +1301,12 @@ AC_CACHE_CHECK([if \$CC groks AltiVec C
if test "${ac_cv_c_altivec}" != "no"; then
CPPFLAGS="${CPPFLAGS_save} ${ac_cv_c_altivec}"
fi
+if test "${enable_altivec}" != "no"; then
AC_CHECK_HEADERS(altivec.h)
+fi
CPPFLAGS="${CPPFLAGS_save}"

-if test "${ac_cv_c_altivec}" != "no"; then
+if test "${ac_cv_c_altivec}" != "no" -a "${enable_altivec}" != "no"; then
AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
VLC_ADD_CFLAGS([vlc],[${ac_cv_c_altivec}])
VLC_ADD_CFLAGS([idctaltivec motionaltivec],[${ac_cv_c_altivec}])

And I applied this other one (sorry, do not remember the origin either...) :

--- vlc-0.8.6-clean/modules/codec/flac.c 2006-12-09 01:12:20.000000000 +0000
+++ vlc-0.8.6/modules/codec/flac.c 2006-12-24 01:34:54.000000000 +0000
@@ -40,6 +40,10 @@

#define MAX_FLAC_HEADER_SIZE 16

+#if defined(FLAC_API_VERSION_CURRENT) && FLAC_API_VERSION_CURRENT >= 8
+# define USE_NEW_FLAC_API
+#endif
+
/*****************************************************************************
* decoder_sys_t : FLAC decoder descriptor
*****************************************************************************/
@@ -225,6 +229,25 @@
return VLC_EGENERIC;
}

+#ifdef USE_NEW_FLAC_API
+ if( FLAC__stream_decoder_init_stream( p_sys->p_flac,
+ DecoderReadCallback,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ DecoderWriteCallback,
+ DecoderMetadataCallback,
+ DecoderErrorCallback,
+ p_dec )
+ != FLAC__STREAM_DECODER_INIT_STATUS_OK )
+ {
+ msg_Err( p_dec, "FLAC__stream_decoder_init_stream() failed" );
+ FLAC__stream_decoder_delete( p_sys->p_flac );
+ free( p_sys );
+ return VLC_EGENERIC;
+ }
+#else
FLAC__stream_decoder_set_read_callback( p_sys->p_flac,
DecoderReadCallback );
FLAC__stream_decoder_set_write_callback( p_sys->p_flac,
@@ -237,6 +260,7 @@

FLAC__stream_decoder_init( p_sys->p_flac );
#endif
+#endif

/* Set output properties */
p_dec->fmt_out.i_cat = AUDIO_ES;
@@ -730,16 +754,27 @@
case FLAC__STREAM_DECODER_END_OF_STREAM:
msg_Dbg( p_dec, "the decoder has reached the end of the stream." );
break;
+#ifdef USE_NEW_FLAC_API
+ case FLAC__STREAM_DECODER_OGG_ERROR:
+ msg_Err( p_dec, "error occurred in the Ogg layer." );
+ break;
+ case FLAC__STREAM_DECODER_SEEK_ERROR:
+ msg_Err( p_dec, "error occurred while seeking." );
+ break;
+#endif
case FLAC__STREAM_DECODER_ABORTED:
msg_Warn( p_dec, "the decoder was aborted by the read callback." );
break;
+#ifndef USE_NEW_FLAC_API
case FLAC__STREAM_DECODER_UNPARSEABLE_STREAM:
msg_Warn( p_dec, "the decoder encountered reserved fields in use "
"in the stream." );
break;
+#endif
case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
msg_Err( p_dec, "error when allocating memory." );
break;
+#ifndef USE_NEW_FLAC_API
case FLAC__STREAM_DECODER_ALREADY_INITIALIZED:
msg_Err( p_dec, "FLAC__stream_decoder_init() was called when the "
"decoder was already initialized, usually because "
@@ -749,6 +784,7 @@
msg_Err( p_dec, "FLAC__stream_decoder_init() was called without "
"all callbacks being set." );
break;
+#endif
case FLAC__STREAM_DECODER_UNINITIALIZED:
msg_Err( p_dec, "decoder in uninitialized state." );
break;
@@ -1183,7 +1219,12 @@
p_sys->i_samples_delay = 0;

/* Create flac encoder */
- p_sys->p_flac = FLAC__stream_encoder_new();
+ if( !(p_sys->p_flac = FLAC__stream_encoder_new()) )
+ {
+ msg_Err( p_enc, "FLAC__stream_encoder_new() failed" );
+ free( p_sys );
+ return VLC_EGENERIC;
+ }

FLAC__stream_encoder_set_streamable_subset( p_sys->p_flac, 1 );
FLAC__stream_encoder_set_channels( p_sys->p_flac,
@@ -1193,15 +1234,32 @@
FLAC__stream_encoder_set_bits_per_sample( p_sys->p_flac, 16 );
p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;

+ /* Get and store the STREAMINFO metadata block as a p_extra */
+ p_sys->p_chain = 0;
+
+#ifdef USE_NEW_FLAC_API
+ if( FLAC__stream_encoder_init_stream( p_sys->p_flac,
+ EncoderWriteCallback,
+ NULL,
+ NULL,
+ EncoderMetadataCallback,
+ p_enc )
+ != FLAC__STREAM_ENCODER_INIT_STATUS_OK )
+ {
+ msg_Err( p_enc, "FLAC__stream_encoder_init_stream() failed" );
+ FLAC__stream_encoder_delete( p_sys->p_flac );
+ free( p_sys );
+ return VLC_EGENERIC;
+ }
+#else
FLAC__stream_encoder_set_write_callback( p_sys->p_flac,
EncoderWriteCallback );
FLAC__stream_encoder_set_metadata_callback( p_sys->p_flac,
EncoderMetadataCallback );
FLAC__stream_encoder_set_client_data( p_sys->p_flac, p_enc );

- /* Get and store the STREAMINFO metadata block as a p_extra */
- p_sys->p_chain = 0;
FLAC__stream_encoder_init( p_sys->p_flac );
+#endif

return VLC_SUCCESS;
}


And then, you configure vlc with: --disable-altivec --enable-ogg --enable-flac --enable-vorbis --enable-theora --enable-dvb --enable-freetype --enable-dvdread --disable-caca --enable-mad --enable-a52 --disable-wxwidgets --enable-libmpeg2 --disable-speex --disable-skins2 --enable-ffmpeg --disable-debug --with-ffmpeg-tree=../ffmpeg --with-a52-tree=../a52dec-0.7.4

And, make, make install.

And it works fine. I tested mp3s, mpeg2 streaming to the freebox. Transcoding works as well, except the processor can't cope and too many frames are dropped. http interface is ok. So, you can use it with your freebox.

BUT

I do have problems with displaying images, transcoding with "fake" input module does not work really well. And I also have problems with playlists: once one is launched, I cannot lanched another or any other file: vlc freezes.

Thank u guys for ur feedback on this.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 4 guests