[Hardy] module-suspend-on-idle fails an assertion when manually configuring alsa outputs

Bug #203654 reported by Chow Loong Jin
32
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

I commented out "load-module module-hal-detect" and added in "load-module module-alsa-sink device=dmix" as well as "load-module module-alsa-source device=dsnoop", in an effort to get PulseAudio to use dmix so that Skype can coexist with it. However, occassionally, I get some assertion failed:
pulseaudio: pulsecore/source.c:273: pa_source_post: Assertion
 `PA_SOURCE_OPENED(s->thread_info.state)' failed.

This is very similar to the case reported here: https://tango.0pointer.de/pipermail/pulseaudio-discuss/2007-October/000800.html
Appropriate snippet:
Second, PulseAudio would crash on startup with this message:
I: module-suspend-on-idle.c: Source bluetooth.monitor idle for too long,
 suspending ...
pulseaudio: pulsecore/source.c:273: pa_source_post: Assertion
 `PA_SOURCE_OPENED(s->thread_info.state)' failed.
(In fact, nobody ever opened that source.) To cure the problem I omitted
loading module-suspend-on-idle, but it looks like a nice feature, and is
there something I might have done / not done to break it?

In my case, omitting module-suspend-on-idle also stops this from happening.

Also this problem happens randomly. Sometimes it works, sometimes it doesn't. As such I suspect it's some sort of race condition.

Backtrace when it does happen:
#0 0xb7f00410 in ?? () from /usr/lib/libsndfile.so.1
#1 0xb7705d58 in ?? ()
#2 0x00000006 in ?? ()
#3 0x00003e58 in ?? ()
#4 0xb7b8ff75 in ?? ()
#5 0xb7cafff4 in envz_merge () from /lib/tls/i686/cmov/libc.so.6
#6 0xb7b91a45 in ?? ()
#7 0x00000006 in ?? ()
#8 0xb7705d6c in ?? ()
#9 0x00000000 in ?? ()

