[mythtv-users] Re: mythmusic not responding to keys

Michael T. Dean mtdean at thirdcontact.com
Wed May 5 03:58:49 EDT 2004


Mike Jasper wrote:

> I have EXACTLY the same problem.  It's been sitting on my to-do list 
> for a while - I never would have guessed this fix.
>
> Like Peter, running 'LD_ASSUME_KERNEL=2.4.1 mythfrontend' makes all my 
> mythmusic problems disappear.  The pause button, etc., work perfectly 
> whereas before most of the controls would freeze mythfrontend (music 
> would continue playing, but all GUI controls would be frozen).
>
> Is there any downside to prefacing 'mythfrontend' with 
> 'LD_ASSUME_KERNEL=2.4.1'?

Assuming you were running on a system with NPTL (see below for details 
of what's really happening), using LD_ASSUME_KERNEL=2.4.1 would tell the 
dynamic linker to link against a non-NPTL version of the library.  
Basically, at that point, you would have two different versions of libc 
in memory at the same time.  It's not an ideal solution, but it's better 
than a segfault/lockup/25-second-wait-to-pause/etc.  :)

> I'm running FC1, using Axel's kernel and mythtv packages (see below). 
> I'm using kernel-2.4.22-1.2179.nptl_47.rhfc1.at, which would make you 
> think it's NPTL-compatible.

Actually, it (your kernel) _is_ NPTL-compatible.

>   However, /lib/libc.so.6 does not output the "NPTL 0.61 by Ulrich 
> Drepper" line.  And the objdump command you mentioned returns nothing.
>
> $ /lib/libc.so.6
> GNU C Library stable release version 2.3.2, by Roland McGrath et al.
> Copyright (C) 2003 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> Compiled by GNU CC version 3.3.2 20031218 (Red Hat Linux 3.3.2-5).
> Compiled on a Linux 2.4.20 system on 2004-01-06.
> Available extensions:
>         GNU libio by Per Bothner
>         crypt add-on version 2.1 by Michael Glad and others
>         linuxthreads-0.10 by Xavier Leroy

Your libc is definitely using linuxthreads, not NPTL.

>         The C stubs add-on version 2.1.2.
>         BIND-8.2.3-T5B
>         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
>         Glibc-2.0 compatibility add-on by Cristian Gafton
>         libthread_db work sponsored by Alpha Processor Inc
> Thread-local storage support included.

This indicates that your libc was compiled using the "--with-tls" 
configure option.  Thread-local storage (TLS) is what I was talking 
about when I said "NPTL-compatible 2.4.x kernel."  NPTL requires a 
kernel with proper TLS support and fast user-space mutexes 
(CONFIG_FUTEX)--which normally means a 2.6.x kernel, but since Red Hat 
developed NPTL, they backported TLS/futex (with a rather messy patch) to 
2.4.x, and this patch was used to compile your kernel and, obviously, 
the kernel used to compile your libc.

> Report bugs using the `glibcbug' script to <bugs at gnu.org>.
> $
>
> $ objdump -x /lib/libpthread.so.0 | grep "nptl_main"
> $

Therefore, although you're not actually using NPTL, you are using TLS 
(kernel and library support for TLS).  Setting LD_ASSUME_KERNEL=2.4.1 
disables TLS.  Therefore, it's possible that:

a) MythMusic (or one of its dependencies) may have been compiled against 
a libc with linuxthreads but without TLS, and TLS is causing it 
problems.  (This is rather unlikely since you're using Axel's kernel and 
MythTV packages.)
b) MythMusic (or one of its dependencies) may have a threading problem.
c) Early versions of NPTL/TLS support (you're kernel is based on version 
0.47 and Peter's on 0.27, whereas current--in glibc CVS--is 0.61) may 
have been buggy and caused problems.  Note that NPTL will be distributed 
for the first time with glibc in the next release (2.3.3?), so it's hard 
to say which are/are not "stable" versions.
d) Something else--that I haven't even considered--is causing the problem.

Out of curiosity, what do you get when you execute the following 
(assuming Myth is installed in /usr):

ldd /usr/lib/mythtv/plugins/libmythmusic.so

and

LD_ASSUME_KERNEL=2.4.1 ldd /usr/lib/mythtv/plugins/libmythmusic.so

Mike


More information about the mythtv-users mailing list