Skip to contentSkip to conversation

rtcw,quake3 hang on exit

DISCUSSION Michael Jochum 5 participants 11 messages Mar 20, 2002 – Apr 9, 2002

lore
Share & tools
lore
#0 lore raw

hi!

some time back there has been a similar bug report about the same problem:
http://www.mail-archive.com/[email protected]/msg01675.html
with no response ... so i will be a bit more verbose :)

it have this problem on all computers (Athlon, P3, P4, Cleron) i have access to. all of them have different sound cards (SB128, SB Live, AC97 Via686 and AC97 on a i845) and on all of them i have used various 0.9 betas of alsa and versions of the linux kernel (2.4.5 to 2.4.18). no problem with the oss driver

i have done a strace run of rtcw and found some interesting things:

somewhere rtcw opens the dsp device:
open("/dev/dsp", O_RDWR) = 16
but i cant find the coresponding
close(16)

this are the last lines of output (process locks here):

write(2, "----- CL_Shutdown -----\n", 24) = 24
write(2, "-----------------------\n", 24) = 24
fcntl64(0, F_GETFL) = 0x802 (flags
O_RDWR|O_NONBLOCK)
fcntl64(0, F_SETFL, O_RDWR) = 0
write(2, "Shutdown tty console\n", 21) = 21
ioctl(0, SNDCTL_TMR_STOP, {B38400 opost isig icanon echo ...}) = 0
_exit(0) = ?

i dont know much about kernel internals - but isnt _exit a kernel syscal that is supposed to close all open devices?
so what kind of bug is this? rtcw? alsa? kernel?

this is a very anoying bug for me and it would be nice if someone could help me with this problem. i have even mada a panel button to kill the hanging processes :)

tia,
michael.

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#1 lore raw

I can confirm this an an Athlon with CM8738-6CH sound card, as well as some other interesting related effects. These problems exist even if rtcw/q3demo are called using the "aoss" wrapper script.

Quoted 48 lines · Michael Jochum

hi!

some time back there has been a similar bug report about the same problem:
http://www.mail-archive.com/[email protected]/msg01675.html
with no response ... so i will be a bit more verbose :)

it have this problem on all computers (Athlon, P3, P4, Cleron) i have access to. all of them have different sound cards (SB128, SB Live, AC97 Via686 and AC97 on a i845) and on all of them i have used various 0.9 betas of alsa and versions of the linux kernel (2.4.5 to 2.4.18). no problem with the oss driver

i have done a strace run of rtcw and found some interesting things:

somewhere rtcw opens the dsp device:
open("/dev/dsp", O_RDWR) = 16
but i cant find the coresponding
close(16)

this are the last lines of output (process locks here):

write(2, "----- CL_Shutdown -----\n", 24) = 24
write(2, "-----------------------\n", 24) = 24
fcntl64(0, F_GETFL) = 0x802 (flags
O_RDWR|O_NONBLOCK)
fcntl64(0, F_SETFL, O_RDWR) = 0
write(2, "Shutdown tty console\n", 21) = 21
ioctl(0, SNDCTL_TMR_STOP, {B38400 opost isig icanon echo ...}) = 0
_exit(0) = ?

i dont know much about kernel internals - but isnt _exit a kernel syscal that is supposed to close all open devices?
so what kind of bug is this? rtcw? alsa? kernel?

this is a very anoying bug for me and it would be nice if someone could help me with this problem. i have even mada a panel button to kill the hanging processes :)

tia,
michael.

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Signature · 11 lines
-Steven
In a time of universal deceit, telling the truth is a revolutionary act.
			-- George Orwell
He's alive.  He's alive!  Oh, that fellow at RadioShack said I was mad!
Well, who's mad now?
			-- Montgomery C. Burns

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
#2 lore raw
In reply to Michael Jochum
Quoted 18 lines

i have done a strace run of rtcw and found some interesting things:

somewhere rtcw opens the dsp device:
open("/dev/dsp", O_RDWR) = 16
but i cant find the coresponding
close(16)

this are the last lines of output (process locks here):

write(2, "----- CL_Shutdown -----\n", 24) = 24
write(2, "-----------------------\n", 24) = 24
fcntl64(0, F_GETFL) = 0x802 (flags
O_RDWR|O_NONBLOCK)
fcntl64(0, F_SETFL, O_RDWR) = 0
write(2, "Shutdown tty console\n", 21) = 21
ioctl(0, SNDCTL_TMR_STOP, {B38400 opost isig icanon echo ...}) = 0
_exit(0) = ?

