Bug 1927491 - phosh crashing g_type_check_instance (libgobject-2.0.so.0 + 0x39908)
Summary: phosh crashing g_type_check_instance (libgobject-2.0.so.0 + 0x39908)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: phosh
Version: 34
Hardware: aarch64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-10 20:34 UTC by customercare
Modified: 2021-02-17 19:30 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-17 19:30:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1927479 0 unspecified CLOSED random crashes 2021-02-22 00:41:40 UTC

Description customercare 2021-02-10 20:34:30 UTC
Description of problem:

crashing in connection with pulseaudio changes.

Version-Release number of selected component (if applicable):

phosh 0.8.0-3

How reproducible:

If something on the sound system is changed it doesn't take long until it crashes.

Additional info:

Feb 10 21:31:02 fedorapine systemd-coredump[3835]: [🡕] Process 3144 (phosh) of user 1000 dumped core.
                                                   
                                                   Stack trace of thread 3144:
                                                   #0  0x0000007fa728b908 g_type_check_instance (libgobject-2.0.so.0 + 0x39908)
                                                   #1  0x0000007fa728026c g_signal_handlers_disconnect_matched (libgobject-2.0.so.0 + 0x2e26c)
                                                   #2  0x0000005587058218 mixer_control_output_update_cb (phosh + 0x58218)
                                                   #3  0x0000007fa7265948 g_closure_invoke (libgobject-2.0.so.0 + 0x13948)
                                                   #4  0x0000007fa729399c signal_emit_unlocked_R.isra.0 (libgobject-2.0.so.0 + 0x4199c)
                                                   #5  0x0000007fa7285e30 g_signal_emit_valist (libgobject-2.0.so.0 + 0x33e30)
                                                   #6  0x0000007fa72860e0 g_signal_emit (libgobject-2.0.so.0 + 0x340e0)
                                                   #7  0x0000005587084290 _pa_context_get_server_info_cb (phosh + 0x84290)
                                                   #8  0x0000007fa703fe58 context_get_server_info_callback (libpulse.so.0 + 0x12e58)
                                                   #9  0x0000007fa5a91bd0 run_action (libpulsecommon-14.2.so + 0x42bd0)
                                                   #10 0x0000007fa5a92564 pa_pdispatch_run (libpulsecommon-14.2.so + 0x43564)
                                                   #11 0x0000007fa7040170 pstream_packet_callback (libpulse.so.0 + 0x13170)
                                                   #12 0x0000007fa5a971e4 do_read (libpulsecommon-14.2.so + 0x481e4)
                                                   #13 0x0000007fa5a98b78 do_pstream_read_write (libpulsecommon-14.2.so + 0x49b78)
                                                   #14 0x0000007fa700e618 dispatch_func (libpulse-mainloop-glib.so.0 + 0x2618)
                                                   #15 0x0000007fa7157430 g_main_context_dispatch (libglib-2.0.so.0 + 0x57430)
                                                   #16 0x0000007fa71ae570 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae570)
                                                   #17 0x0000007fa7156af0 g_main_loop_run (libglib-2.0.so.0 + 0x56af0)
                                                   #18 0x0000007fa7a2b604 gtk_main (libgtk-3.so.0 + 0x26d604)
                                                   #19 0x000000558701f7c4 main (phosh + 0x1f7c4)
                                                   #20 0x0000007fa6981a9c __libc_start_main (libc.so.6 + 0x24a9c)
                                                   #21 0x000000558701fa78 _start (phosh + 0x1fa78)
                                                   
                                                   Stack trace of thread 3145:
                                                   #0  0x0000007fa6a2dfb0 __poll (libc.so.6 + 0xd0fb0)
                                                   #1  0x0000007fa71ae50c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                                                   #2  0x0000007fa71548ec g_main_context_iteration (libglib-2.0.so.0 + 0x548ec)
                                                   #3  0x0000007fa7154954 glib_worker_main (libglib-2.0.so.0 + 0x54954)
                                                   #4  0x0000007fa7187a78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                                                   #5  0x0000007fa68defd8 start_thread (libpthread.so.0 + 0x7fd8)
                                                   #6  0x0000007fa6a3835c thread_start (libc.so.6 + 0xdb35c)
                                                   
                                                   Stack trace of thread 3147:
                                                   #0  0x0000007fa6a2dfb0 __poll (libc.so.6 + 0xd0fb0)
                                                   #1  0x0000007fa71ae50c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                                                   #2  0x0000007fa7156af0 g_main_loop_run (libglib-2.0.so.0 + 0x56af0)
                                                   #3  0x0000007fa73eb7b8 gdbus_shared_thread_func.lto_priv.0 (libgio-2.0.so.0 + 0x1277b8)
                                                   #4  0x0000007fa7187a78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                                                   #5  0x0000007fa68defd8 start_thread (libpthread.so.0 + 0x7fd8)
                                                   #6  0x0000007fa6a3835c thread_start (libc.so.6 + 0xdb35c)
                                                   
                                                   Stack trace of thread 3148:
                                                   #0  0x0000007fa6a2dfb0 __poll (libc.so.6 + 0xd0fb0)
                                                   #1  0x0000007fa71ae50c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                                                   #2  0x0000007fa71548ec g_main_context_iteration (libglib-2.0.so.0 + 0x548ec)
                                                   #3  0x0000007fa40fdd4c dconf_gdbus_worker_thread (libdconfsettings.so + 0x5d4c)
                                                   #4  0x0000007fa7187a78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                                                   #5  0x0000007fa68defd8 start_thread (libpthread.so.0 + 0x7fd8)
                                                   #6  0x0000007fa6a3835c thread_start (libc.so.6 + 0xdb35c)

