Bug 1070 - some games fail due to soundwrapper segfaulting (fillets-ng, quake2)
Summary: some games fail due to soundwrapper segfaulting (fillets-ng, quake2)
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal critical
Target Milestone: ---
Assignee: Colin Guthrie
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-30 09:25 CEST by AL13N
Modified: 2013-05-05 13:52 CEST (History)
3 users (show)

See Also:
Source RPM: soundwrapper
CVE:
Status comment:


Attachments

Description AL13N 2011-04-30 09:25:41 CEST
Description of problem:

Steps to Reproduce:
1. install fish fillets game
2. click on the menu shortcut
3. execute soundwrapper /usr/games/fillets
Comment 1 AL13N 2011-04-30 13:15:24 CEST
the menu shortcut doesn't do anything because it executes step 3.

a gdb backtrace:
env LD_PRELOAD=/lib/libpthread.so.0 gdb soundwrapper
GNU gdb (GDB) 7.1-6.mga1 (Mageia release 1)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-mageia-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/soundwrapper...Reading symbols from /usr/lib/debug/usr/bin/soundwrapper.debug...done.
done.
(gdb) r /usr/games/fillets 
Starting program: /usr/bin/soundwrapper /usr/games/fillets
[Thread debugging using libthread_db enabled]
warning: no loadable sections found in added symbol-file /usr/lib/debug/lib/libwrap.so.0.7.6.debug

Program received signal SIGSEGV, Segmentation fault.
0x00007cce in ?? ()
(gdb) bt
#0  0x00007cce in ?? ()
#1  0xb7e2ebb5 in pa_threaded_mainloop_new () at pulse/thread-mainloop.c:102
#2  0xb7fc6890 in pulse_new () at pulse.c:139
#3  0xb7fc626f in _snd_pcm_pulse_open (pcmp=0xbfffee3c, name=0x80488c7 "default", root=0x80514d0, conf=0x80516c8, stream=SND_PCM_STREAM_PLAYBACK, mode=1)
    at pcm_pulse.c:1036
#4  0xb7826080 in snd_pcm_open_conf (pcmp=0xbfffee3c, name=0x80488c7 "default", pcm_root=0x80514d0, pcm_conf=0x80516c8, stream=SND_PCM_STREAM_PLAYBACK, 
    mode=1) at pcm.c:2166
#5  0xb7826722 in snd_pcm_open_noupdate (pcmp=0xbfffee3c, root=0x80514d0, name=0x80488c7 "default", stream=SND_PCM_STREAM_PLAYBACK, mode=1, hop=0)
    at pcm.c:2220
#6  0x08048666 in main (argc=2, argv=0xbfffef04) at soundwrapper.c:48
Comment 2 Colin Guthrie 2011-04-30 16:48:53 CEST
Hmm, if the client side is calling snd_pcm_open_noupdate() this means the app is using ALSA directly and thus has no need for soundwrapper in the first place.....

Does it run OK without soundwrapper? If so, then I'd just nuke it.

CC: (none) => mageia

Comment 3 AL13N 2011-04-30 19:17:03 CEST
i didn't try, but it shouldn't segfault anyway, right?

it works without it, though, indeed, i'll commit the change
Comment 4 AL13N 2011-05-01 11:39:56 CEST
fillets-ng does work without soundwrapper, and that is fixed.

however, i reproduced the soundwrapper segfaulting with another game: quake2

i'll try to get a usefull backtrace from it
Comment 5 AL13N 2011-05-01 11:58:37 CEST
backtrace from running with quake2:

#0  0x00007cce in ?? ()
#1  0xb7e2ebb5 in pa_threaded_mainloop_new () at pulse/thread-mainloop.c:102
#2  0xb7fc6890 in pulse_new () at pulse.c:139
#3  0xb7fc626f in _snd_pcm_pulse_open (pcmp=0xbfffee0c, name=0x80488c7 "default", root=0x80514d0, conf=0x80516c8, stream=SND_PCM_STREAM_PLAYBACK, mode=1)
    at pcm_pulse.c:1036
#4  0xb7826080 in snd_pcm_open_conf (pcmp=0xbfffee0c, name=0x80488c7 "default", pcm_root=0x80514d0, pcm_conf=0x80516c8, stream=SND_PCM_STREAM_PLAYBACK, 
    mode=1) at pcm.c:2166
#5  0xb7826722 in snd_pcm_open_noupdate (pcmp=0xbfffee0c, root=0x80514d0, name=0x80488c7 "default", stream=SND_PCM_STREAM_PLAYBACK, mode=1, hop=0)
    at pcm.c:2220
#6  0x08048666 in main (argc=5, argv=0xbfffeed4) at soundwrapper.c:48
Comment 6 Colin Guthrie 2011-05-02 22:41:00 CEST
Again, this is soundwrapper + direct alsa support which makes no sense, but I agree to the point of principle that it should not cause crashes directly...

