Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 910714 - media-video/pipewire-0.3.75: segfault when it can't connect to dbus (?)
Summary: media-video/pipewire-0.3.75: segfault when it can't connect to dbus (?)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sam James
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-07-23 08:54 UTC by Michał Górny
Modified: 2023-07-23 17:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-07-23 08:54:57 UTC
Ok, this one's a bit indirect.  Apparently, pipewire gets started when pygame tries to open an audio device in the test environment, and it causes a segfault on the Python executable itself.  However, the backtrace pretty clearly indicates they're missing error handling somewhere:


Core was generated by `/tmp/portage/dev-python/pyscreenshot-3.1/work/pyscreenshot-3.1-python3_11/insta'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fd17e0f80c1 in pw_rtkit_make_realtime (impl=0x55ca0b1fcd60, thread=146, priority=1)
    at ../pipewire-0.3.75/src/modules/module-rt.c:426
426             if (!dbus_connection_send(connection->bus, m, &serial)) {
[Current thread is 1 (Thread 0x7fd17bfff6c0 (LWP 144))]
(gdb) p connection
$1 = (struct pw_rtkit_bus *) 0x0
(gdb) bt
#0  0x00007fd17e0f80c1 in pw_rtkit_make_realtime (impl=0x55ca0b1fcd60, thread=146, priority=1)
    at ../pipewire-0.3.75/src/modules/module-rt.c:426
#1  0x00007fd17e0f973b in do_make_realtime (loop=0x55ca0b240cf0, async=true, seq=0, data=0x55ca0b240e48, size=8, 
    user_data=0x55ca0b1fcd60) at ../pipewire-0.3.75/src/modules/module-rt.c:813
#2  0x00007fd17c2e1f78 in flush_items (impl=0x55ca0b240cd8) at ../pipewire-0.3.75/spa/plugins/support/loop.c:171
#3  0x00007fd17c2e30fe in wakeup_func (data=0x55ca0b240cd8, count=1) at ../pipewire-0.3.75/spa/plugins/support/loop.c:306
#4  0x00007fd17c2e515a in source_event_func (source=0x55ca0b1fd200) at ../pipewire-0.3.75/spa/plugins/support/loop.c:650
#5  0x00007fd17c2e3ddd in loop_iterate (object=0x55ca0b240cd8, timeout=-1) at ../pipewire-0.3.75/spa/plugins/support/loop.c:483
#6  0x00007fd17c115552 in do_loop (user_data=0x55ca0b1fcff0) at ../pipewire-0.3.75/src/pipewire/thread-loop.c:288
#7  0x00007fd981ea2279 in start_thread (arg=<optimized out>) at pthread_create.c:444
#8  0x00007fd981f25b8c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-07-23 14:56:06 UTC
(In reply to Sam James from comment #1)
> Does
> https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/
> 55812195ce3b77317e7a2dc642b78271f3a45c8e help at all?

Indeed, with that the segfault is gone and pyscreenshot tests pass.
Comment 3 Larry the Git Cow gentoo-dev 2023-07-23 17:41:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e29598d80e5b6f0e45eccdcab2f920304f2ed0b7

commit e29598d80e5b6f0e45eccdcab2f920304f2ed0b7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-07-23 17:39:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-07-23 17:39:52 +0000

    media-video/pipewire: backport two fixes to 0.3.75
    
    1. Crash fix for when can't connect to dbus (bug #910714)
    2. Help out software misusing API, like older mpv (new fixed mpv will be in tree
    shortly anyway) (https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3374)
    
    Closes: https://bugs.gentoo.org/910714
    Signed-off-by: Sam James <sam@gentoo.org>

 .../0001-module-rt-error-out-on-load-no-bus.patch  | 83 ++++++++++++++++++++++
 ...2-thread-loop-only-signal-when-option-set.patch | 68 ++++++++++++++++++
 ...ire-0.3.75.ebuild => pipewire-0.3.75-r1.ebuild} |  0
 3 files changed, 151 insertions(+)