Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pipewire pipewire
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 608
    • Issues 608
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 23
    • Merge requests 23
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • PipeWirePipeWire
  • pipewirepipewire
  • Issues
  • #413
Closed
Open
Issue created Nov 25, 2020 by Alexander Miroshnichenko@alexminder

pipewire crash when usb audio disconnect

Description:

Pipewire crash when external audio device disconnected.

Versions

media-video/pipewire 38fcc64e
media-libs/alsa-lib-1.2.3.2-r1

Steps to reproduce:

  • Connect USB audio device
  • Make it default
  • Play some audio file
  • Disconnect USB audio device
  • Pipewire crashes

Backtrace

(gdb) bt full
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
        set = {__val = {16386, 127438810954024, 30, 397387554095134, 127435981942062, 114109202383120, 0, 808831632, 133952828608, 127438810953784, 30, 10150601371888126976, 0, 127438810954095, 127438810954272, 127438810954024}}
        pid = <optimized out>
        tid = <optimized out>
        ret = <optimized out>
#1  0x000067c81e7832b8 in __GI_abort () at abort.c:79
        save_stage = 1
        act = {__sigaction_handler = {sa_handler = 0x101010101010101, sa_sigaction = 0x101010101010101}, sa_mask = {__val = {72340172838076673, 72340172838076673, 282578800148737, 72340172838076673, 114109192226658, 13598676167904, 0,
              114109192345901, 105, 127438810954336, 114109192318346, 127438810954144, 63954488320, 114109204127744, 0, 13598675301568}}, sa_flags = 808923104, sa_restorer = 0x3d}
        sigs = {__val = {32, 13598675065424, 13598675070512, 13598675087376, 13598675090432, 114109192226658, 13598675301568, 0, 114109192345901, 105, 127438810954208, 114109192318346, 13598675611616, 60938393056, 13598675976624,
            13598676220016}}
#2  0x000067c81e7dbb7f in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x67c81e8a880f "%s\n") at ../sysdeps/posix/libc_fatal.c:155
        ap = {{gp_offset = 24, fp_offset = 3166, overflow_arg_area = 0x73e7a90ebb20, reg_save_area = 0x73e7a90ebab0}}
        fd = <optimized out>
        list = <optimized out>
        nlist = <optimized out>
        cp = <optimized out>
#3  0x000067c81e7e359c in malloc_printerr (str=str@entry=0x67c81e8aac50 "double free or corruption (out)") at malloc.c:5389
No locals.
#4  0x000067c81e7e5620 in _int_free (av=0x67c81e8d8a00 <main_arena>, p=0xc5e304419a0, have_lock=<optimized out>) at malloc.c:4347
        size = 13598674911008
        fb = <optimized out>
        nextchunk = 0x18bc607418c0
        nextsize = <optimized out>
        nextinuse = <optimized out>
        prevsize = <optimized out>
        bck = <optimized out>
        fwd = <optimized out>
        __PRETTY_FUNCTION__ = "_int_free"
#5  0x000067c81d3ec2a4 in snd1_pcm_free (pcm=0xc5e30442910) at /var/tmp/portage/media-libs/alsa-lib-1.2.3.2-r1/work/alsa-lib-1.2.3.2/src/pcm/pcm.c:2793
No locals.
#6  snd_pcm_close (pcm=0xc5e30442910) at /var/tmp/portage/media-libs/alsa-lib-1.2.3.2-r1/work/alsa-lib-1.2.3.2/src/pcm/pcm.c:786
        res = 0
        err = <optimized out>
#7  0x000067c81d501876 in spa_alsa_close (state=0xc5e3041efa8) at ../pipewire-0.3.16/spa/plugins/alsa/alsa-pcm.c:77
        err = <optimized out>
        err = <optimized out>
        __func__ = <optimized out>
        _l = <optimized out>
        _f = <optimized out>
        _l = <optimized out>
        _f = <optimized out>
        _l = <optimized out>
        _f = <optimized out>
        _res = <optimized out>
        _o = <optimized out>
        _f = <optimized out>
#8  spa_alsa_close (state=0xc5e3041efa8) at ../pipewire-0.3.16/spa/plugins/alsa/alsa-pcm.c:69
        err = 0
        err = <optimized out>
        __func__ = <optimized out>
        _l = <optimized out>
        _f = <optimized out>
        _l = <optimized out>
        _f = <optimized out>
        _l = <optimized out>
        _f = <optimized out>
        _res = <optimized out>
        _o = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
        _f = <optimized out>
#9  impl_clear (handle=0xc5e3041efa8) at ../pipewire-0.3.16/spa/plugins/alsa/alsa-pcm-sink.c:687
        this = 0xc5e3041efa8
        __func__ = "impl_clear"
#10 0x000067c81e6e0528 in unref_handle (handle=0xc5e3041ef80) at ../pipewire-0.3.16/src/pipewire/pipewire.c:196
        __func__ = <optimized out>
#11 unref_handle (handle=0xc5e3041ef80) at ../pipewire-0.3.16/src/pipewire/pipewire.c:191
        __func__ = <optimized out>
