Bug 245712 - nasd outputs only part of a sample, client stalls -- except under strace
Summary: nasd outputs only part of a sample, client stalls -- except under strace
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: nas
Version: 7
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Frank Büttner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-26 09:35 UTC by Bob Gautier
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-02 17:31:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Sound config log (104.85 KB, text/plain)
2007-06-26 09:38 UTC, Bob Gautier
no flags Details
nasd configuration (2.81 KB, text/plain)
2007-06-26 09:39 UTC, Bob Gautier
no flags Details
nasd debug output, annotated to show points at which stalls happen (3.92 KB, text/plain)
2007-06-26 09:40 UTC, Bob Gautier
no flags Details
strace log of running nasd (which playing the sample correctly) (18.49 KB, text/plain)
2007-06-26 09:41 UTC, 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 09:42 UTC, Bob Gautier
no flags Details
strace of auplay when it stalls (9.15 KB, text/plain)
2007-06-26 09:45 UTC, 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 09:46 UTC, Bob Gautier
no flags Details
/proc/asound/oss/devices (219 bytes, text/plain)
2007-07-30 13:31 UTC, Bob Gautier
no flags Details
/proc/asound/oss/sndstat (530 bytes, text/plain)
2007-07-30 13:32 UTC, Bob Gautier
no flags Details

Description Bob Gautier 2007-06-26 09:35:55 UTC
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 09:38:39 UTC
Created attachment 157862 [details]
Sound config log

Comment 2 Bob Gautier 2007-06-26 09:39:26 UTC
Created attachment 157863 [details]
nasd configuration

Comment 3 Bob Gautier 2007-06-26 09:40:48 UTC
Created attachment 157865 [details]
nasd debug output, annotated to show points at which stalls happen

Comment 4 Bob Gautier 2007-06-26 09:41:46 UTC
Created attachment 157866 [details]
strace log of running nasd (which playing the sample correctly)

Comment 5 Bob Gautier 2007-06-26 09:42:38 UTC
Created attachment 157867 [details]
strace log of nasd with debug turned on too (played sample correctly)

Comment 6 Bob Gautier 2007-06-26 09:45:25 UTC
Created attachment 157868 [details]
strace of auplay when it stalls

Comment 7 Bob Gautier 2007-06-26 09:46:39 UTC
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 07:51:27 UTC
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 14:29:50 UTC
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 05:39:07 UTC
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 13:30:13 UTC
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 13:31:48 UTC
Created attachment 160244 [details]
/proc/asound/oss/devices

Comment 13 Bob Gautier 2007-07-30 13:32:16 UTC
Created attachment 160245 [details]
/proc/asound/oss/sndstat

Comment 14 Frank Büttner 2007-08-04 05:00:53 UTC
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 05:28:49 UTC
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 07:27:40 UTC
The developers have release an new test version 1.9a.
So please test it.

Comment 17 Fedora Update System 2007-11-05 15:10:50 UTC
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 20:32:57 UTC
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 16:07:58 UTC
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.