Comment 2 Benjamin Berg 2021-02-11 10:11:16 UTC
Hmm, this could be related to changes in GLib between 2.67.1 and 2.67.3. I really don't think it is caused by the patches added in 2.67.3-2 (there is nothing related to application launching visible here).

To be honest, this looks more like a memory corruption and either the glib downgrades hides it or it just happens randomly making it hard to know whether a specific downgrade actually fixes it.

My suspicion would be to check whether there may be a use-after-free in the phosh code with _pa_context_get_server_info_cb or mixer_control_output_update_cb possibly not holding a reference to an object they really need to still exist.

A full backtrace will be useful as it will tell you which object is invalid. Nice would be running with valgrind (or ASAN enabled), as that would should tell us exactly about any use-after-free situation.

Comment 3 customercare 2021-02-11 10:18:08 UTC
I'm not that familiar with valgrind, can it replace the running phosh (desktop-session) instance with a valgrind process? Otherwise it will become hard to even start it.

The only way i can imagine is to change the systemd service file of phosh and restart. 

Any advice on the valgrind options to use to accomplish this?

Comment 4 Benjamin Berg 2021-02-11 10:21:41 UTC
Well, in this case just prepending "valgrind" to the command line would do it. However, it is *horribly* slow and tbh. I am not sure whether valgrind works on aarch64.

So, probably a better idea to first install all the debug infos and grab a proper backtrace using "coredumpctl debug"

Comment 5 Peter Robinson 2021-02-11 11:14:01 UTC
You can use debuginfo-install to install the needed ones, it's in dnf-utils package. 

Valgrind works fine with aarch64, and I believe all supported arches these days.

You should be able to use similar methods of debug as gnome-shell. They have a good getting started on their wiki here:
https://wiki.gnome.org/Projects/GnomeShell/Debugging

For debugging gnome-shell in the past I've done a script like (a recommendation from one of the GNOME crew) below, again should be able to do similar with:
#!/bin/sh
env G_SLICE=always-malloc valgrind --leak-check=full --log-file=/tmp/gnome-shell-log-$(date +%s).txt /usr/bin/gnome-shell-binary --replace $@

Comment 6 customercare 2021-02-11 11:21:49 UTC
1. Result:

Valgrind & Phosh don't give result as, valgrid wrote it's summary, right after the start of "phosh" executable. 

