Bug 2231259

Summary: [abrt] strawberry: getenv(): strawberry killed by SIGSEGV
Product: [Fedora] Fedora Reporter: Andrew <cherdantsefff>
Component: strawberryAssignee: Ondrej Mosnáček <omosnacek>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: arjun, cherdantsefff, codonell, dj, eclipseo, fberat, fweimer, jlaw, jonas, mcermak, mcoufal, mfabian, omosnacek, pfrankli, sipoyare, skolosov
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/5c04bf59e2f17a9522fb7d67430b12c211d8c0c
Whiteboard: abrt_hash:e09f84f74dfcf5b3bcfaf3b19b443d3182f8901c;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-28 13:48:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: proc_pid_status
none
File: maps
none
File: limits
none
File: environ
none
File: open_fds
none
File: mountinfo
none
File: os_info
none
File: cpuinfo
none
File: core_backtrace
none
File: exploitable
none
File: dso_list
none
File: var_log_messages
none
File: backtrace none

Description Andrew 2023-08-11 06:42:04 UTC
Version-Release number of selected component:
strawberry-1.0.18-1.fc38

Additional info:
reporter:       libreport-2.17.11
type:           CCpp
reason:         strawberry killed by SIGSEGV
journald_cursor: s=924a50fff1d040049bf1ff431a0c1579;i=3a7474;b=4b7ba36e2ce14a4eb48ab688805dbca3;m=be932f9b7;t=6029fdecc41b7;x=7e4557a042b5d782
executable:     /usr/bin/strawberry
cmdline:        /usr/bin/strawberry
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-gnome-org.strawberrymusicplayer.strawberry-221313.scope
rootdir:        /
uid:            1000
kernel:         6.4.7-200.fc38.x86_64
package:        strawberry-1.0.18-1.fc38
runlevel:       N 5
backtrace_rating: 4
crash_function: getenv

Truncated backtrace:
Thread no. 1 (11 frames)
 #0 getenv at getenv.c:84
 #1 guess_category_value at dcigettext.c:1573
 #2 __dcigettext at dcigettext.c:647
 #3 __dcgettext at dcgettext.c:47
 #4 g_dgettext at ../glib/ggettext.c:404
 #5 _priv_gst_tag_initialize at ../gst/gsttaglist.c:217
 #6 init_post at ../gst/gst.c:781
 #8 g_option_context_parse at ../glib/goption.c:2219
 #9 gst_init_check at ../gst/gst.c:420
 #10 gst_init at ../gst/gst.c:459
 #11 GstStartup::InitializeGStreamer at /usr/src/debug/strawberry-1.0.18-1.fc38.x86_64/src/engine/gststartup.cpp:80

Comment 1 Andrew 2023-08-11 06:42:08 UTC
Created attachment 1982913 [details]
File: proc_pid_status

Comment 2 Andrew 2023-08-11 06:42:09 UTC
Created attachment 1982914 [details]
File: maps

Comment 3 Andrew 2023-08-11 06:42:11 UTC
Created attachment 1982915 [details]
File: limits

Comment 4 Andrew 2023-08-11 06:42:13 UTC
Created attachment 1982916 [details]
File: environ

Comment 5 Andrew 2023-08-11 06:42:14 UTC
Created attachment 1982917 [details]
File: open_fds

Comment 6 Andrew 2023-08-11 06:42:15 UTC
Created attachment 1982918 [details]
File: mountinfo

Comment 7 Andrew 2023-08-11 06:42:17 UTC
Created attachment 1982919 [details]
File: os_info

Comment 8 Andrew 2023-08-11 06:42:18 UTC
Created attachment 1982920 [details]
File: cpuinfo

Comment 9 Andrew 2023-08-11 06:42:21 UTC
Created attachment 1982921 [details]
File: core_backtrace

Comment 10 Andrew 2023-08-11 06:42:22 UTC
Created attachment 1982922 [details]
File: exploitable

Comment 11 Andrew 2023-08-11 06:42:24 UTC
Created attachment 1982923 [details]
File: dso_list

Comment 12 Andrew 2023-08-11 06:42:25 UTC
Created attachment 1982924 [details]
File: var_log_messages

Comment 13 Andrew 2023-08-11 06:42:27 UTC
Created attachment 1982925 [details]
File: backtrace

Comment 14 Jonas Kvinge 2024-01-12 09:16:11 UTC
This looks like a glibc related crash (getenv), maybe a rebuild has fixed it. Unless this is still an issue still in the latest Fedora / strawberry version, this can probably be closed.

Comment 15 Ondrej Mosnáček 2024-01-12 10:45:30 UTC
It seems to be still happening: https://retrace.fedoraproject.org/faf/problems/bthash/?bth=5c04bf59e2f17a9522fb7d67430b12c211d8c0c1&bth=85e69ce88e0a6a3ed069459bb47e34583db75863&bth=fe089c4f0059f7e86b70bf17d915055a7fa2babf&bth=63b415729a721d2a06fbfa13082ce0ae2f3887c9

But indeed it's probably not a bug in strawberry. Reassigning to glibc, maybe the maintainers will know more...

Comment 16 Florian Weimer 2024-01-12 10:55:30 UTC
Looks like something corrupted the environ vector, perhaps by calling setenv in a multi-threaded program. Without more data, it is impossible to tell whether this is a glibc bug. Is there a way to reproduce the crash reliably?

Comment 17 Jonas Kvinge 2024-01-12 12:16:48 UTC
I can't reproduce it on openSUSE, and I've never seen this crash occur before now, not heard of it from any other distro either.
gst_init is what's calling setenv(). Strawberry call's gst_init() in a another thread to avoid blocking the GUI on startup, this is something that is inherited from Clementine dating back to 2010 (https://github.com/clementine-player/Clementine/commit/75b70b4acb1749a9b91d5219b0de8855e3ff7347) (even though much of the gst code in strawberry is rewritten).
As far as I know this should be safe, I found this: http://www.eel.is/c++draft/support.runtime.general#2
However, if it's not safe, we should call gst_init() directly from the main thread, it's not a big deal anyway, gst_init() takes like 10ms when testing here.

Comment 18 Jonas Kvinge 2024-01-12 12:18:20 UTC
> gst_init is what's calling setenv(). Strawberry call's gst_init() in a

I mean getenv().

Comment 19 Carlos O'Donell 2024-01-12 14:27:27 UTC
Passing this back to strawberry. We don't see any indication that this is a glibc bug with getenv() or setenv(). We expect this is an application bug related to environ corruption. This needs to be debugged at the application layer.

Comment 20 Aoife Moloney 2024-05-28 13:48:29 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.