#12 pw_unload_spa_handle (handle=<optimized out>) at ../pipewire-0.3.16/src/pipewire/pipewire.c:315
        h = 0xc5e3041ef80
#13 0x000067c81e706c48 in pw_impl_node_destroy (node=0xc5e303c2fc0) at ../pipewire-0.3.16/src/pipewire/impl-node.c:1681
        _f = <optimized out>
        list = 0xc5e303c3570
        s = 0xc5e303c3570
        cursor = {link = {next = 0xc5e303c3570, prev = 0xc5e303c3570}, cb = {funcs = 0x0, data = 0x0}, removed = 0x0, priv = 0x0}
        ci = <optimized out>
        count = <optimized out>
        impl = 0xc5e303c2fc0
        port = <optimized out>
        follower = <optimized out>
        active = true
        __func__ = "pw_impl_node_destroy"
#14 0x000067c81e706c48 in pw_impl_node_destroy (node=0xc5e30423c50) at ../pipewire-0.3.16/src/pipewire/impl-node.c:1681
        _f = <optimized out>
        list = 0xc5e30424200
        s = 0xc5e30424200
        cursor = {link = {next = 0xc5e30424200, prev = 0xc5e30424200}, cb = {funcs = 0x0, data = 0x0}, removed = 0x0, priv = 0x0}
        ci = <optimized out>
        count = <optimized out>
        impl = 0xc5e30423c50
        port = <optimized out>
        follower = <optimized out>
        active = true
        __func__ = "pw_impl_node_destroy"
#15 0x000067c81e6f2dc0 in pw_resource_destroy (resource=resource@entry=0xc5e303c4e20) at ../pipewire-0.3.16/src/pipewire/resource.c:274
        _f = <optimized out>
        list = 0xc5e303c4e88
        s = 0xc5e303c4e88
        cursor = {link = {next = 0xc5e303c4e88, prev = 0xc5e303c4e88}, cb = {funcs = 0x0, data = 0x0}, removed = 0x0, priv = 0x0}
        ci = <optimized out>
        count = <optimized out>
        client = 0xc5e3035ca90
        __func__ = "pw_resource_destroy"
#16 0x000067c81e720c18 in core_destroy (object=<optimized out>, proxy=0xc5e303c4e20) at ../pipewire-0.3.16/src/pipewire/impl-core.c:357
        resource = <optimized out>
        client = <optimized out>
        this = <optimized out>
        r = 0xc5e303c4e20
        __func__ = "core_destroy"
#17 0x000067c81dded827 in core_method_demarshal_destroy (object=0xc5e30372fe0, msg=<optimized out>) at ../pipewire-0.3.16/src/modules/module-protocol-native/protocol-native.c:648
        list = 0xc5e30373058
        s = 0xc5e30373058
        cursor = {link = {next = 0xc5e30373058, prev = 0xc5e303730b0}, cb = {funcs = 0x0, data = 0x0}, removed = 0x0, priv = 0x0}
        ci = <optimized out>
        count = 0
        _f = <optimized out>
        resource = 0xc5e30372fe0
        client = 0xc5e3035ca90
        r = 0xc5e303c4e20
--Type <RET> for more, q to quit, c to continue without paging--
        prs = {data = 0xc5e303675a0, size = 24, _padding = 0, state = {offset = 24, flags = 0, frame = 0x0}}
        id = 56
        __func__ = "core_method_demarshal_destroy"
#18 0x000067c81ddf81ae in process_messages (data=0xc5e3035cc20) at ../pipewire-0.3.16/src/modules/module-protocol-native.c:233
        demarshal = 0x67c81de11d60 <pw_protocol_native_core_method_demarshal.lto_priv>
        marshal = <optimized out>
        permissions = <optimized out>
        required = <optimized out>
        conn = 0xc5e3035d3f0
        client = 0xc5e3035ca90
        context = 0xc5e30305540
        msg = 0xc5e3035e440
        resource = 0xc5e30372fe0
        res = <optimized out>
        __func__ = "process_messages"
#19 0x000067c81ddf8561 in connection_data (data=0xc5e3035cc20, fd=<optimized out>, mask=1) at ../pipewire-0.3.16/src/modules/module-protocol-native.c:302
        this = 0xc5e3035cc20
        client = 0xc5e3035ca90
        res = <optimized out>