Feb 11 11:56:26 fedorapine systemd[3456]: pam_unix(login:session): session opened for user pine(uid=1000) by (uid=0)
Feb 11 11:56:26 fedorapine valgrind[3456]: ==3456== Memcheck, a memory error detector
Feb 11 11:56:26 fedorapine valgrind[3456]: ==3456== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
Feb 11 11:56:26 fedorapine valgrind[3456]: ==3456== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
Feb 11 11:56:26 fedorapine valgrind[3456]: ==3456== Command: /usr/bin/phosh
Feb 11 11:56:26 fedorapine valgrind[3456]: ==3456==

Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474==
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474== HEAP SUMMARY:
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474==     in use at exit: 59,972 bytes in 783 blocks
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474==   total heap usage: 1,995 allocs, 1,212 frees, 121,473 bytes allocated
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474==
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474== LEAK SUMMARY:
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474==    definitely lost: 0 bytes in 0 blocks
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474==    indirectly lost: 0 bytes in 0 blocks
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474==      possibly lost: 0 bytes in 0 blocks
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474==    still reachable: 59,972 bytes in 783 blocks
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474==         suppressed: 0 bytes in 0 blocks
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474== Rerun with --leak-check=full to see details of leaked memory
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474==
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474== For lists of detected and suppressed errors, rerun with: -s
Feb 11 11:56:30 fedorapine valgrind[3474]: ==3474== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

and now.. after the desktop session came up, it's no longer running. 

Plan B: ABRT

dnf -y install abrt; 
debuginfo-install phosh glib2 pulseaudio-libs -y
systemctl start abrtd; systemctl restart phosh 


produced: 

