Bug 99260 - PulseAudio daemon hangs after connect Fiio external DAC
Summary: PulseAudio daemon hangs after connect Fiio external DAC
Status: RESOLVED NOTOURBUG
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: daemon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-03 15:43 UTC by lemniscattaden
Modified: 2017-01-04 18:14 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description lemniscattaden 2017-01-03 15:43:40 UTC
When I connect my Fiio X5 II as external DAC to my PC PulseAudio hangs (unkillable). Google knows about this bug (https://bbs.archlinux.org/viewtopic.php?id=202648 http://forum.ubuntu.ru/index.php?topic=263700.0 https://ubuntuforums.org/showthread.php?t=2274844). The same problem with Fiio X3 II. People says that problem assigned with xhci. I can't check this because my motherboard doesn't support xhci disabling.
Fiio works fine without PulseAudio, through ALSA.

Dmesg log from forum (on my system I saw something similar):
Jul 20 02:07:27 archi-desktop kernel: [  719.622886] pulseaudio      D ffff88041ed130c0     0  3276   2983 0x00000004
Jul 20 02:07:27 archi-desktop kernel: [  719.622895]  ffff8803c76d7b60 0000000000000082 ffff8803ed39e5e0 ffff8803c76d7fd8
Jul 20 02:07:27 archi-desktop kernel: [  719.622901]  00000000000130c0 00000000000130c0 ffff880408644750 ffff8800cceb1400
Jul 20 02:07:27 archi-desktop kernel: [  719.622907]  ffff8800c8bc3910 ffff8800cceb1400 0000000000000004 ffff8800c8bc38f0
Jul 20 02:07:27 archi-desktop kernel: [  719.622913] Call Trace:
Jul 20 02:07:27 archi-desktop kernel: [  719.622925]  [<ffffffff8176a2d9>] schedule+0x29/0x70
Jul 20 02:07:27 archi-desktop kernel: [  719.622933]  [<ffffffff8156b3e5>] usb_kill_urb+0x65/0xa0
Jul 20 02:07:27 archi-desktop kernel: [  719.622943]  [<ffffffff810b50b0>] ? prepare_to_wait_event+0x100/0x100
Jul 20 02:07:27 archi-desktop kernel: [  719.622948]  [<ffffffff81569f98>] usb_hcd_flush_endpoint+0x198/0x200
Jul 20 02:07:27 archi-desktop kernel: [  719.622955]  [<ffffffff812478fc>] ? kernfs_find_ns+0x9c/0xf0
Jul 20 02:07:27 archi-desktop kernel: [  719.622962]  [<ffffffff8156d1d9>] usb_disable_endpoint+0x59/0x90
Jul 20 02:07:27 archi-desktop kernel: [  719.622968]  [<ffffffff8156d259>] usb_disable_interface+0x49/0x60
Jul 20 02:07:27 archi-desktop kernel: [  719.622974]  [<ffffffff8156d7ae>] usb_set_interface+0x1be/0x380
Jul 20 02:07:27 archi-desktop kernel: [  719.622986]  [<ffffffffc0e1b881>] snd_usb_init_sample_rate+0x251/0x350 [snd_usb_audio]
Jul 20 02:07:27 archi-desktop kernel: [  719.622999]  [<ffffffffc0e263fe>] snd_usb_pcm_prepare+0xbe/0x550 [snd_usb_audio]
Jul 20 02:07:27 archi-desktop kernel: [  719.623022]  [<ffffffffc0334aea>] ? snd_pcm_lib_ioctl+0x15a/0x260 [snd_pcm]
Jul 20 02:07:27 archi-desktop kernel: [  719.623035]  [<ffffffffc032cd77>] snd_pcm_do_prepare+0x17/0x30 [snd_pcm]
Jul 20 02:07:27 archi-desktop kernel: [  719.623048]  [<ffffffffc032c80d>] snd_pcm_action_single+0x2d/0x70 [snd_pcm]
Jul 20 02:07:27 archi-desktop kernel: [  719.623061]  [<ffffffffc032ca6e>] snd_pcm_action_nonatomic+0x6e/0x80 [snd_pcm]
Jul 20 02:07:27 archi-desktop kernel: [  719.623073]  [<ffffffffc032f962>] snd_pcm_common_ioctl1+0x472/0xd70 [snd_pcm]
Jul 20 02:07:27 archi-desktop kernel: [  719.623082]  [<ffffffff8105afcc>] ? __do_page_fault+0x20c/0x560
Jul 20 02:07:27 archi-desktop kernel: [  719.623094]  [<ffffffffc0330358>] snd_pcm_playback_ioctl1+0xf8/0x250 [snd_pcm]
Jul 20 02:07:27 archi-desktop kernel: [  719.623106]  [<ffffffffc03304e0>] snd_pcm_playback_ioctl+0x30/0x40 [snd_pcm]
Jul 20 02:07:27 archi-desktop kernel: [  719.623113]  [<ffffffff811e7670>] do_vfs_ioctl+0x2e0/0x4c0
Jul 20 02:07:27 archi-desktop kernel: [  719.623119]  [<ffffffff811e78d1>] SyS_ioctl+0x81/0xa0
Jul 20 02:07:27 archi-desktop kernel: [  719.623127]  [<ffffffff8176e34d>] system_call_fastpath+0x1a/0x1f

lsusb:
Bus 001 Device 005: ID 2972:0006

cat /proc/asound/cards                                                                                
 0 [DAC            ]: USB-Audio - FiiO USB Audio Class 2.0 DAC                                                     
                      SmartAction FiiO USB Audio Class 2.0 DAC at usb-0000:00:14.0-11, high speed 

pulseaudio log from forum (if you ask I can take log from my system)
[bart@BartPCArch ~]$ pulseaudio -vvvv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 6.0
D: [pulseaudio] main.c: Compilation host: x86_64-unknown-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux x86_64 4.1.6-1-ARCH #1 SMP PREEMPT Mon Aug 17 08:52:28 CEST 2015
D: [pulseaudio] main.c: Found 8 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 285aceef9581452e8da5a89ae08b86a4.
I: [pulseaudio] main.c: Session ID is c1.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/bart/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-6.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit!
D: [pulseaudio] memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
D: [pulseaudio] memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 
I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
D: [pulseaudio] database-tdb.c: Opened TDB database '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-device-volumes.tdb'
I: [pulseaudio] module-device-restore.c: Successfully opened database file '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-device-volumes'.
I: [pulseaudio] module.c: Loaded "module-device-restore" (index: #0; argument: "").
D: [pulseaudio] database-tdb.c: Opened TDB database '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-stream-volumes.tdb'
I: [pulseaudio] module-stream-restore.c: Successfully opened database file '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-stream-volumes'.
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1 added for object /org/pulseaudio/stream_restore1
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry0
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry1
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry2
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry3
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry4
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry5
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry6
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry7
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry8
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry9
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry10
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry11
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry12
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry13
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1.RestoreEntry added for object /org/pulseaudio/stream_restore1/entry14
I: [pulseaudio] module.c: Loaded "module-stream-restore" (index: #1; argument: "").
D: [pulseaudio] database-tdb.c: Opened TDB database '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-card-database.tdb'
I: [pulseaudio] module-card-restore.c: Successfully opened database file '/home/bart/.config/pulse/285aceef9581452e8da5a89ae08b86a4-card-database'.
I: [pulseaudio] module.c: Loaded "module-card-restore" (index: #2; argument: "").
I: [pulseaudio] module.c: Loaded "module-augment-properties" (index: #3; argument: "").
I: [pulseaudio] module.c: Loaded "module-switch-on-port-available" (index: #4; argument: "").
D: [pulseaudio] alsa-util.c: Trying hw:CARD=DAC with SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open hw:CARD=DAC
I: [pulseaudio] alsa-util.c: Disabling tsched mode since BATCH flag is set
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Signed 24 bit Little Endian in 3bytes) failed: Invalid argument
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Signed 24 bit Big Endian in 3bytes) failed: Invalid argument
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Float 32 bit Little Endian) failed: Invalid argument
D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Float 32 bit Big Endian) failed: Invalid argument
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 682 ms
D: [pulseaudio] alsa-util.c: Set buffer size first (to 19200 samples), period size second (to 4800 samples).
I: [pulseaudio] alsa-util.c: Device hw:CARD=DAC doesn't support sample format s24le, changed to s32le.

My system:
Asus Z170-A, Intel i7-6700K, Fiio X5 II with last firmware, Arch linux x64, PulseAudio 9.0.
Comment 1 Tanu Kaskinen 2017-01-04 18:14:31 UTC
This seems like a kernel bug, since dmesg shows a kernel stack trace and pulseaudio becomes unkillable. Those two things should never happen on a good kernel. I understand that you'd like to blame pulseaudio on the basis that you can use the card without pulseaudio, but pulseaudio can't be blamed for kernel bugs.


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.