#20 0x000067c81e903ddb in loop_iterate (object=0xc5e30307538, timeout=<optimized out>) at ../pipewire-0.3.16/spa/plugins/support/loop.c:306
        s = <optimized out>
        impl = 0xc5e30307538
        loop = 0xc5e30307550
        ep = {{events = 1, data = 0xc5e3035d380}, {events = 1, data = 0xc5e30336350}, {events = 4, data = 0xc5e3035d380}, {events = 1, data = 0xc5e303f0980}, {events = 808676016, data = 0x8cde2e2ae3fc0c00}, {events = 808675680,
            data = 0xc5e30335f88}, {events = 808473920, data = 0x73e7a90ebfa0}, {events = 808474248, data = 0xc5e30305628}, {events = 808671760, data = 0xc5e30335a10}, {events = 2836316064, data = 0x73e7a90ebfa0}, {events = 0,
            data = 0x8cde2e2ae3fc0c00}, {events = 0, data = 0xc5e30335a10}, {events = 2836316352, data = 0xc5e30335f88}, {events = 808473920, data = 0xc5e30335f88}, {events = 808671760, data = 0x67c81e6ea90f <pw_impl_node_register+975>}, {
            events = 510800330, data = 0x67c81e723a3b}, {events = 510802501, data = 0x67c81e723a50}, {events = 510802522, data = 0x67c81e723a64}, {events = 510802549, data = 0x67c81e723874}, {events = 510802565, data = 0x67c81e723a96}, {
            events = 510802592, data = 0x67c81e723aaa}, {events = 510802615, data = 0x67c81e723ac3}, {events = 510802638, data = 0x67c81e723add}, {events = 0, data = 0x8cde2e2ae3fc0c00}, {events = 0, data = 0x8cde2e2ae3fc0c00}, {
            events = 808599656, data = 0xc5e30335a10}, {events = 0, data = 0x0}, {events = 808673544, data = 0x67c81e66c18c <create_object+588>}, {events = 808671416, data = 0xc5e303358d0}, {events = 4294967295, data = 0x1}, {
            events = 808671440, data = 0xc5e30307460}, {events = 1, data = 0x67c81e81df0b <__GI___wait4+107>}}
        i = <optimized out>
        nfds = <optimized out>
#21 0x000067c81e6fc32b in pw_main_loop_run (loop=0xc5e30305280) at ../pipewire-0.3.16/src/pipewire/main-loop.c:158
        _f = <optimized out>
        _res = -95
        _o = <optimized out>
        res = 0
        __func__ = "pw_main_loop_run"
#22 0x00000c5e244796ac in main (argc=<optimized out>, argv=<optimized out>) at ../pipewire-0.3.16/src/daemon/main.c:136
        context = 0xc5e30305540
        loop = 0xc5e30305280
        config = 0xc5e30305080
        properties = <optimized out>
        err = 0x0
        c = -1
        res = 0
        long_options = {{name = 0xc5e2447b252 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0xc5e2447b2ba "version", has_arg = 0, flag = 0x0, val = 86}, {name = 0xc5e2447b073 "name", has_arg = 1, flag = 0x0, val = 110}, {
            name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
        __func__ = "main"
(gdb)

Pipewire log

[2464:557] [99] (audio_device_pulse_linux.cc:1703): paOperation NULL in WaitForOperationCompletion
[2464:557] [99] (audio_device_pulse_linux.cc:1703): paOperation NULL in WaitForOperationCompletion
[E][000004713.022253][alsa-pcm.c:1385 spa_alsa_pause()] alsa-pcm 0x7e23680bdf8: snd_pcm_drop No such device
[E][000004713.023020][alsa-pcm.c:77 spa_alsa_close()] front:2: close failed: No such device
free(): invalid size
[E][000004713.036656][core.c:71 core_event_error()] core 0x43302670f0: proxy 0x43302670f0 id:0: bound:-1 seq:674 res:-32 (Broken pipe) msg:"connection error"
[E][000004713.036685][media-session.c:1986 core_error()] error id:0 seq:674 res:-32 (Broken pipe): connection error
[E][000004713.036694][core.c:71 core_event_error()] core 0xb8b6780e80: proxy 0xb8b6780e80 id:0: bound:-1 seq:93 res:-32 (Обрыв канала) msg:"connection error"
[E][000004713.036728][core.c:71 core_event_error()] core 0x4330253f80: proxy 0x4330253f80 id:0: bound:-1 seq:76 res:-32 (Broken pipe) msg:"connection error"

** (/usr/libexec/xdg-desktop-portal:9521): WARNING **: 09:12:49.704: Caught PipeWire error: connection error
[W][000004713.036860][core.c:192 destroy_proxy()] core 0xb8b6780e80: leaked proxy 0xb8b6789960 id:2

** (/usr/libexec/xdg-desktop-portal:9521): WARNING **: 09:12:49.707: Failed connect to PipeWire: Couldn't connect to PipeWire
[2465:558] [99] (audio_device_pulse_linux.cc:1703): paOperation NULL in WaitForOperationCompletion
[2465:558] [99] (audio_device_pulse_linux.cc:1703): paOperation NULL in WaitForOperationCompletion
[2465:558] [99] (audio_device_pulse_linux.cc:1703): paOperation NULL in WaitForOperationCompletion
[2465:558] [99] (audio_device_pulse_linux.cc:1703): paOperation NULL in WaitForOperationCompletio

App log

[E][000004713.036342][core.c:71 core_event_error()] core 0x3461d758780: proxy 0x3461d758780 id:0: bound:-1 seq:117 res:-32 (Broken pipe) msg:"connection error"
[E][000004713.036366][pipewire-jack.c:654 on_error()] jack-client 0x3461d747600: error id:0 seq:117 res:-32 (Broken pipe): connection error
Edited Nov 25, 2020 by Alexander Miroshnichenko
Assignee
Assign to
Time tracking