Feb 11 12:03:08 fedorapine systemd-coredump[5922]: [🡕] Process 5416 (phosh) of user 1000 dumped core.
                                                   
                                                   Stack trace of thread 5416:
                                                   #0  0x0000007fafcac908 g_type_check_instance (libgobject-2.0.so.0 + 0x39908)
                                                   #1  0x0000007fafca126c g_signal_handlers_disconnect_matched (libgobject-2.0.so.0 + 0x2e26c)
                                                   #2  0x000000555d778218 mixer_control_output_update_cb (phosh + 0x58218)
                                                   #3  0x0000007fafc86948 g_closure_invoke (libgobject-2.0.so.0 + 0x13948)
                                                   #4  0x0000007fafcb499c signal_emit_unlocked_R.isra.0 (libgobject-2.0.so.0 + 0x4199c)
                                                   #5  0x0000007fafca6e30 g_signal_emit_valist (libgobject-2.0.so.0 + 0x33e30)
                                                   #6  0x0000007fafca70e0 g_signal_emit (libgobject-2.0.so.0 + 0x340e0)
                                                   #7  0x000000555d7a4290 _pa_context_get_server_info_cb (phosh + 0x84290)
                                                   #8  0x0000007fafa60e58 context_get_server_info_callback (libpulse.so.0 + 0x12e58)
                                                   #9  0x0000007fae4b2bd0 run_action (libpulsecommon-14.2.so + 0x42bd0)
                                                   #10 0x0000007fae4b3564 pa_pdispatch_run (libpulsecommon-14.2.so + 0x43564)
                                                   #11 0x0000007fafa61170 pstream_packet_callback (libpulse.so.0 + 0x13170)
                                                   #12 0x0000007fae4b81e4 do_read (libpulsecommon-14.2.so + 0x481e4)
                                                   #13 0x0000007fae4b9b78 do_pstream_read_write (libpulsecommon-14.2.so + 0x49b78)
                                                   #14 0x0000007fafa2f618 dispatch_func (libpulse-mainloop-glib.so.0 + 0x2618)
                                                   #15 0x0000007fafb78430 g_main_context_dispatch (libglib-2.0.so.0 + 0x57430)
                                                   #16 0x0000007fafbcf570 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae570)
                                                   #17 0x0000007fafb77af0 g_main_loop_run (libglib-2.0.so.0 + 0x56af0)
                                                   #18 0x0000007fb044c604 gtk_main (libgtk-3.so.0 + 0x26d604)
                                                   #19 0x000000555d73f7c4 main (phosh + 0x1f7c4)
                                                   #20 0x0000007faf3a2a9c __libc_start_main (libc.so.6 + 0x24a9c)
                                                   #21 0x000000555d73fa78 _start (phosh + 0x1fa78)
                                                   
                                                   Stack trace of thread 5419:
                                                   #0  0x0000007faf4550e4 syscall (libc.so.6 + 0xd70e4)
                                                   #1  0x0000007fafbc9c40 g_cond_wait_until (libglib-2.0.so.0 + 0xa8c40)
                                                   #2  0x0000007fafb45c14 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0 + 0x24c14)
                                                   #3  0x0000007fafb45e0c g_async_queue_timeout_pop (libglib-2.0.so.0 + 0x24e0c)
                                                   #4  0x0000007fafbab90c g_thread_pool_thread_proxy.lto_priv.0 (libglib-2.0.so.0 + 0x8a90c)
                                                   #5  0x0000007fafba8a78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                                                   #6  0x0000007faf2fffd8 start_thread (libpthread.so.0 + 0x7fd8)
                                                   #7  0x0000007faf45935c thread_start (libc.so.6 + 0xdb35c)
                                                   
                                                   Stack trace of thread 5421:
                                                   #0  0x0000007faf44efb0 __poll (libc.so.6 + 0xd0fb0)
                                                   #1  0x0000007fafbcf50c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                                                   #2  0x0000007fafb758ec g_main_context_iteration (libglib-2.0.so.0 + 0x548ec)
                                                   #3  0x0000007fac30ed4c dconf_gdbus_worker_thread (libdconfsettings.so + 0x5d4c)
                                                   #4  0x0000007fafba8a78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                                                   #5  0x0000007faf2fffd8 start_thread (libpthread.so.0 + 0x7fd8)
                                                   #6  0x0000007faf45935c thread_start (libc.so.6 + 0xdb35c)
                                                   
                                                   Stack trace of thread 5420:
                                                   #0  0x0000007faf44efb0 __poll (libc.so.6 + 0xd0fb0)
                                                   #1  0x0000007fafbcf50c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                                                   #2  0x0000007fafb77af0 g_main_loop_run (libglib-2.0.so.0 + 0x56af0)
                                                   #3  0x0000007fafe0bbc4 gdbus_shared_thread_func.lto_priv.0 (libgio-2.0.so.0 + 0x126bc4)
                                                   #4  0x0000007fafba8a78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                                                   #5  0x0000007faf2fffd8 start_thread (libpthread.so.0 + 0x7fd8)
                                                   #6  0x0000007faf45935c thread_start (libc.so.6 + 0xdb35c)
                                                   
                                                   Stack trace of thread 5418:
                                                   #0  0x0000007faf44efb0 __poll (libc.so.6 + 0xd0fb0)
                                                   #1  0x0000007fafbcf50c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                                                   #2  0x0000007fafb758ec g_main_context_iteration (libglib-2.0.so.0 + 0x548ec)
                                                   #3  0x0000007fafb75954 glib_worker_main (libglib-2.0.so.0 + 0x54954)
                                                   #4  0x0000007fafba8a78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                                                   #5  0x0000007faf2fffd8 start_thread (libpthread.so.0 + 0x7fd8)
                                                   #6  0x0000007faf45935c thread_start (libc.so.6 + 0xdb35c)

and no output in /var/spool/abrt   => rebooting in case it's needed:

Feb 11 12:07:37 fedorapine pipewire[1061]: (alsa_output.platform-hdmi-sound.stereo-fallback-47) XRun! rate:1024/48000 count:1 time:96495932 delay:1013 max:1013
Feb 11 12:07:39 fedorapine gsd-media-keys[906]: Unable to get default sink
Feb 11 12:07:39 fedorapine gsd-media-keys[906]: Unable to get default source
Feb 11 12:07:39 fedorapine org.kde.kdeconnect.daemon.desktop[1210]: org.kde.pulseaudio: No object for name "alsa_output.platform-sound.Voice Call: hw:PinePhone,0: sink"
Feb 11 12:07:39 fedorapine org.kde.kdeconnect.daemon.desktop[1210]: org.kde.pulseaudio: No object for name "alsa_output.platform-sound.Voice Call: hw:PinePhone,0: sink"
Feb 11 12:07:39 fedorapine org.kde.kdeconnect.daemon.desktop[1210]: org.kde.pulseaudio: No object for name "alsa_input.platform-sound.Voice Call: hw:PinePhone,0: source"
Feb 11 12:07:39 fedorapine org.kde.kdeconnect.daemon.desktop[1210]: org.kde.pulseaudio: No object for name "alsa_output.platform-hdmi-sound.stereo-fallback.monitor"
Feb 11 12:07:39 fedorapine org.kde.kdeconnect.daemon.desktop[1210]: org.kde.pulseaudio: No object for name "alsa_output.platform-hdmi-sound.stereo-fallback.monitor"
Feb 11 12:07:39 fedorapine org.kde.kdeconnect.daemon.desktop[1210]: org.kde.pulseaudio: No object for name "alsa_input.platform-sound.HiFi: hw:PinePhone,0: source"
Feb 11 12:07:40 fedorapine geoclue[1059]: Service not used for 60 seconds. Shutting down..
Feb 11 12:07:40 fedorapine systemd[1]: geoclue.service: Succeeded.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit geoclue.service has successfully entered the 'dead' state.
Feb 11 12:07:42 fedorapine systemd-coredump[1484]: [🡕] Process 702 (phosh) of user 1000 dumped core.
                                                   
                                                   Stack trace of thread 702:
                                                   #0  0x0000007f950df908 g_type_check_instance (libgobject-2.0.so.0 + 0x39908)
                                                   #1  0x0000007f950d426c g_signal_handlers_disconnect_matched (libgobject-2.0.so.0 + 0x2e26c)
                                                   #2  0x0000005587cb8218 mixer_control_output_update_cb (phosh + 0x58218)
                                                   #3  0x0000007f950b9948 g_closure_invoke (libgobject-2.0.so.0 + 0x13948)
                                                   #4  0x0000007f950e799c signal_emit_unlocked_R.isra.0 (libgobject-2.0.so.0 + 0x4199c)
                                                   #5  0x0000007f950d9e30 g_signal_emit_valist (libgobject-2.0.so.0 + 0x33e30)
                                                   #6  0x0000007f950da0e0 g_signal_emit (libgobject-2.0.so.0 + 0x340e0)
                                                   #7  0x0000005587ce4290 _pa_context_get_server_info_cb (phosh + 0x84290)
                                                   #8  0x0000007f94e93e58 context_get_server_info_callback (libpulse.so.0 + 0x12e58)
                                                   #9  0x0000007f938e5bd0 run_action (libpulsecommon-14.2.so + 0x42bd0)
                                                   #10 0x0000007f938e6564 pa_pdispatch_run (libpulsecommon-14.2.so + 0x43564)
                                                   #11 0x0000007f94e94170 pstream_packet_callback (libpulse.so.0 + 0x13170)
                                                   #12 0x0000007f938eb1e4 do_read (libpulsecommon-14.2.so + 0x481e4)
                                                   #13 0x0000007f938ecb78 do_pstream_read_write (libpulsecommon-14.2.so + 0x49b78)
                                                   #14 0x0000007f94e62618 dispatch_func (libpulse-mainloop-glib.so.0 + 0x2618)
                                                   #15 0x0000007f94fab430 g_main_context_dispatch (libglib-2.0.so.0 + 0x57430)
                                                   #16 0x0000007f95002570 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae570)
                                                   #17 0x0000007f94faaaf0 g_main_loop_run (libglib-2.0.so.0 + 0x56af0)
                                                   #18 0x0000007f9587f604 gtk_main (libgtk-3.so.0 + 0x26d604)
                                                   #19 0x0000005587c7f7c4 main (phosh + 0x1f7c4)
                                                   #20 0x0000007f947d5a9c __libc_start_main (libc.so.6 + 0x24a9c)
                                                   #21 0x0000005587c7fa78 _start (phosh + 0x1fa78)
                                                   
                                                   Stack trace of thread 715:
                                                   #0  0x0000007f94881fb0 __poll (libc.so.6 + 0xd0fb0)
                                                   #1  0x0000007f9500250c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                                                   #2  0x0000007f94faaaf0 g_main_loop_run (libglib-2.0.so.0 + 0x56af0)
                                                   #3  0x0000007f9523ebc4 gdbus_shared_thread_func.lto_priv.0 (libgio-2.0.so.0 + 0x126bc4)
                                                   #4  0x0000007f94fdba78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                                                   #5  0x0000007f94732fd8 start_thread (libpthread.so.0 + 0x7fd8)
                                                   #6  0x0000007f9488c35c thread_start (libc.so.6 + 0xdb35c)
                                                   
                                                   Stack trace of thread 716:
                                                   #0  0x0000007f94881fb0 __poll (libc.so.6 + 0xd0fb0)
                                                   #1  0x0000007f9500250c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                                                   #2  0x0000007f94fa88ec g_main_context_iteration (libglib-2.0.so.0 + 0x548ec)
                                                   #3  0x0000007f91741d4c dconf_gdbus_worker_thread (libdconfsettings.so + 0x5d4c)
                                                   #4  0x0000007f94fdba78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                                                   #5  0x0000007f94732fd8 start_thread (libpthread.so.0 + 0x7fd8)
                                                   #6  0x0000007f9488c35c thread_start (libc.so.6 + 0xdb35c)
                                                   
                                                   Stack trace of thread 713:
                                                   #0  0x0000007f94881fb0 __poll (libc.so.6 + 0xd0fb0)
                                                   #1  0x0000007f9500250c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                                                   #2  0x0000007f94fa88ec g_main_context_iteration (libglib-2.0.so.0 + 0x548ec)
                                                   #3  0x0000007f94fa8954 glib_worker_main (libglib-2.0.so.0 + 0x54954)
                                                   #4  0x0000007f94fdba78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                                                   #5  0x0000007f94732fd8 start_thread (libpthread.so.0 + 0x7fd8)
                                                   #6  0x0000007f9488c35c thread_start (libc.so.6 + 0xdb35c)


still no abrt output.  

Plan C:


After installing more than 1.2 GB of debug infos:

[root@fedorapine var]# coredumpctl debug
           PID: 702 (phosh)
           UID: 1000 (pine)
           GID: 1000 (pine)
        Signal: 11 (SEGV)
     Timestamp: Thu 2021-02-11 12:07:37 CET (9min ago)
  Command Line: /usr/libexec/phosh
    Executable: /usr/libexec/phosh
 Control Group: /user.slice/user-1000.slice/user/app.slice/app-glib-sm.puri.Phosh-702.scope
          Unit: user
     User Unit: app-glib-sm.puri.Phosh-702.scope
         Slice: user-1000.slice
     Owner UID: 1000 (pine)
       Boot ID: 8929b30ce59c43409b8cf8dd11df5cdb
    Machine ID: 9b3c323260144b81a8c75a366886c743
      Hostname: fedorapine
       Storage: /var/lib/systemd/coredump/core.phosh.1000.8929b30ce59c43409b8cf8dd11df5cdb.702.1613041657000000.zst
       Message: Process 702 (phosh) of user 1000 dumped core.
                
                Stack trace of thread 702:
                #0  0x0000007f950df908 g_type_check_instance (libgobject-2.0.so.0 + 0x39908)
                #1  0x0000007f950d426c g_signal_handlers_disconnect_matched (libgobject-2.0.so.0 + 0x2e26c)
                #2  0x0000005587cb8218 mixer_control_output_update_cb (phosh + 0x58218)
                #3  0x0000007f950b9948 g_closure_invoke (libgobject-2.0.so.0 + 0x13948)
                #4  0x0000007f950e799c signal_emit_unlocked_R.isra.0 (libgobject-2.0.so.0 + 0x4199c)
                #5  0x0000007f950d9e30 g_signal_emit_valist (libgobject-2.0.so.0 + 0x33e30)
                #6  0x0000007f950da0e0 g_signal_emit (libgobject-2.0.so.0 + 0x340e0)
                #7  0x0000005587ce4290 _pa_context_get_server_info_cb (phosh + 0x84290)
                #8  0x0000007f94e93e58 context_get_server_info_callback (libpulse.so.0 + 0x12e58)
                #9  0x0000007f938e5bd0 run_action (libpulsecommon-14.2.so + 0x42bd0)
                #10 0x0000007f938e6564 pa_pdispatch_run (libpulsecommon-14.2.so + 0x43564)
                #11 0x0000007f94e94170 pstream_packet_callback (libpulse.so.0 + 0x13170)
                #12 0x0000007f938eb1e4 do_read (libpulsecommon-14.2.so + 0x481e4)
                #13 0x0000007f938ecb78 do_pstream_read_write (libpulsecommon-14.2.so + 0x49b78)
                #14 0x0000007f94e62618 dispatch_func (libpulse-mainloop-glib.so.0 + 0x2618)
                #15 0x0000007f94fab430 g_main_context_dispatch (libglib-2.0.so.0 + 0x57430)
                #16 0x0000007f95002570 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae570)
                #17 0x0000007f94faaaf0 g_main_loop_run (libglib-2.0.so.0 + 0x56af0)
                #18 0x0000007f9587f604 gtk_main (libgtk-3.so.0 + 0x26d604)
                #19 0x0000005587c7f7c4 main (phosh + 0x1f7c4)
                #20 0x0000007f947d5a9c __libc_start_main (libc.so.6 + 0x24a9c)
                #21 0x0000005587c7fa78 _start (phosh + 0x1fa78)
                
                Stack trace of thread 715:
                #0  0x0000007f94881fb0 __poll (libc.so.6 + 0xd0fb0)
                #1  0x0000007f9500250c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                #2  0x0000007f94faaaf0 g_main_loop_run (libglib-2.0.so.0 + 0x56af0)
                #3  0x0000007f9523ebc4 gdbus_shared_thread_func.lto_priv.0 (libgio-2.0.so.0 + 0x126bc4)
                #4  0x0000007f94fdba78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                #5  0x0000007f94732fd8 start_thread (libpthread.so.0 + 0x7fd8)
                #6  0x0000007f9488c35c thread_start (libc.so.6 + 0xdb35c)
                
                Stack trace of thread 716:
                #0  0x0000007f94881fb0 __poll (libc.so.6 + 0xd0fb0)
                #1  0x0000007f9500250c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                #2  0x0000007f94fa88ec g_main_context_iteration (libglib-2.0.so.0 + 0x548ec)
                #3  0x0000007f91741d4c dconf_gdbus_worker_thread (libdconfsettings.so + 0x5d4c)
                #4  0x0000007f94fdba78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                #5  0x0000007f94732fd8 start_thread (libpthread.so.0 + 0x7fd8)
                #6  0x0000007f9488c35c thread_start (libc.so.6 + 0xdb35c)
                
                Stack trace of thread 713:
                #0  0x0000007f94881fb0 __poll (libc.so.6 + 0xd0fb0)
                #1  0x0000007f9500250c g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xae50c)
                #2  0x0000007f94fa88ec g_main_context_iteration (libglib-2.0.so.0 + 0x548ec)
                #3  0x0000007f94fa8954 glib_worker_main (libglib-2.0.so.0 + 0x54954)
                #4  0x0000007f94fdba78 g_thread_proxy (libglib-2.0.so.0 + 0x87a78)
                #5  0x0000007f94732fd8 start_thread (libpthread.so.0 + 0x7fd8)
                #6  0x0000007f9488c35c thread_start (libc.so.6 + 0xdb35c)

GNU gdb (GDB) Fedora 10.1-4.fc34
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/libexec/phosh...
Reading symbols from /usr/lib/debug/usr/libexec/phosh-0.8.0-3.fc34.aarch64.debug...

warning: Can't open file /memfd:pulseaudio (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:gdk-wayland (deleted) during file-backed mapping note processing

warning: Can't open file /dev/shm/phosh-iPEcIC (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:wayland-cursor (deleted) during file-backed mapping note processing

warning: Can't open file /run/user/1000/dconf/user during file-backed mapping note processing
[New LWP 702]
[New LWP 715]
[New LWP 716]
[New LWP 713]
Missing separate debuginfo for /lib64/libpulse-mainloop-glib.so.0
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/d0/c061c3ef9fc80b48b0fdefaf05c4b89d07e29b.debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/libexec/phosh'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  g_type_check_instance (type_instance=<optimized out>) at ../gobject/gtype.c:4188
4188		  TypeNode *node = lookup_type_node_I (type_instance->g_class->g_type);
[Current thread is 1 (Thread 0x7f92b244b0 (LWP 702))]
Missing separate debuginfos, use: dnf debuginfo-install NetworkManager-libnm-1.30.0-0.3.fc34.1.aarch64 gnome-desktop3-3.38.3-2.fc34.aarch64 gnutls-3.6.15-2.fc34.aarch64 nettle-3.7-2.fc34.aarch64 openssl-libs-1.1.1i-2.fc34.aarch64