Quoted 2 lines

i dont know much about kernel internals - but isnt _exit a kernel syscal that is supposed to close all open devices?

sure, it does. but strace won't see, since it all happens *inside* the kernel's handling of sys_exit(). strace merely traces actual syscalls, not what happens inside the kernel. _exit will call sys_close for every file in the task's file table.

Quoted 1 line

so what kind of bug is this? rtcw? alsa? kernel?

you haven't really described the bug very much. something to do with processes left around, etc.

does the program(s) in question use threads? if so, using _exit() will fail to terminate all threads in the process. this is a linux issue.

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#3 lore raw
Quoted 5 lines · Paul Davis
Quoted 1 line

so what kind of bug is this? rtcw? alsa? kernel?

you haven't really described the bug very much. something to do with processes left around, etc.
does the program(s) in question use threads? if so, using _exit() will fail to terminate all threads in the process. this is a linux issue.

But OSS doesn't have the problem. Only ALSA with OSS emulation does.

Quite strongly points to an ALSA-specific problem.

-Dan

Signature · 7 lines
[-] Omae no subete no kichi wa ore no mono da. [-]


_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
#4 lore raw
In reply to Paul Davis

hi paul!

Quoted 5 lines · Paul Davis

sure, it does. but strace won't see, since it all happens *inside* the kernel's handling of sys_exit(). strace merely traces actual syscalls, not what happens inside the kernel. _exit will call sys_close for every file in the task's file table.

Quoted 7 lines
Quoted 1 line

so what kind of bug is this? rtcw? alsa? kernel?

you haven't really described the bug very much. something to do with processes left around, etc.

does the program(s) in question use threads? if so, using _exit() will fail to terminate all threads in the process. this is a linux issue.

rtcw doesn`t use threads theres only one process during the execution of rtcw and thats the process that hangs on exit. the process can be terminatet with Ctrl-C.
Steven Walter reported that the problem also exists in the demo version of the games which is aviable at various places. maybe you could debug the problem?
http://www.3dgamers.com/dl/games/returnwolfenstein/wolfmpdemo-linux-1.1-mp.x86.run.html
its about 66MByets to download and i understand if you don`t have the time to do it - but maybe you can give me some hints to debug the problem.

michael.

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#5 lore raw

On Wed, Mar 20, 2002 at 11:05:52PM +0100, Michael Jochum wrote:
[...]

Quoted 4 lines

Steven Walter reported that the problem also exists in the demo version of the games which is aviable at various places. maybe you could debug the problem?
http://www.3dgamers.com/dl/games/returnwolfenstein/wolfmpdemo-linux-1.1-mp.x86.run.html

[...]

I actually have the full version of RtCW, but the demo of Q3. Haven't tested on the demo of RtCW.

Signature · 11 lines
-Steven
In a time of universal deceit, telling the truth is a revolutionary act.
			-- George Orwell
He's alive.  He's alive!  Oh, that fellow at RadioShack said I was mad!
Well, who's mad now?
			-- Montgomery C. Burns

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
#6 lore raw
In reply to Michael Jochum

Hi,

i got the point.
snd_pcm_playback_drain() (which is called at closing the pcm) never returns when OSS is running on mmap mode.
now fixed on cvs. please give a try.

ciao,

Takashi

At 20 Mar 2002 20:58:22 +0100,

Quoted 50 lines · Michael Jochum

hi!

some time back there has been a similar bug report about the same problem:
http://www.mail-archive.com/[email protected]/msg01675.html
with no response ... so i will be a bit more verbose :)

it have this problem on all computers (Athlon, P3, P4, Cleron) i have access to. all of them have different sound cards (SB128, SB Live, AC97 Via686 and AC97 on a i845) and on all of them i have used various 0.9 betas of alsa and versions of the linux kernel (2.4.5 to 2.4.18). no problem with the oss driver

i have done a strace run of rtcw and found some interesting things:

somewhere rtcw opens the dsp device:
open("/dev/dsp", O_RDWR) = 16
but i cant find the coresponding
close(16)

this are the last lines of output (process locks here):

