Bug 245712 - nasd outputs only part of a sample, client stalls -- except under strace
nasd outputs only part of a sample, client stalls -- except under strace
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: nas (Show other bugs)
7
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Frank Büttner
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-26 05:35 EDT by Bob Gautier
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-02 13:31:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Sound config log (104.85 KB, text/plain)
2007-06-26 05:38 EDT, Bob Gautier
no flags Details
nasd configuration (2.81 KB, text/plain)
2007-06-26 05:39 EDT, Bob Gautier
no flags Details
nasd debug output, annotated to show points at which stalls happen (3.92 KB, text/plain)
2007-06-26 05:40 EDT, Bob Gautier
no flags Details
strace log of running nasd (which playing the sample correctly) (18.49 KB, text/plain)
2007-06-26 05:41 EDT, Bob Gautier
no flags Details
strace log of nasd with debug turned on too (played sample correctly) (33.08 KB, text/plain)
2007-06-26 05:42 EDT, Bob Gautier
no flags Details
strace of auplay when it stalls (9.15 KB, text/plain)
2007-06-26 05:45 EDT, Bob Gautier
no flags Details
strace of auplay running to completion (i.e. when nasd is under strace) (9.59 KB, text/plain)
2007-06-26 05:46 EDT, Bob Gautier
no flags Details
/proc/asound/oss/devices (219 bytes, text/plain)
2007-07-30 09:31 EDT, Bob Gautier
no flags Details
/proc/asound/oss/sndstat (530 bytes, text/plain)
2007-07-30 09:32 EDT, Bob Gautier
no flags Details

  None (edit)
Description Bob Gautier 2007-06-26 05:35:55 EDT
Description of problem:

Using an 'out of the box' nasd configuration, when I attempt to play a .wav file
using auplay, only the first few milliseconds of the sample are played, and the
client stalls.

On interrrupting the client with CTRL/C I can try again and get the same behaviour.

If I try to run another client while the first is stalled, that one stalls and
produces no sound.

Terminating the nasd server causes the clients to exit.

If I run nasd under strace, nasd behaves as expected, and plays sounds to
completion.

Version-Release number of selected component (if applicable):

nas-1.9-2.fc7
strace-4.5.15-1.fc7

How reproducible:

Completely.

Steps to Reproduce:

FAILING CASE

1. service nasd start
2. auplay <some sample>.wav
3. Note that only a few milliseconds of sound are output
4. Note that the client stalls
5a. CTRL/C will terminate the client
5b. Alternatively, shutting down the server will cause the client to exit

WORKAROUND/DIAGNOSTIC:

1. service nasd start
2. Identify the pid of the nasd process
3. strace -p<pid>
4. auplay <some sample>.wav
5. The sound plays as expected, to completion, and auplay exits
  
Actual results:

If nasd is not run under strace, it stalls after producing a small amount of
sound.  The client stalls too.

Expected results:

The entire sample should be played, and the client should exit once that has
happened.

Running a program under strace should not affect its operation.

Additional info:

I am running on a Dell Inspiron 6000 laptop and will attach some debug and
strace logs, along with my scsconfig.log and nasd.conf
Comment 1 Bob Gautier 2007-06-26 05:38:39 EDT
Created attachment 157862 [details]
Sound config log
Comment 2 Bob Gautier 2007-06-26 05:39:26 EDT
Created attachment 157863 [details]
nasd configuration
Comment 3 Bob Gautier 2007-06-26 05:40:48 EDT
Created attachment 157865 [details]
nasd debug output, annotated to show points at which stalls happen
Comment 4 Bob Gautier 2007-06-26 05:41:46 EDT
Created attachment 157866 [details]
strace log of running nasd (which playing the sample correctly)
Comment 5 Bob Gautier 2007-06-26 05:42:38 EDT
Created attachment 157867 [details]
strace log of nasd with debug turned on too (played sample correctly)
Comment 6 Bob Gautier 2007-06-26 05:45:25 EDT
Created attachment 157868 [details]
strace of auplay when it stalls
Comment 7 Bob Gautier 2007-06-26 05:46:39 EDT
Created attachment 157869 [details]
strace of auplay running to completion (i.e. when nasd is under strace)
Comment 8 Frank Büttner 2007-06-30 03:51:27 EDT
So please set the next time the correct attachment type!!!
I have send the report to the developer of nasd.
Comment 9 Frank Büttner 2007-06-30 10:29:50 EDT
I have the first answer from the developers.
They say, that more infos are needed.

Regarding the bug report: Since nasd uses OSS the contents of
/proc/asound/oss/devices and /proc/asound/oss/sndstat are important as
well. And using a high debug value (e.g. 99) in nasd.conf might be useful
as well.
Comment 10 Frank Büttner 2007-07-01 01:39:07 EDT
Next information from the developers.
Interesting... A couple of questions:

  - does this happen with _any_ wav file?

  - If you start the client, wait for it to stall, and _then_ strace
    nasd does it recover?


  strace can effect the behavior of a running application if what you
  are seeing is a race condition of some sort.

  Adding an osLogMsg() call to intervalProc() might provide a clue.
  If intervalProc is only called once, then there is a signal problem
  of some sort. 
Comment 11 Bob Gautier 2007-07-30 09:30:13 EDT
This happens with any wav file.

If I start the client, wait for stall and then strace, nasd does NOT recover.

The only way I've gotten output to complete is by having strace attached to nasd
before I run the client.

I will attach the files requested from /proc/asound/oss
Comment 12 Bob Gautier 2007-07-30 09:31:48 EDT
Created attachment 160244 [details]
/proc/asound/oss/devices
Comment 13 Bob Gautier 2007-07-30 09:32:16 EDT
Created attachment 160245 [details]
/proc/asound/oss/sndstat
Comment 14 Frank Büttner 2007-08-04 01:00:53 EDT
At the mailing list for nas it sound's like an kernel problem, but I have
forward your files.
Comment 15 Frank Büttner 2007-08-18 01:28:49 EDT
So now they have send an test patch.
So please test the last devel version 1.9-4.
Comment 16 Frank Büttner 2007-10-28 03:27:40 EDT
The developers have release an new test version 1.9a.
So please test it.
Comment 17 Fedora Update System 2007-11-05 10:10:50 EST
nas-1.9a-3.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 18 Bob Gautier 2007-11-05 15:32:57 EST
I've just tested nas-1.9-4.fc8 with kernel-2.6.23.1-10.fc7 and this combination
works fine, thanks.
Comment 19 Fedora Update System 2007-11-06 11:07:58 EST
nas-1.9a-3.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

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