Bug 26307

Summary: libc_r aborts when using the KDE media player (noatun) with the sound server(aRts)
Product: Base System Reporter: jazepeda <jazepeda>
Component: binAssignee: freebsd-threads (Nobody) <threads>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description jazepeda 2001-04-03 03:30:01 UTC
Using mpeglib within noatun (or any other KDE media player) will cause
the player to crash (I'm operating on the assumption this is the fault
of linking in some threaded and some non threaded objects.  However, this
work succesfully on Linux and Solaris.  The interesting part is that this
takes the arts daemon down with it.  With a recent world+kernel, arts is
crashing inside libc, which got my attention anyways.

The interesting output (i.e. not from arts) was:
Fatal error 'gc cannot wait for a signal' at line 231 in file 
/usr/src/lib/libc_r/uthread/uthread_gc.c (errno = 0)
Abort trap (core dumped)

How-To-Repeat: compile + install kdelibs (I'm using a CVS checkout from the HEAD branch, but I'm sure similar things would happen from the ports)
compile + install noatun, mpeglib, mpeglib_artsplug from kdemultimedia
(This also requires tweaking one of the configure.in.in scripts, and is likely outside the scope of the kdemultimedia port)

run artsd (running in a terminal can be very helpful)
run noatun
play an mp3, wav, or ogg vorbis file (anything using mpeglib).
Comment 1 dd freebsd_committer freebsd_triage 2001-04-03 03:53:15 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports

Ports issue.
Comment 2 dd freebsd_committer freebsd_triage 2001-04-13 21:48:02 UTC
Responsible Changed
From-To: freebsd-ports->freebsd-bugs

Looks like it's not a ports issue after all.
Comment 3 Will Andrews 2001-04-13 22:29:40 UTC
On Fri, Apr 13, 2001 at 01:48:27PM -0700, dd@FreeBSD.ORG wrote:
> Synopsis: libc_r aborts when using the KDE media player (noatun) with the=
 sound server(aRts)
>=20
> Responsible-Changed-From-To: freebsd-ports->freebsd-bugs
> Responsible-Changed-By: dd
> Responsible-Changed-When: Fri Apr 13 13:48:02 PDT 2001
> Responsible-Changed-Why:=20
> Looks like it's not a ports issue after all.

<paraphrase origin=3D"aRts author">
Indeed, aRts is linked with pthreads, which causes issues becuz some
parts of aRts aren't thread-safe (and thus cannot use reentrant forms of
libc functions).  Noatun is also not thread-safe.  The fact that
pthreads is implemented in user-space makes it impossible to change the
reference for the appropriate syscalls.  At least this is true for 4.x.
Hopefully 5.x will put pthreads in the kernel.

This problem will be revisited for KDE 2.2, where the author of aRts is
going to offer non-threadsafe versions for the libraries in aRts which
are written in a threadsafe manner.
</paraphrase>

I may not remember something above correctly, but it makes sense to me.

--=20
wca
Comment 4 Will Andrews 2001-04-13 22:32:25 UTC
On Fri, Apr 13, 2001 at 04:29:40PM -0500, Will Andrews wrote:
> This problem will be revisited for KDE 2.2, where the author of aRts is
> going to offer non-threadsafe versions for the libraries in aRts which
> are written in a threadsafe manner.

I also forgot to mention that Alex Zepeda <garbanzo@kde.org> added kewl
mpg123/mp3 plugins to replace the lame old mpeglib crap.  So in KDE CVS
mp3's work very nicely (according to him).  :)

--=20
wca
Comment 5 Tom Hukins freebsd_committer freebsd_triage 2001-09-17 12:49:29 UTC
The noatun problems seem to be fixed in the ports for kde-2.2.  Does
this mean we can close this PR now?

Tom
Comment 6 Tom Hukins freebsd_committer freebsd_triage 2001-09-22 10:58:26 UTC
State Changed
From-To: open->closed

This problem does not occur with the latest KDE - noatun works fine now
Comment 7 Tom Hukins freebsd_committer freebsd_triage 2001-10-07 17:17:25 UTC
State Changed
From-To: closed->open

Alex Zepeda <jazepeda@pacbell.net> reports: 

The band-aid solution I implemented was to hack up a copy of mpg123 as 
the mp3 plugin, and hack up a separate ogg vorbis plugin for noatun.   
This should be re-opened and re-checked with the mpeglib plugin. 

Actually, the mpg123 based plugin is generally superior, however, 
judging by where the crash is pointing at (within libc_r), there's 
something wrong with libc_r, thus the open pr.
Comment 8 Kris Kennaway freebsd_committer freebsd_triage 2003-07-13 02:33:26 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-threads

Assign to threads mailing list
Comment 9 Michael Nottebrock freebsd_committer freebsd_triage 2004-02-28 09:32:00 UTC
State Changed
From-To: open->closed

Fixed for ages. 

Approved by: Originator