I'll take a look, but please fix quake2 to not run soundwrapper too :) (/me doesn't really play games so don't have it installed).
Comment 7 AL13N 2011-05-02 22:45:12 CEST
hold on, hold on...

iinm, quake2 runs on OSS...(/dev/dsp) and i have no sound from it at all... and it's configured to run without soundwrapper...
Comment 8 Colin Guthrie 2011-05-02 22:49:42 CEST
Hmmm, that's a very confusing backtrace then, as this is clearly using alsa calls...

I wonder if soundwrapper is not working with pulse and instead running in "alsa" mode.... in other words rather than running padsp, it's running aoss... That would explain things (and perhaps I misdiagnosed fillets too?)

Can you maybe test running aoss and padsp directly? If the former crashes but the latter works, then this is possibly pointing at where the problem is :)
Comment 9 AL13N 2011-05-03 00:42:44 CEST
i'm not sure how to test that? (do you mean, using that command like soundwrapper?)

also fillets had sound without it, quake2 doesn't have sound
Comment 10 Samuel Verschelde 2011-10-01 03:15:22 CEST
Assigning to maintainer now that our maintainers database has an entry for
this package. Please assign back to bugsquad@mageia.org in case of a mistake
from me.

CC: (none) => stormi
Assignee: bugsquad => mageia
Summary: fish fillets game fails due to soundwrapper segfaulting => some games fail due to soundwrapper segfaulting (fillets-ng, quake2)

Comment 11 Colin Guthrie 2011-10-02 12:32:37 CEST
For mga cauldron I'm going to introduce osspd soon and deprecate soundwrapper. I'll leave this bug open for the time being, but osspd is going to be the recommended configuration for legacy OSS support in mga2. With any luck we'll get mmap support in there too :) Watch this space.
Comment 12 Marja Van Waes 2012-01-08 13:52:13 CET
pinging. because nothing happened to this report since more than 3 months ago, and it still has the status NEW or REOPENED

@ Colin

Please set status to ASSIGNED if you think this bug was assigned correctly. If for work flow reasons you can't do that, then please put OK on the whiteboard instead.

CC: (none) => marja11

Comment 13 Marja Van Waes 2012-04-20 17:24:04 CEST
(In reply to comment #11)
> For mga cauldron I'm going to introduce osspd soon and deprecate soundwrapper.
> I'll leave this bug open for the time being, but osspd is going to be the
> recommended configuration for legacy OSS support in mga2. With any luck we'll
> get mmap support in there too :) Watch this space.

soundwrapper is still in cauldron (at least Sophie says so)
ossp (OSS (Open Sound System) Proxy Daemon) is in cauldron too

Last revision of ossp:

> Sun Feb 5 2012 luigiwalser <luigiwalser> 1.7-1.mga2

> + Revision: 204839
> - Release 1.7
> - link to pthread to fix mga #1085 (use with gdb), noted by Maarten Vanraes
> - don't redirect sound when osspd is running, suggested by Colin Guthrie

@ AL13N

Do you still have problems?
Comment 14 Colin Guthrie 2012-04-20 17:45:06 CEST
Just for reference the mmap support in osspd is not yet available, so some legacy games won't work all that well, but such is life.

There have been discussions in the last couple days about people looking at mmap support in fuse and the kernel such that osspd can use it, so by the time mga3 rolls around this will likely be the recommended solution.
Comment 15 Marja Van Waes 2012-05-26 13:03:03 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 16 AL13N 2012-06-14 21:49:28 CEST
colin: can soundwrapper be deprecated now?

Keywords: NEEDINFO => (none)

Comment 17 Marja Van Waes 2012-07-06 15:04:17 CEST
Please look at the bottom of this mail to see whether you're the assignee of this  bug, if you don't already know whether you are.


If you're the assignee:

We'd like to know for sure whether this bug was assigned correctly. Please change status to ASSIGNED if it is, or put OK on the whiteboard instead.

If you don't have a clue and don't see a way to find out, then please put NEEDHELP on the whiteboard.

Please assign back to Bug Squad or to the correct person to solve this bug if we were wrong to assign it to you, and explain why.

Thanks :)

**************************** 

@ the reporter and persons in the cc of this bug:

If you have any new information that wasn't given before (like this bug being valid for another version of Mageia, too, or it being solved) please tell us.

@ the reporter of this bug

If you didn't reply yet to a request for more information, please do so within two weeks from now.

Thanks all :-D
Comment 18 Colin Guthrie 2012-07-27 17:26:22 CEST
I'm not sure soundwrapper can be fully deprecated until osspd can use mmap (there are some patches kicking around for it).
Comment 19 AL13N 2013-05-05 13:52:09 CEST
i'm closing as old

Status: NEW => RESOLVED
Resolution: (none) => OLD


Note You need to log in before you can comment on or make changes to this bug.