Subject: kern/19990: SIGCONT/SIGSTOP broken since SA merge
To: None <gnats-bugs@gnats.netbsd.org>
From: Martin Husemann <martin@insomnia.duskware.de>
List: netbsd-bugs
Date: 01/22/2003 06:43:34
>Number:         19990
>Category:       kern
>Synopsis:       SIGCONT/SIGSTOP broken since SA merge
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 21 21:44:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Martin Husemann
>Release:        NetBSD 1.6M
>Organization:
>Environment:
System: NetBSD insomnia.duskware.de 1.6M NetBSD 1.6M (INSOMNIA) #0: Mon Jan 20 18:30:36 CET 2003 martin@insomnia.duskware.de:/usr/src/sys/arch/i386/compile/INSOMNIA i386
Architecture: i386
Machine: i386
>Description:

When using mpg123 from pkgsrc/audio to listen to mp3s from a NFS mounted
directory (did not test if NFS is important here) and STOP/CONTing the
playback it sometimes (but often) fails to continue properly.

It's necessary to use the -b argument so mpg123 creates two processes -
my guess is that only one of them continues, while the other stays stopped.

Example:

[/mnt/Rage/Unity] martin@insomnia > mpg123 -b 1024 "Rage - Dies Irae.mp3"
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title  : Dies Irae                       Artist: Rage
Album  : Unity                           Year  :     
Comment:                                 Genre : Unknown

Playing MPEG stream from Rage - Dies Irae.mp3 ...
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo
^Z
Suspended
[/mnt/Rage/Unity] martin@insomnia > fg
mpg123 -b 1024 Rage - Dies Irae.mp3
^Z
Suspended
[/mnt/Rage/Unity] martin@insomnia > ps ax |fgrep mpg
1570 p0 S    0:00.14 mpg123 -b 1024 Rage - Dies Irae.mp3 
1571 p0 T    0:00.01 mpg123 -b 1024 Rage - Dies Irae.mp3 
1573 p0 R+   0:00.00 fgrep mpg 
[/mnt/Rage/Unity] martin@insomnia > fg
mpg123 -b 1024 Rage - Dies Irae.mp3
^Z
Suspended
[/mnt/Rage/Unity] martin@insomnia > fg

While after the first "fg" the playback continued normally, after the second
it just drained the rest of the 1024k buffer and then stopped, as if the
decoder process did not resume. ^Cing in that state kills both processes.

>From another try, in the "not working" case ps shows this:

1626 p0 S+   0:00.20 mpg123 -b 1024 Rage - Dies Irae.mp3 
1627 p0 S+   0:00.02 mpg123 -b 1024 Rage - Dies Irae.mp3 

>How-To-Repeat:

I tried to write a simple program demonstrating the effect, but no matter
what I tried it just worked. So somehow one of the more complex parts
of the above scenario must play its role (blocking on slow /dev/audio
writes, busy CPU on the mp3 decoder, ...)

>Fix:
n/a
>Release-Note:
>Audit-Trail:
>Unformatted: