lepton
2005-Aug-07 13:39 UTC
[Xen-devel] core dump in pthread in mplayer in freebsd DomainU on Debian Linux Domain0
Hi!
After I have installed freebsd port for xen, I tried some
software on freebsd. I am a newbie of freebsd, I meet some
problems in mplayer, I don''t know wether the problem was a
freebsd-xen "bug" or a freebsd "bug".
When I compiled mplayer, it complained about pthread about
"Fatal error ''Thread has returned from _thread_switch''
at line
1116 in file /usr/src/lib/libpthread/thread/thr_kern.c (errno 0)", it
won''t compile.
Then I moved to use port to compile mplayer, then it can
compile. I can use mplayer to play video without sound. But
after I have configured mplayer to use nas to output sound.
When I use mplayer, it will abort, and complain about
"Fatal error ''Thread has returned from _thread_switch''
at line
1116 in file /usr/src/lib/libpthread/thread/thr_kern.c (errno 0)"
I have tried the following program (paste from configure script
of mplayer)
#include <pthread.h>
void* func(void *arg) { return arg; }
int main(void) { pthread_t tid; return pthread_create (&tid, 0,
func, 0) == 0 ? 0 : 1; }
when you use gcc -o test test.c -pthread
it will complain the same thing about pthread.
when you use gcc -o test test.c -lc_r, the problem dispeared.
Is pthread is broken on freebsd? or freebsd-xen? or I have do
something wrong?
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Kip Macy
2005-Aug-07 19:49 UTC
Re: [Xen-devel] core dump in pthread in mplayer in freebsd DomainU on Debian Linux Domain0
M:N support is currently busted on freebsd-xen. If you re-compile libc
to only use SYSTEM_SCOPE threads (one line makefile change), things
will work. Sorry for the inconvenience.
I''ll get a little time to fix open issues when I get some servers this
week.
-Kip
On 8/7/05, lepton <ytht.net@gmail.com> wrote:> Hi!
> After I have installed freebsd port for xen, I tried some
> software on freebsd. I am a newbie of freebsd, I meet some
> problems in mplayer, I don''t know wether the problem was a
> freebsd-xen "bug" or a freebsd "bug".
>
> When I compiled mplayer, it complained about pthread about
> "Fatal error ''Thread has returned from
_thread_switch'' at line
> 1116 in file /usr/src/lib/libpthread/thread/thr_kern.c (errno >
0)", it won''t compile.
>
> Then I moved to use port to compile mplayer, then it can
> compile. I can use mplayer to play video without sound. But
> after I have configured mplayer to use nas to output sound.
> When I use mplayer, it will abort, and complain about
> "Fatal error ''Thread has returned from
_thread_switch'' at line
> 1116 in file /usr/src/lib/libpthread/thread/thr_kern.c (errno >
0)"
>
> I have tried the following program (paste from configure script
> of mplayer)
>
> #include <pthread.h>
> void* func(void *arg) { return arg; }
> int main(void) { pthread_t tid; return pthread_create (&tid, 0,
> func, 0) == 0 ? 0 : 1; }
>
> when you use gcc -o test test.c -pthread
> it will complain the same thing about pthread.
>
> when you use gcc -o test test.c -lc_r, the problem dispeared.
>
> Is pthread is broken on freebsd? or freebsd-xen? or I have do
> something wrong?
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
lepton
2005-Aug-08 00:47 UTC
Re: [Xen-devel] core dump in pthread in mplayer in freebsd DomainU on Debian Linux Domain0
Thanks for your work! :) On Sun, Aug 07, 2005 at 12:49:04PM -0700, Kip Macy wrote:> M:N support is currently busted on freebsd-xen. If you re-compile libc > to only use SYSTEM_SCOPE threads (one line makefile change), things > will work. Sorry for the inconvenience. > > I''ll get a little time to fix open issues when I get some servers this week. > > -Kip > > On 8/7/05, lepton <ytht.net@gmail.com> wrote: > > Hi! > > After I have installed freebsd port for xen, I tried some > > software on freebsd. I am a newbie of freebsd, I meet some > > problems in mplayer, I don''t know wether the problem was a > > freebsd-xen "bug" or a freebsd "bug". > > > > When I compiled mplayer, it complained about pthread about > > "Fatal error ''Thread has returned from _thread_switch'' at line > > 1116 in file /usr/src/lib/libpthread/thread/thr_kern.c (errno > > 0)", it won''t compile. > > > > Then I moved to use port to compile mplayer, then it can > > compile. I can use mplayer to play video without sound. But > > after I have configured mplayer to use nas to output sound. > > When I use mplayer, it will abort, and complain about > > "Fatal error ''Thread has returned from _thread_switch'' at line > > 1116 in file /usr/src/lib/libpthread/thread/thr_kern.c (errno > > 0)" > > > > I have tried the following program (paste from configure script > > of mplayer) > > > > #include <pthread.h> > > void* func(void *arg) { return arg; } > > int main(void) { pthread_t tid; return pthread_create (&tid, 0, > > func, 0) == 0 ? 0 : 1; } > > > > when you use gcc -o test test.c -pthread > > it will complain the same thing about pthread. > > > > when you use gcc -o test test.c -lc_r, the problem dispeared. > > > > Is pthread is broken on freebsd? or freebsd-xen? or I have do > > something wrong? > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
lepton
2005-Aug-08 11:56 UTC
Re: [Xen-devel] core dump in pthread in mplayer in freebsd DomainU on Debian Linux Domain0
Thanks for your advice. I have tried this and got it work. The point is: 1. disable _thr_start_sig_daemon call in libpthread/thread/thr_kern.c (this is a bug in libpthread, when we use -DSYSTEM_SCOPE_ONLY, we have no this function) 2. recompile libpthread( ^_^ not libc, it should be a type error) you should change one line of Makefile. On Sun, Aug 07, 2005 at 12:49:04PM -0700, Kip Macy wrote:> M:N support is currently busted on freebsd-xen. If you re-compile libc > to only use SYSTEM_SCOPE threads (one line makefile change), things > will work. Sorry for the inconvenience. > > I''ll get a little time to fix open issues when I get some servers this week. > > -Kip > > On 8/7/05, lepton <ytht.net@gmail.com> wrote: > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel