Bug 2260124

Summary: [abrt] setroubleshoot-server: g_malloc(): python3.12 killed by SIGTRAP
Product: [Fedora] Fedora Reporter: Joerg Skottke <jsk_priv>
Component: setroubleshootAssignee: Petr Lautrbach <plautrba>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: dwalsh, jsk_priv, jsullivan3, mmalik, plautrba, vmojzis
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/57c9f0e69ccd8a76c3db767e51c8d1f1c929028
Whiteboard: abrt_hash:05c90fc3d12e02a7eee7e22522c33610862485a3;VARIANT_ID=workstation;
Fixed In Version: setroubleshoot-3.3.33-1.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-02-25 01:25:43 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: dso_list
none
File: backtrace none

Description Joerg Skottke 2024-01-24 15:36:33 UTC
Version-Release number of selected component:
setroubleshoot-server-3.3.32-7.fc39

Additional info:
reporter:       libreport-2.17.11
type:           CCpp
reason:         python3.12 killed by SIGTRAP
journald_cursor: s=cd93c52160d14fa9950474f727f2e83e;i=10ae980;b=35814e0186164215b6e4dcb3440f71aa;m=c51fe32d6;t=60c55210523e2;x=818bfcb7575ad92b
executable:     /usr/bin/python3.12
cmdline:        /usr/bin/python3 -Es /usr/sbin/setroubleshootd -f
cgroup:         0::/system.slice/setroubleshootd.service
rootdir:        /
uid:            977
kernel:         6.6.4-200.fc39.x86_64
package:        setroubleshoot-server-3.3.32-7.fc39
runlevel:       N 5
backtrace_rating: 4
crash_function: g_malloc

Truncated backtrace:
Thread no. 1 (37 frames)
 #4 g_malloc at ../glib/gmem.c:135
 #5 g_buffered_input_stream_set_buffer_size at ../gio/gbufferedinputstream.c:238
 #7 object_set_property at ../gobject/gobject.c:1811
 #8 g_object_new_internal at ../gobject/gobject.c:2290
 #10 g_object_new_valist at ../gobject/gobject.c:2584
 #12 _g_dbus_auth_run_client at ../gio/gdbusauth.c:594
 #13 initable_init at ../gio/gdbusconnection.c:2581
 #14 g_bus_get_sync at ../gio/gdbusconnection.c:7488
 #15 ffi_call_unix64 at ../src/x86/unix64.S:104
 #16 ffi_call_int at ../src/x86/ffi64.c:673
 #17 ffi_call at ../src/x86/ffi64.c:710
 #18 pygi_invoke_c_callable at ../gi/pygi-invoke.c:684
 #19 pygi_function_cache_invoke at ../gi/pygi-cache.c:862
 #20 pygi_callable_info_invoke at ../gi/pygi-invoke.c:727
 #21 _wrap_g_callable_info_invoke at ../gi/pygi-invoke.c:764
 #22 _PyObject_MakeTpCall at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/call.c:240
 #23 _PyEval_EvalFrameDefault at Python/bytecodes.c:2711
 #24 _PyObject_VectorcallTstate at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Include/internal/pycore_call.h:92
 #25 PyObject_Vectorcall at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/call.c:325
 #26 call_attribute at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/typeobject.c:8798
 #27 _Py_slot_tp_getattr_hook at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/typeobject.c:8848
 #28 PyObject_GetAttr at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/object.c:1044
 #29 _PyObject_GetMethod at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/object.c:1307
 #30 _PyEval_EvalFrameDefault at Python/bytecodes.c:1773
 #31 _PyObject_FastCallDictTstate at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/call.c:144
 #32 _PyObject_Call_Prepend at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/call.c:508
 #33 slot_tp_init at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/typeobject.c:9007
 #34 type_call at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/typeobject.c:1673
 #35 _PyObject_Call at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/call.c:367
 #36 PyCFunction_Call at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/call.c:387
 #37 _PyEval_EvalFrameDefault at Python/bytecodes.c:3259
 #38 _PyFunction_Vectorcall at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/call.c:419
 #39 _PyObject_VectorcallTstate at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Include/internal/pycore_call.h:92
 #40 method_vectorcall at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/classobject.c:69
 #41 thread_run at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Modules/_threadmodule.c:1082
 #42 pythread_wrapper at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Python/thread_pthread.h:233
 #44 clone3 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Comment 1 Joerg Skottke 2024-01-24 15:36:36 UTC
Created attachment 2010226 [details]
File: proc_pid_status

Comment 2 Joerg Skottke 2024-01-24 15:36:37 UTC
Created attachment 2010227 [details]
File: maps

