Bug 2065813 - [abrt] uresourced: r_app_monitor_start(): uresourced killed by SIGTRAP
Summary: [abrt] uresourced: r_app_monitor_start(): uresourced killed by SIGTRAP
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: uresourced
Version: 36
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Benjamin Berg
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:8a235d3abeecfb279d663b74365...
: 2085091 2087192 2087998 2090107 2090406 2091444 2091685 2093813 2095984 2096092 2096165 2105206 2111838 2112404 2115470 2121467 2126579 2126798 2130103 2133527 2135423 2152337 2158530 2159202 2160063 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-18 19:27 UTC by Baptiste Mille-Mathias
Modified: 2023-01-11 13:08 UTC (History)
27 users (show)

Fixed In Version: uresourced-0.5.2-1.fc36 uresourced-0.5.3-1.fc36
Clone Of:
Environment:
Last Closed: 2022-06-18 00:38:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (14.27 KB, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
File: cgroup (475 bytes, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
File: core_backtrace (4.54 KB, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
File: cpuinfo (2.73 KB, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
File: dso_list (606 bytes, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
File: environ (1.49 KB, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
File: limits (1.29 KB, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
File: maps (3.90 KB, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
File: mountinfo (3.91 KB, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
File: open_fds (554 bytes, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
File: proc_pid_status (1.37 KB, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
File: var_log_messages (105 bytes, text/plain)
2022-03-18 19:27 UTC, Baptiste Mille-Mathias
no flags Details
Core and backtrace of the persisting issue (163.49 KB, application/gzip)
2022-04-13 09:50 UTC, Ricardo Garcia
no flags Details
Log and core after modifying the service file (164.31 KB, application/gzip)
2022-04-13 18:59 UTC, Ricardo Garcia
no flags Details

Description Baptiste Mille-Mathias 2022-03-18 19:27:28 UTC
Description of problem:
uresourced constantly crash at the beginning of the session since I migrated to fedora 36

Version-Release number of selected component:
uresourced-0.5.1-1.fc36

Additional info:
reporter:       libreport-2.17.1
backtrace_rating: 4
cmdline:        /usr/libexec/uresourced --user
crash_function: r_app_monitor_start
executable:     /usr/libexec/uresourced
journald_cursor: s=eecd6e36a30748ed91cd82f662a13784;i=60722;b=a5b66863d3ef4e7a9c3904a0c71d673a;m=a9f958e;t=5da8302346b87;x=4426a082428930ef
kernel:         5.17.0-0.rc7.116.fc36.x86_64
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            1000

Comment 1 Baptiste Mille-Mathias 2022-03-18 19:27:31 UTC
Created attachment 1866660 [details]
File: backtrace

Comment 2 Baptiste Mille-Mathias 2022-03-18 19:27:32 UTC
Created attachment 1866661 [details]
File: cgroup

Comment 3 Baptiste Mille-Mathias 2022-03-18 19:27:33 UTC
Created attachment 1866662 [details]
File: core_backtrace

Comment 4 Baptiste Mille-Mathias 2022-03-18 19:27:35 UTC
Created attachment 1866663 [details]
File: cpuinfo

Comment 5 Baptiste Mille-Mathias 2022-03-18 19:27:36 UTC
Created attachment 1866664 [details]
File: dso_list

Comment 6 Baptiste Mille-Mathias 2022-03-18 19:27:37 UTC
Created attachment 1866665 [details]
File: environ

Comment 7 Baptiste Mille-Mathias 2022-03-18 19:27:38 UTC
Created attachment 1866666 [details]
File: limits

Comment 8 Baptiste Mille-Mathias 2022-03-18 19:27:40 UTC
Created attachment 1866667 [details]
File: maps

Comment 9 Baptiste Mille-Mathias 2022-03-18 19:27:41 UTC
Created attachment 1866668 [details]
File: mountinfo

Comment 10 Baptiste Mille-Mathias 2022-03-18 19:27:42 UTC
Created attachment 1866669 [details]
File: open_fds

Comment 11 Baptiste Mille-Mathias 2022-03-18 19:27:44 UTC
Created attachment 1866670 [details]
File: proc_pid_status

Comment 12 Baptiste Mille-Mathias 2022-03-18 19:27:45 UTC
Created attachment 1866671 [details]
File: var_log_messages

Comment 13 Baptiste Mille-Mathias 2022-03-29 19:46:34 UTC
still get this error each time I login

Comment 14 Benjamin Berg 2022-03-30 09:59:05 UTC
Funny, I am curious, what kind of session are you logging in to?

I suppose, the explanation is that you don't yet have app.slice at the time of uresourced starting up. There are two simple ways of fixing that.

Comment 15 Baptiste Mille-Mathias 2022-03-30 10:19:41 UTC
Hi Benjamin,

I'm using a standard Fedora 36 with GNOME installed, the only special thing is I've update this workstation along the year from Fedora 20 (not sure) every 6 months.

Best.

Comment 16 Fedora Update System 2022-03-31 15:12:32 UTC
FEDORA-2022-33dcbfb7c3 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-33dcbfb7c3

Comment 17 Fedora Update System 2022-04-01 23:23:38 UTC
FEDORA-2022-33dcbfb7c3 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-33dcbfb7c3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-33dcbfb7c3

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

Comment 18 Ricardo Garcia 2022-04-13 07:06:23 UTC
Hi, I also have this problem of uresourced crashing when starting my Gnome session under Fedora 36, but the problem persists after installing the update above. The problem reporting tool points me to this report here:

  https://retrace.fedoraproject.org/faf/reports/364212/

Let me know if you need more information or if I should open a new issue with the problem.

Comment 19 Benjamin Berg 2022-04-13 09:40:45 UTC
I was convinced the update would fix this ...

  https://retrace.fedoraproject.org/faf/reports/364212/

The report is not very useful unfortunately (it seems to be missing the relevant stack frame). Could you either try to fetch the full backtrace or just check `journalctl --user -u uresourced.service` for the assertion you are running into?

Comment 20 Ricardo Garcia 2022-04-13 09:50:31 UTC
Created attachment 1872123 [details]
Core and backtrace of the persisting issue

Comment 21 Ricardo Garcia 2022-04-13 09:52:00 UTC
Just uploaded the core file and backtrace. Hope it helps. 🤞

Comment 22 Ricardo Garcia 2022-04-13 09:56:09 UTC
Also the journalctl output looks like this:

Apr 13 08:51:25 localhost.localdomain systemd[3081]: Starting uresourced.service - User resource assignment daemon...
Apr 13 08:51:25 localhost.localdomain uresourced[3211]: Failed inotify_add_watch for app.slice directory.
Apr 13 08:51:25 localhost.localdomain systemd-coredump[3218]: Process 3211 (uresourced) of user 1000 dumped core.
                                                              
                                                              Module linux-vdso.so.1 with build-id 44055b880e9c5f40b88e7e8f2daad800142cc4ae
                                                              Module libgpg-error.so.0 with build-id a53c231739d55cc39b97e28c36cd8b3e58a8f8f8
                                                              Metadata for module libgpg-error.so.0 owned by FDO found: {
                                                                      "type" : "rpm",
                                                                      "name" : "libgpg-error",
                                                                      "version" : "1.45-1.fc36",
                                                                      "architecture" : "x86_64",
                                                                      "osCpe" : "cpe:/o:fedoraproject:fedora:36"
                                                              }
                                                              
                                                              Module libpcre2-8.so.0 with build-id 2827cb8b86a0a697fa6e6646690d1b01de9b6fba
                                                              Metadata for module libpcre2-8.so.0 owned by FDO found: {
                                                                      "type" : "rpm",
                                                                      "name" : "pcre2",
                                                                      "version" : "10.39-1.fc36.1",
                                                                      "architecture" : "x86_64",
                                                                      "osCpe" : "cpe:/o:fedoraproject:fedora:36"
                                                              }
                                                              
                                                              Module libblkid.so.1 with build-id 9e58123c73f92b29e14b080448cade11b65edde2
                                                              Metadata for module libblkid.so.1 owned by FDO found: {
                                                                      "type" : "rpm",
                                                                      "name" : "util-linux",
                                                                      "version" : "2.38-0.2.fc36",
                                                                      "architecture" : "x86_64",
                                                                      "osCpe" : "cpe:/o:fedoraproject:fedora:36"
                                                              }
                                                              
                                                              Module ld-linux-x86-64.so.2 with build-id 997994d4535f8c791738540c3e6ee8e46a752603
                                                              Module libgcrypt.so.20 with build-id ff03e5dff0c164925ad3b8ad1c3143a8eb8b1f9c
                                                              Stack trace of thread 3211:
                                                              #0  0x00007faa76959897 g_log_structured_array (libglib-2.0.so.0 + 0x59897)
                                                              #1  0x00007faa76959b62 g_log_default_handler (libglib-2.0.so.0 + 0x59b62)
                                                              #2  0x00007faa76959dc2 g_logv (libglib-2.0.so.0 + 0x59dc2)
                                                              #3  0x00007faa7695a073 g_log (libglib-2.0.so.0 + 0x5a073)
                                                              #4  0x0000556732bde6cc main (uresourced + 0x66cc)
                                                              #5  0x00007faa76316590 __libc_start_call_main (libc.so.6 + 0x2d590)
                                                              #6  0x00007faa76316649 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2d649)
                                                              #7  0x0000556732bdec75 _start (uresourced + 0x6c75)
                                                              
                                                              Stack trace of thread 3215:
                                                              #0  0x00007faa763f2e8f __poll (libc.so.6 + 0x109e8f)
                                                              #1  0x00007faa769aa0dd g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xaa0dd)
                                                              #2  0x00007faa769528e0 g_main_context_iteration (libglib-2.0.so.0 + 0x528e0)
                                                              #3  0x00007faa76952931 glib_worker_main (libglib-2.0.so.0 + 0x52931)
                                                              #4  0x00007faa7697f172 g_thread_proxy (libglib-2.0.so.0 + 0x7f172)
                                                              #5  0x00007faa7637a017 start_thread (libc.so.6 + 0x91017)
                                                              #6  0x00007faa763ff6d0 __clone3 (libc.so.6 + 0x1166d0)
                                                              ELF object binary architecture: AMD x86-64
Apr 13 08:51:25 localhost.localdomain systemd[3081]: uresourced.service: Main process exited, code=dumped, status=5/TRAP
Apr 13 08:51:25 localhost.localdomain systemd[3081]: uresourced.service: Failed with result 'core-dump'.
Apr 13 08:51:25 localhost.localdomain systemd[3081]: Failed to start uresourced.service - User resource assignment daemon.

Comment 23 Benjamin Berg 2022-04-13 13:48:25 UTC
Yikes. So the Requires=app.slice was not enough, apparently we also need an After=app.slice. I thought Requires= would imply After= in this case.

My bad really.

Comment 24 Benjamin Berg 2022-04-13 14:11:48 UTC
I was not able to reproduce the issue locally. If you can reliably reproduce it, can you try to adding `After=app.slice` to /usr/lib/systemd/user/uresourced.service and verify that this fixes the issue?

If not, no worries. I can just push out the fix, and we'll see in the crash reports whether it is disappearing.

Comment 25 Ricardo Garcia 2022-04-13 18:58:40 UTC
I edited the unit file as requested and then rebooted just in case, but it doesn't seem to fix the issue for me. Apparently I get the same crash.

Unit file
------------------
$ cat /usr/lib/systemd/user/uresourced.service
[Unit]
Description=User resource assignment daemon
Requires=app.slice
After=app.slice

Before=graphical-session.target
PartOf=graphical-session.target

[Service]
# This daemon needs to be in the root slice so that the system daemon can
# detect it easily by checking whether the cgroup path exists.
Slice=-.slice

Type=notify
ExecStart=/usr/libexec/uresourced --user
TimeoutStopSec=5s


ProtectSystem=strict
RestrictAddressFamilies=AF_UNIX

-------------------

Comment 26 Ricardo Garcia 2022-04-13 18:59:40 UTC
Created attachment 1872297 [details]
Log and core after modifying the service file

Comment 27 Fedora Update System 2022-05-07 04:14:09 UTC
FEDORA-2022-33dcbfb7c3 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 28 Sylvain Floury 2022-05-12 19:05:53 UTC
*** Bug 2085091 has been marked as a duplicate of this bug. ***

Comment 29 Igal Alkon 2022-05-17 14:31:47 UTC
*** Bug 2087192 has been marked as a duplicate of this bug. ***

Comment 30 Brodie Kurczynski 2022-05-18 15:39:54 UTC
*** Bug 2087998 has been marked as a duplicate of this bug. ***

Comment 31 Svetlozar Argirov 2022-05-25 07:34:58 UTC
*** Bug 2090107 has been marked as a duplicate of this bug. ***

Comment 32 Peter 2022-05-25 16:59:02 UTC
*** Bug 2090406 has been marked as a duplicate of this bug. ***

Comment 33 Ricardo Garcia 2022-05-27 09:36:04 UTC
This bug was closed with the update that modified the unit file, if I recall correctly, but it doesn't seem to be fixed. It still happens from time to time on my system and bugs keep to be marked as duplicates of this one.

Comment 34 bugzilla 2022-05-29 22:06:05 UTC
*** Bug 2091444 has been marked as a duplicate of this bug. ***

Comment 35 kevin.m8 2022-05-30 17:38:20 UTC
*** Bug 2091685 has been marked as a duplicate of this bug. ***

Comment 36 Svetlozar Argirov 2022-06-06 07:02:33 UTC
*** Bug 2093813 has been marked as a duplicate of this bug. ***

Comment 37 1 2022-06-10 15:29:07 UTC
Hi guys, this bug is happening on my machine every day multiple times. Sometimes I'm only logged out, sometimes the machine restarts. This sucks a lot as it happens randomly and all unsaved data is everytime lost...
Any progress or workarounds?

Comment 38 1 2022-06-11 15:09:55 UTC
*** Bug 2095984 has been marked as a duplicate of this bug. ***

Comment 39 Mark 2022-06-12 18:59:53 UTC
*** Bug 2096092 has been marked as a duplicate of this bug. ***

Comment 40 Mark 2022-06-12 19:07:46 UTC
I've been seeing instability in both gnome-shell/wayland & kde/plasma desktops for a while; today they both started crashing though. It looks as though the bug may need reopening as recent changes may have reawakened it?

Comment 41 Anton C. Bors 2022-06-13 07:28:28 UTC
*** Bug 2096165 has been marked as a duplicate of this bug. ***

Comment 42 Mark 2022-06-13 15:17:03 UTC
*** Bug 2096349 has been marked as a duplicate of this bug. ***

Comment 43 Benjamin Berg 2022-06-13 16:28:33 UTC
No, it was never properly fixed, reopening (fix is already incoming).

A Requires= dependency is not sufficient. We also need to add an After= ordering rule to guarantee the cgroup directory exists.

That said, uresourced crashing like this should not have any further side effects. Everything should just continue to work fine.

Comment 44 Fedora Update System 2022-06-13 16:52:36 UTC
FEDORA-2022-921d59d9f6 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-921d59d9f6

Comment 45 Fedora Update System 2022-06-14 01:15:49 UTC
FEDORA-2022-921d59d9f6 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-921d59d9f6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-921d59d9f6

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

Comment 46 Mark 2022-06-14 08:32:30 UTC
The update doesn't seem to have fixed the SIGTRAP error;

Looking at https://fedoraproject.org/wiki/Changes/Reserve_resources_for_active_user_WS it seems some of the sysfs endpoints must now be obsolete? for instance `/sys/fs/cgroup/user.slice/memory.low` could potentially now be in `/sys/fs/cgroup/memory/user.slice/memory.*` though there is no obvious equivalent of `memory.low` among the alternatives

As for the desktop instability, I can't specifically say it's the 'fault' of `uresourced`; the symptoms are quite graphics/memory-connected though; possibly a secondary consequence of `uresourced` not running?

Comment 47 Mark 2022-06-14 09:28:11 UTC
I found what it is for me, is that uresourced is not handling cgroup v1 gracefully; I found systemd.unified_cgroup_hierarchy=0 in my cmdline that may be docker's fault.

Comment 48 Benjamin Berg 2022-06-14 09:53:38 UTC
Ugh, I think docker might not be able to handle cgroup v2 properly?

tbh. I think that is a separate bug. I am happz to add `ConditionControlGroupController=v2` to the .service files to disable uresourced if cgroup v1 is used.

Do you mind quickly opening a new issue for that? While the it is the same assertions, I do believe there are two separate issues here.

Comment 49 Mark 2022-06-14 10:47:03 UTC
I've unmarked https://bugzilla.redhat.com/show_bug.cgi?id=2096349 as duplicate, hope that's the right way :-)

Comment 50 Anton C. Bors 2022-06-15 14:41:51 UTC
Dont know if it is important or not.
I had the problem with uresourced when cgroups v1 was enabled in the kernel.
I changed from cgroups v1 to v2 and now every thing is working ( Fedora 36 ).
Also docker is running correctly.

Comment 51 Fedora Update System 2022-06-18 00:38:04 UTC
FEDORA-2022-921d59d9f6 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 52 1 2022-06-18 07:14:01 UTC
The problem still exists. I run on the new version for three days now and from a subjective point of view the problem has become less now only once a day before it was sometimes 5x a day.

Comment 53 Benjamin Berg 2022-06-20 08:04:32 UTC
I don't think it can be this particular bug (this bug should only happen at login time). Unless you are on cgroupv1, in which case this MR would not have helped at all.

It can be that you are hitting some other issue (like the issue processing pipewire events). Please provide more information about the issue you are having so that we can track it down. `coredumpctl` should be able to provide a backtrace.

Comment 54 Ricardo Garcia 2022-06-20 15:18:42 UTC
(In reply to Mark from comment #47)
> I found what it is for me, is that uresourced is not handling cgroup v1
> gracefully; I found systemd.unified_cgroup_hierarchy=0 in my cmdline that
> may be docker's fault.

Oh, thank you! I had installed Docker in the past and also had that option added to the kernel's command line (I had completely forgotten about it). I no longer use Docker, so I've removed the option and haven't had a uresourced crash on session start since then.

Comment 55 Mathias Nicolajsen Kjærgaard 2022-07-08 09:07:12 UTC
*** Bug 2105206 has been marked as a duplicate of this bug. ***

Comment 56 Santiago Gala 2022-07-28 09:53:18 UTC
*** Bug 2111838 has been marked as a duplicate of this bug. ***

Comment 57 Kevin Weis 2022-07-29 15:37:25 UTC
*** Bug 2112404 has been marked as a duplicate of this bug. ***

Comment 58 Adam 2022-08-04 18:12:23 UTC
*** Bug 2115470 has been marked as a duplicate of this bug. ***

Comment 59 Radek Valasek 2022-08-25 14:45:04 UTC
*** Bug 2121467 has been marked as a duplicate of this bug. ***

Comment 60 Taslim 2022-09-14 00:30:47 UTC
*** Bug 2126579 has been marked as a duplicate of this bug. ***

Comment 61 danilo.cantarella 2022-09-14 12:42:07 UTC
*** Bug 2126798 has been marked as a duplicate of this bug. ***

Comment 62 bdy1234567 2022-09-27 08:14:42 UTC
*** Bug 2130103 has been marked as a duplicate of this bug. ***

Comment 63 Drew Dowling 2022-10-10 18:04:24 UTC
*** Bug 2133527 has been marked as a duplicate of this bug. ***

Comment 64 jes 2022-10-17 15:32:01 UTC
*** Bug 2135423 has been marked as a duplicate of this bug. ***

Comment 65 m.cami 2022-12-10 21:45:34 UTC
*** Bug 2152337 has been marked as a duplicate of this bug. ***

Comment 66 Radek Valasek 2023-01-05 16:49:36 UTC
*** Bug 2158530 has been marked as a duplicate of this bug. ***

Comment 67 penguen 2023-01-09 07:35:52 UTC
*** Bug 2159202 has been marked as a duplicate of this bug. ***

Comment 68 Maxime Werlen 2023-01-11 13:08:54 UTC
*** Bug 2160063 has been marked as a duplicate of this bug. ***


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