.... it ends as :

# dnf debuginfo-install NetworkManager-libnm-1.30.0-0.3.fc34.1.aarch64 gnome-desktop3-3.38.3-2.fc34.aarch64 gnutls-3.6.15-2.fc34.aarch64 nettle-3.7-2.fc34.aarch64 openssl-libs-1.1.1i-2.fc34.aarch64
Paketquelle fedora-cisco-openh264-debuginfo wird aktiviert
Paketquelle rawhide-modular-debuginfo wird aktiviert
Paketquelle rawhide-debuginfo wird aktiviert
Paketquelle rpmfusion-free-rawhide-debuginfo wird aktiviert
Paketquelle rpmfusion-nonfree-rawhide-debuginfo wird aktiviert
Letzte Prüfung auf abgelaufene Metadaten: vor 0:27:01 am Do 11 Feb 2021 11:50:53 CET.
Could not find debuginfo package for the following installed packages: NetworkManager-libnm-1:1.30.0-0.3.fc34.1.aarch64, gnome-desktop3-3.38.3-2.fc34.aarch64, gnutls-3.6.15-2.fc34.aarch64, nettle-3.7-2.fc34.aarch64, openssl-libs-1:1.1.1i-2.fc34.aarch64
Could not find debugsource package for the following installed packages: NetworkManager-libnm-1:1.30.0-0.3.fc34.1.aarch64, gnome-desktop3-3.38.3-2.fc34.aarch64, gnutls-3.6.15-2.fc34.aarch64, nettle-3.7-2.fc34.aarch64, openssl-libs-1:1.1.1i-2.fc34.aarch64
Abhängigkeiten sind aufgelöst.
Nichts zu tun.
Fertig.


Sorry.. out of my league here.

Comment 7 Benjamin Berg 2021-02-11 11:35:29 UTC
Well … looking at the code, this is obviously wrong.

The PoshSettings self->output_stream object is not referenced. As such, it may just disappear.

So, posh upstream needs to fix this, by taking a reference to the returned value of gvc_mixer_control_get_default_sink (most likely by using g_clear_object and g_set_object where relevant).

I am also pretty sure the code should be using `g_signal_connect_object` in more places (rather than the less safe g_signal_connect where one can forget to disconnect the signal).

Comment 8 Guido Günther 2021-02-17 08:32:45 UTC
Thanks Benjamin, i somehow operated under the (silly) assumption the gvc_mixer_control_get_default_sink is singleton that sticks around.

Comment 9 Benjamin Berg 2021-02-17 08:43:50 UTC
No worries! I think that audio devices do not usually disappear (unless they are e.g. USB). In the end, I am just guessing here, but self->output_stream having become an invalid pointer would totally explain the crash :)

Comment 10 customercare 2021-02-17 19:30:37 UTC
 ** Fixed in phosh-0.8.1-2  **


Note You need to log in before you can comment on or make changes to this bug.