Comment 3 Joerg Skottke 2024-01-24 15:36:39 UTC
Created attachment 2010228 [details]
File: limits

Comment 4 Joerg Skottke 2024-01-24 15:36:40 UTC
Created attachment 2010229 [details]
File: environ

Comment 5 Joerg Skottke 2024-01-24 15:36:42 UTC
Created attachment 2010230 [details]
File: open_fds

Comment 6 Joerg Skottke 2024-01-24 15:36:43 UTC
Created attachment 2010231 [details]
File: mountinfo

Comment 7 Joerg Skottke 2024-01-24 15:36:45 UTC
Created attachment 2010232 [details]
File: os_info

Comment 8 Joerg Skottke 2024-01-24 15:36:47 UTC
Created attachment 2010233 [details]
File: cpuinfo

Comment 9 Joerg Skottke 2024-01-24 15:36:48 UTC
Created attachment 2010234 [details]
File: core_backtrace

Comment 10 Joerg Skottke 2024-01-24 15:36:50 UTC
Created attachment 2010235 [details]
File: dso_list

Comment 11 Joerg Skottke 2024-01-24 15:36:52 UTC
Created attachment 2010236 [details]
File: backtrace

Comment 12 John F Sullivan 2024-02-14 21:53:48 UTC
A backup program that is receiving a BTRFS snapshot in a permissive context reliably causes setroubleshootd to exit with a SIGTRAP and a log indicating it could not allocate 4096 bytes.


reporter:       libreport-2.17.11
type:           CCpp
reason:         python3.12 killed by SIGTRAP
journald_cursor: s=8006dcfc6b484285a13cd7a935ba0802;i=cb1f;b=a0a513c547b448f89630ada625c6453e;m=1f9f0809d;t=6113268fe59aa;x=b5561e01607e7d2f
executable:     /usr/bin/python3.12
cmdline:        /usr/bin/python3 -Es /usr/sbin/setroubleshootd -f
cgroup:         0::/system.slice/setroubleshootd.service
rootdir:        /
uid:            811
kernel:         6.7.4-200.fc39.x86_64
package:        setroubleshoot-server-3.3.32-7.fc39
runlevel:       N 3
backtrace_rating: 4
crash_function: g_malloc
comment:        A backup program that is receiving a BTRFS snapshot in a permissive context reliably causes setroubleshootd to exit with a SIGTRAP and a log indicating it could not allocate 4096 bytes.

Comment 13 John F Sullivan 2024-02-14 21:56:17 UTC
Log message in question:

   ../glib/gmem.c:136: failed to allocate 4096 bytes

Comment 14 John F Sullivan 2024-02-22 00:16:55 UTC
I found that the setroubleshootd.service unit has the directive "LimitAS=1G" in its "[Service]" section.  The systemd documentation recommends using "MemoryMax" instead of "LimitAS" since "LimitAS=1G" limits the memory to the first 1G, whereas "MemoryMax=1G" limits the memory to using no more than 1G.

I created the file /etc/systemd/system/setroubleshootd.service.d/memory.conf with the following contents:

[Service]
LimitAS=infinity
MemoryMax=1G

Since implementing this change, I haven't seen the errors.

Comment 15 John F Sullivan 2024-02-22 00:21:37 UTC
This commit, which seems to be part of 3.3.33, implements this change:
https://gitlab.com/setroubleshoot/setroubleshoot/-/commit/2d3e32fe2cd356f7ccc25004102177431d3ca2bc

Comment 17 Petr Lautrbach 2024-02-22 07:44:36 UTC
Thanks for the report and the investigation!

Comment 18 Fedora Update System 2024-02-22 08:09:11 UTC
FEDORA-2024-145c2c9ee8 (setroubleshoot-3.3.33-1.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-145c2c9ee8

Comment 19 Fedora Update System 2024-02-22 09:44:21 UTC
FEDORA-2024-6162b056b8 (setroubleshoot-3.3.33-1.fc38) has been submitted as an update to Fedora 38.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-6162b056b8

Comment 20 Fedora Update System 2024-02-23 01:45:50 UTC
FEDORA-2024-6162b056b8 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-6162b056b8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-6162b056b8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Fedora Update System 2024-02-23 02:10:12 UTC
FEDORA-2024-145c2c9ee8 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-145c2c9ee8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-145c2c9ee8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 22 Fedora Update System 2024-02-25 01:25:43 UTC
FEDORA-2024-145c2c9ee8 (setroubleshoot-3.3.33-1.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 23 Fedora Update System 2024-03-02 00:47:05 UTC
FEDORA-2024-6162b056b8 (setroubleshoot-3.3.33-1.fc38) has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.