Bug 61262

Summary: Assertion Failure when Bluetooth A2DP Stream Starts Playing
Product: PulseAudio Reporter: Andrew Wiley <debio264>
Component: daemonAssignee: pulseaudio-bugs
Status: RESOLVED WORKSFORME QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: debio264, lennart
Version: unspecified   
Hardware: ARM   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 63665    
Attachments: Full Log
Session Log
Session Log (with no truncated lines)

Description Andrew Wiley 2013-02-22 05:48:10 UTC
Created attachment 75291 [details]
Full Log

I'm trying to play audio from a phone to an ARM Box running Arch Linux ARM with BlueZ and PulseAudio. Everything is fine right up until I actually hit start on the phone, at which point this happens consistently:

D: [pulseaudio] bluetooth-util.c: dbus: interface=org.bluez.AudioSource, path=/org/bluez/11974/hci0/dev_40_FC_89_41_91_FF, member=PropertyChanged
D: [pulseaudio] bluetooth-util.c: dbus: property 'State' changed to value 'playing'
D: [pulseaudio] module-bluetooth-device.c: dbus: interface=org.bluez.AudioSource, path=/org/bluez/11974/hci0/dev_40_FC_89_41_91_FF, member=PropertyChanged
D: [pulseaudio] module-bluetooth-device.c: dbus: org.bluez.AudioSource property 'State' changed to value 'playing'
D: [pulseaudio] device-port.c: Setting port a2dp-input to status yes
D: [pulseaudio] module-bluetooth-policy.c: Setting card 'bluez_card.40_FC_89_41_91_FF' to profile 'a2dp_source'
W: [pulseaudio] module-bluetooth-device.c: Profile has no transport
W: [pulseaudio] module-bluetooth-policy.c: Could not set profile 'a2dp_source'
D: [pulseaudio] module-switch-on-port-available.c: finding port a2dp-input
D: [pulseaudio] module-switch-on-port-available.c: Finding best profile
W: [pulseaudio] module-bluetooth-device.c: Profile has no transport
D: [pulseaudio] module-switch-on-port-available.c: Could not set profile a2dp_source
E: [pulseaudio] module-bluetooth-device.c: Assertion 'u->transport' failed at modules/bluetooth/module-bluetooth-device.c:388, function bt_transport_acquire(). Aborting.

I have a full log of the run attached, along with a backtrace (although the backtrace isn't very enlightening).
Comment 1 Tanu Kaskinen 2013-02-22 09:37:43 UTC
This problem is likely fixed by this patch: http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=5d4b7c4a89652d70a924d1c6091398c5b2d84bd3

Would it be possible for you to try that patch (or using the latest development version from git)?
Comment 2 Andrew Wiley 2013-02-22 09:53:20 UTC
Aye, building the latest git revision now.
Comment 3 Andrew Wiley 2013-02-23 00:15:09 UTC
Created attachment 75388 [details]
Session Log
Comment 4 Andrew Wiley 2013-02-23 00:16:15 UTC
So I build and ran the latest git revision, and while PulseAudio no longer fails any assertions, I still get no audio. The logs look normal and include messages about PA discovering the Bluetooth device and observing changes in its state, but no card or source ever appears in pactl. I've attached a system log of a session where the already-paired device connects and begins playing.

The only thing I can see wrong with the logs is that one message seems to be dropped by DBus. I don't really see why, though.
Comment 5 Andrew Wiley 2013-02-23 00:18:17 UTC
Created attachment 75389 [details]
Session Log (with no truncated lines)
Comment 6 Tanu Kaskinen 2013-02-27 18:13:37 UTC
When the org.bluez.AudioSource state changes to "connected", module-bluetooth-device should get loaded. I don't know why that doesn't happen.
Comment 7 Arun Raghavan 2013-04-18 04:31:54 UTC
Any updates here?
Comment 8 George Kiagiadakis 2013-04-19 11:15:41 UTC
I just hit this issue as well with pulseaudio v3.0. I am trying to make a call over bluetooth. As soon as the phone is initialized by setting its "Powered" property to "true" in ofono, pulseaudio crashes with this assertion and at the same time dmesg gets flooded with loads of kernel messages like this:

Bluetooth: hci0 SCO packet for unknown connection handle 65535

I not exactly sure though if pulseaudio crashes because of the kernel issue or it's because of the pulseaudio crash that the kernel goes mad.
Comment 9 Arun Raghavan 2013-04-29 06:44:37 UTC
(In reply to comment #8)
> I just hit this issue as well with pulseaudio v3.0. I am trying to make a

Any chance you could try with 3.99.1?
Comment 10 George Kiagiadakis 2013-05-04 06:42:17 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > I just hit this issue as well with pulseaudio v3.0. I am trying to make a
> 
> Any chance you could try with 3.99.1?

Yes, I tried 3.99.1 and it doesn't crash anymore.

The kernel issue is a different thing (I believe there is a bug on the phone, sending invalid headers).

Unless you are interested in fixing v3.0, I guess you could close this bug.
Comment 11 Arun Raghavan 2013-05-13 05:12:30 UTC
Marking resolved based on previous comment.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.