write(2, "----- CL_Shutdown -----\n", 24) = 24
write(2, "-----------------------\n", 24) = 24
fcntl64(0, F_GETFL) = 0x802 (flags
O_RDWR|O_NONBLOCK)
fcntl64(0, F_SETFL, O_RDWR) = 0
write(2, "Shutdown tty console\n", 21) = 21
ioctl(0, SNDCTL_TMR_STOP, {B38400 opost isig icanon echo ...}) = 0
_exit(0) = ?

i dont know much about kernel internals - but isnt _exit a kernel syscal that is supposed to close all open devices?
so what kind of bug is this? rtcw? alsa? kernel?

this is a very anoying bug for me and it would be nice if someone could help me with this problem. i have even mada a panel button to kill the hanging processes :)

tia,
michael.

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#7 lore raw
Quoted 4 lines · Takashi Iwai

i got the point.
snd_pcm_playback_drain() (which is called at closing the pcm) never returns when OSS is running on mmap mode.
now fixed on cvs. please give a try.

i tried cvs - quake3 and rtcw don`t hang on exit now - BUT there is no sound at all during the game. there is sound during the intro and when moving the mouse over the buttons in the main menu but no sound during the game. maybe the intro does not use the mmap mode?

i applied your patch to 0.9.0beta12 and get the same result as with cvs. the sound works with the original 0.9.0beta12 there is only that exit bug.

i can not say how much i appreciate your help with this problem! i already gave up on that matter.

ciao,
michael

btw what kind of information would help you with solving the problem? strace?

#8 lore raw

Hi Michael,

At 08 Apr 2002 22:01:49 +0200,

Quoted 11 lines · Michael Jochum
Quoted 4 lines · Takashi Iwai

i got the point.
snd_pcm_playback_drain() (which is called at closing the pcm) never returns when OSS is running on mmap mode.
now fixed on cvs. please give a try.

i tried cvs - quake3 and rtcw don`t hang on exit now - BUT there is no sound at all during the game. there is sound during the intro and when moving the mouse over the buttons in the main menu but no sound during the game. maybe the intro does not use the mmap mode?

could you try the following patch?
if it's ok, i'll commit this to cvs.

Takashi

#9 lore raw

Hi,

At Tue, 09 Apr 2002 10:37:33 +0200,

Quoted 13 lines · I wrote:

[1 <text/plain; US-ASCII (7bit)>]
Hi Michael,

At 08 Apr 2002 22:01:49 +0200,

Quoted 7 lines · Michael Jochum
Quoted 4 lines · Takashi Iwai

i got the point.
snd_pcm_playback_drain() (which is called at closing the pcm) never returns when OSS is running on mmap mode.
now fixed on cvs. please give a try.

Quoted 7 lines
Quoted 4 lines

i tried cvs - quake3 and rtcw don`t hang on exit now - BUT there is no sound at all during the game. there is sound during the intro and when moving the mouse over the buttons in the main menu but no sound during the game. maybe the intro does not use the mmap mode?

could you try the following patch?
if it's ok, i'll commit this to cvs.

Jaroslav already committed a better patch.
please try the cvs again.

Takashi

#10 lore raw

Re: rtcw,quake3 hang on exit <<< patch is working!!!!

hi!

the cvs version is working fine now!

thanks to everybody for your help

michael.

Quoted 30 lines · Takashi Iwai

Hi,

At Tue, 09 Apr 2002 10:37:33 +0200,

Quoted 13 lines · I wrote:

[1 <text/plain; US-ASCII (7bit)>]
Hi Michael,

At 08 Apr 2002 22:01:49 +0200,

Quoted 7 lines · Michael Jochum
Quoted 4 lines · Takashi Iwai

i got the point.
snd_pcm_playback_drain() (which is called at closing the pcm) never returns when OSS is running on mmap mode.
now fixed on cvs. please give a try.

Quoted 7 lines
Quoted 4 lines

i tried cvs - quake3 and rtcw don`t hang on exit now - BUT there is no sound at all during the game. there is sound during the intro and when moving the mouse over the buttons in the main menu but no sound during the game. maybe the intro does not use the mmap mode?

could you try the following patch?
if it's ok, i'll commit this to cvs.

Jaroslav already committed a better patch.
please try the cvs again.

Takashi

Signature · 2 lines
Michael Jochum <[email protected]>       icq:   135304479
Tel.:  +43 676 3327 611 smail: A1060 Wien, Liniengasse 16/16