Output of "pulseaudio -vv"
I: main.c: We're in the group 'pulse-rt', allowing real-time and high-priority scheduling.
I: core-util.c: Successfully gained nice level -11.
I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
I: main.c: Page size is 4096 bytes
I: main.c: Fresh high-resolution timers available! Bon appetit!
I: module-alsa-sink.c: Successfully opened device dmix.
I: module-alsa-sink.c: Successfully enabled mmap() mode.
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL dmix
I: alsa-util.c: Unable to attach to mixer dmix: No such file or directory
I: alsa-util.c: Unable to attach to mixer hw:(null): No such device
I: sink.c: Created sink 0 "output" with sample spec "s16le 2ch 48000Hz"
I: source.c: Created source 0 "output.monitor" with sample spec "s16le 2ch 48000Hz"
I: module-alsa-sink.c: Using 5 fragments of size 4096 bytes.
D: module-alsa-sink.c: Thread starting up
D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+29
I: module-alsa-sink.c: Starting playback.
I: module.c: Loaded "module-alsa-sink" (index: #0; argument: "device=dmix sink_name=output").
I: module-alsa-source.c: Successfully opened device dsnoop.
I: module-alsa-source.c: Successfully enabled mmap() mode.
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL dsnoop
I: alsa-util.c: Unable to attach to mixer dsnoop: No such file or directory
I: alsa-util.c: Unable to attach to mixer hw:(null): No such device
I: source.c: Created source 1 "input" with sample spec "s16le 2ch 48000Hz"
I: module-alsa-source.c: Using 5 fragments of size 4096 bytes.
D: module-alsa-source.c: Thread starting up
D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+28
I: module.c: Loaded "module-alsa-source" (index: #1; argument: "device=dsnoop source_name=input").
D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9/modules//module-hal-detect.so': success
I: module.c: Loaded "module-esound-protocol-unix" (index: #2; argument: "").
I: protocol-native.c: loading cookie from disk.
I: module.c: Loaded "module-native-protocol-unix" (index: #3; argument: "").
I: module.c: Loaded "module-volume-restore" (index: #4; argument: "").
D: module-default-device-restore.c: No previous default sink setting, ignoring.
D: module-default-device-restore.c: No previous default source setting, ignoring.
I: module.c: Loaded "module-default-device-restore" (index: #5; argument: "").
I: module.c: Loaded "module-rescue-streams" (index: #6; argument: "").
D: module-suspend-on-idle.c: Sink output becomes idle.
D: module-suspend-on-idle.c: Source output.monitor becomes idle.
D: module-suspend-on-idle.c: Source input becomes idle.
I: module.c: Loaded "module-suspend-on-idle" (index: #7; argument: "").
D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9/modules//module-x11-publish.so': failure
D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9/modules//module-gconf.so': success
D: module-gconf.c: Loading module 'module-native-protocol-tcp' with args '' due to GConf configuration.
I: protocol-native.c: using already loaded auth cookie.
I: protocol-native.c: using already loaded auth cookie.
I: module.c: Loaded "module-native-protocol-tcp" (index: #8; argument: "").
D: module-gconf.c: Loading module 'module-esound-protocol-tcp' with args '' due to GConf configuration.
I: module.c: Loaded "module-esound-protocol-tcp" (index: #9; argument: "").
D: module-gconf.c: Loading module 'module-zeroconf-publish' with args '' due to GConf configuration.
D: module-zeroconf-publish.c: Publishing services in Zeroconf
D: module-zeroconf-publish.c: Successfully created entry group for hyperair@Hyperair-PC: ALSA PCM on dmix (dmix) via DMA.
D: module-zeroconf-publish.c: Successfully created entry group for hyperair@Hyperair-PC: ALSA PCM on dsnoop (dsnoop) via DMA.
I: module.c: Loaded "module-zeroconf-publish" (index: #10; argument: "").
I: module.c: Loaded "module-gconf" (index: #11; argument: "").
I: main.c: Daemon startup complete.
I: module-zeroconf-publish.c: Successfully established service hyperair@Hyperair-PC: ALSA PCM on dmix (dmix) via DMA.
I: module-zeroconf-publish.c: Successfully established service hyperair@Hyperair-PC: ALSA PCM on dsnoop (dsnoop) via DMA.
I: module-zeroconf-publish.c: Successfully established main service.
I: module-suspend-on-idle.c: Source input idle for too long, suspending ...
I: module-alsa-source.c: Device suspended...
I: module-suspend-on-idle.c: Source output.monitor idle for too long, suspending ...
pulseaudio: pulsecore/source.c:278: pa_source_post: Assertion `PA_SOURCE_OPENED(s->thread_info.state)' failed.
Aborted

Revision history for this message
Chow Loong Jin (hyperair) wrote :
Changed in pulseaudio:
assignee: nobody → desktop-bugs
Changed in pulseaudio:
assignee: desktop-bugs → nobody
Revision history for this message
Daniel T Chen (crimsun) wrote :

The workaround is to load module-suspend-on-idle first.

Changed in pulseaudio:
importance: Undecided → Low
status: New → Confirmed
Daniel T Chen (crimsun)
Changed in pulseaudio:
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 0.9.13-2ubuntu5

---------------
pulseaudio (0.9.13-2ubuntu5) jaunty; urgency=low

  [ Daniel T Chen ]
  * Add fixes from git:
    - 0015_use_fionread.patch,
    - 0016_add_pa-source-message-get-latency.patch,
    - 0017_allow_dev_dsp_w-ok.patch,
    - 0018_fix_return_val_pa-frame-aligned.patch,
    - 0019_fix_macro_pa-unlikely.patch,
    - 0020_catch_driver_errors.patch (LP: #312373),
    - 0021_convert_to_pa-bool-t.patch,
    - 0022_fix_return_val_dump-resample-methods.patch,
    - 0023_use_gdbm-nolock.patch,
    - 0024_dont_mix_front-center_into_rear.patch,
    - 0025_drop_cap-nice_properly.patch,
    - 0027_handle_multicast_sdp_with_same_ip_ttl_as_rtp.patch,
    - 0028_prefer_mixer_controls_with_vols.patch (LP: #281605),
    - 0029_add_minor_fixes.patch
  * Forward-port workaround from hardy branch for source/sink and
    suspend-on-idle race (LP: #203654):
    - 0026_work_around_suspend-on-idle_source_sink_race.patch
  * debian/control: Drop padevchooser(Recommends) and pavucontrol
    (Suggests) completely - functionality has been subsumed by
    jaunty's gnome-volume-control.
  * debian/pulseaudio.init:
    - Make initscript more informative in the default case of per-user
      sessions (LP: #259522),
    - Make initscript retry (until three-second timeout) if stopping
      fails when restarting (LP: #244414),
    - LSB {Required-*,Should-*} should specify hal instead of dbus,
      since hal is required (and already requires dbus) (LP: #244679)
  * Previous upload contains patches to close:
    LP: #193491, #268891, #295164, #298301

  [ Luke Yelavich ]
  * 0008_regen_autotools.patch: Pull some libtool 2.2 updates from git,
    and regenerate autotools glue.
  * debian/rules: Add --enable-static to force creation of libpulse.a,
    a side-effect of messing with the autotools files. This shouldn't
    be needed for the 0.9.14 release.

 -- Luke Yelavich <email address hidden> Fri, 09 Jan 2009 17:05:38 +1100

Changed in pulseaudio:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.