systemd ProtectSystem/mount namespace makes apport fail (impact most of our default system services)
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
apport (Ubuntu) | Status tracked in Hirsute | |||||
| Focal |
High
|
Unassigned | |||
| Groovy |
High
|
Unassigned | |||
| Hirsute |
High
|
Brian Murray |
Bug Description
[Impact]
apport is not creating crash files for multiple system services that use ProtectSystem since Ubuntu 20.04 LTS.
[Test Case]
On an Ubuntu desktop system perform the following step
1) sudo pkill -11 upowerd
With the current version of apport there will not be a crash file for upowerd in /var/crash/. With the version of apport in -proposed there will be a crash file for upowerd in /var/crash/.
[Regression Potential]
In the event that the changes to /usr/share/
[Original Description]
bluetoothd never leaves dumps/crash files when it crashes
And it seems this is true for everyone. Only supplementary binaries' crash reports are shown:
https:/
Related branches
- Brian Murray: Approve on 2020-11-05
-
Diff: 77 lines (+48/-0)3 files modifieddata/apport (+12/-0)
debian/changelog (+8/-0)
test/test_signal_crashes.py (+28/-0)
tags: | added: champagne |
Brian Murray (brian-murray) wrote : | #1 |
Brian Murray (brian-murray) wrote : | #2 |
Killing bluetoothd with signall 11 on Ubuntu 18.04 LTS I was able to create and submit a crash report to the Error Tracker.
https:/
Sebastien Bacher (seb128) wrote : | #3 |
It's due to the system bluetooth.service unit using ProtectSystem=full, commenting that line from the service and doing
$ sudo systemctl stop blueetooth.service
$ sudo systemctl daemon-reload
$ sudo systemctl start blueetooth.service
and sending the sig11 makes apport trigger
Note that systemd-coredump doesn't have this problem and register a backtrace in the journal even with ProtectSystem in use, which suggests it's an apport limitation
summary: |
- bluetoothd never leaves dumps/crash files when it crashes + systemd ProtectSystem makes apport fail |
summary: |
- systemd ProtectSystem makes apport fail + systemd ProtectSystem makes apport fail (impacts bluez) |
affects: | whoopsie (Ubuntu) → apport (Ubuntu) |
tags: | added: rls-ff-incoming |
summary: |
- systemd ProtectSystem makes apport fail (impacts bluez) + systemd ProtectSystem/mount namespace makes apport fail (impacts bluez) |
Sebastien Bacher (seb128) wrote : Re: systemd ProtectSystem/mount namespace makes apport fail (impacts bluez) | #4 |
Investigating a bit, it looks like apport bails out because the process hits this error
'host pid %s crashed in a separate mount namespace, ignoring'
systemd does use mount namespaces for its security features, apport shouldn't bail out in that context or we loose reporting for important system services (and we don't want to disable sandboxing to workaround the issue)
Changed in apport (Ubuntu): | |
importance: | Undecided → High |
Sebastien Bacher (seb128) wrote : | #5 |
$ grep ProtectSystem /lib/systemd/
In fact most system services in focal seem to fail triggering apport, tried on upower or bolt leads to the same error
summary: |
- systemd ProtectSystem/mount namespace makes apport fail (impacts bluez) + systemd ProtectSystem/mount namespace makes apport fail (impact most of + our default system services) |
Changed in bluez (Ubuntu): | |
status: | New → Invalid |
tags: | removed: rls-ff-incoming |
Steve Langasek (vorlon) wrote : | #6 |
Foundations is taking this for focal but it's at risk for the GA release.
If there are system services that are crashing, and this issue is getting in the way of the Desktop Team debugging those crashes, a workaround would be to disable the ProtectSystem rule in the systemd units (or instruct users how to do so locally). This is defense in depth, but is not a core part of our security model in Ubuntu that we should be unwilling to disable it for debugging.
Sebastien Bacher (seb128) wrote : | #7 |
Thanks Steve, local debugging isn't the concern at this point (the lack of reporting on e.u.c is the main issue) but that's good to know still.
Daniel van Vugt (vanvugt) wrote : | #8 |
I don't consider this bug "High" myself. It was just an interesting observation and isn't blocking me.
tags: | removed: champagne |
tags: | added: id-5e8615c94049a02d98879c25 |
Christian Ehrhardt (paelzer) wrote : | #9 |
FYI - I'm facing a bug where it would have been really helpful to have this fixed for better reporting. Therefore giving this nudge by pinging here ...
Launchpad Janitor (janitor) wrote : | #10 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in apport (Ubuntu Focal): | |
status: | New → Confirmed |
Changed in apport (Ubuntu): | |
status: | New → Confirmed |
Dan Streetman (ddstreet) wrote : | #12 |
maybe it would be better to just switch to systemd-coredump for crash handling.
Sebastien Bacher (seb128) wrote : | #13 |
@Dan, that could be a possible option going forward, from testing it doesn't have that limitation and it might have a more active upstream but probably not a change for a SRU so we would need to fix anyway for the LTS
tags: | added: fr-27 |
Changed in apport (Ubuntu): | |
assignee: | nobody → Brian Murray (brian-murray) |
status: | Confirmed → In Progress |
description: | updated |
Changed in apport (Ubuntu Groovy): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in apport (Ubuntu Focal): | |
status: | Confirmed → Triaged |
Launchpad Janitor (janitor) wrote : | #14 |
This bug was fixed in the package apport - 2.20.11-0ubuntu51
---------------
apport (2.20.11-0ubuntu51) hirsute; urgency=medium
* data/apport: Modify the check for whether or not a process is running in
the same namespace so that crashes from processes running protected in the
system.slice are considered as being from the same namespace. (LP: #1870060)
* etc/apport/
-- Brian Murray <email address hidden> Wed, 04 Nov 2020 13:40:41 -0800
Changed in apport (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in bluez (Ubuntu Groovy): | |
status: | New → Invalid |
Sebastien Bacher (seb128) wrote : | #15 |
Confirmed that with the update e.g upowerd reports are generated
Hello Daniel, or anyone else affected,
Accepted apport into groovy-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-
Further information regarding the verification process can be found at https:/
N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.
Changed in apport (Ubuntu Groovy): | |
status: | Triaged → Fix Committed |
tags: | added: verification-needed verification-needed-groovy |
Łukasz Zemczak (sil2100) wrote : | #17 |
Hello Daniel, or anyone else affected,
Accepted apport into focal-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-
Further information regarding the verification process can be found at https:/
N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.
Changed in apport (Ubuntu Focal): | |
status: | Triaged → Fix Committed |
tags: | added: verification-needed-focal |
Brian Murray (brian-murray) wrote : | #18 |
I had to reboot for the verification to pass, but it did.
bdmurray@
Listing... Done
apport/
N: There are 2 additional versions. Please use the '-a' switch to see them.
bdmurray@
bdmurray@
_usr_libexec_
Brian Murray (brian-murray) wrote : | #19 |
I tested groovy again, but this time I installed apport and python3-apport in one step instead of two and it passed without needing to reboot.
The verification on Focal also passed with no rebooting required.
bdmurray@
Listing... Done
apport/
N: There are 2 additional versions. Please use the '-a' switch to see them.
bdmurray@
bdmurray@
_usr_lib_
tags: |
added: verification-done verification-done-focal verification-done-groovy removed: verification-needed verification-needed-focal verification-needed-groovy |
no longer affects: | bluez (Ubuntu) |
no longer affects: | bluez (Ubuntu Focal) |
no longer affects: | bluez (Ubuntu Hirsute) |
no longer affects: | bluez (Ubuntu Groovy) |
The verification of the Stable Release Update for apport has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
Launchpad Janitor (janitor) wrote : | #21 |
This bug was fixed in the package apport - 2.20.11-
---------------
apport (2.20.11-
* data/apport: Modify the check for whether or not a process is running in
the same namespace so that crashes from processes running protected in the
system.slice are considered as being from the same namespace. (LP: #1870060)
-- Brian Murray <email address hidden> Mon, 16 Nov 2020 14:40:03 -0800
Changed in apport (Ubuntu Focal): | |
status: | Fix Committed → Fix Released |
Launchpad Janitor (janitor) wrote : | #22 |
This bug was fixed in the package apport - 2.20.11-0ubuntu50.2
---------------
apport (2.20.11-
* data/apport: Modify the check for whether or not a process is running in
the same namespace so that crashes from processes running protected in the
system.slice are considered as being from the same namespace. (LP: #1870060)
-- Brian Murray <email address hidden> Mon, 16 Nov 2020 14:33:58 -0800
Changed in apport (Ubuntu Groovy): | |
status: | Fix Committed → Fix Released |
There are bluetoothd crashes in the Error Tracker but the most recent release about which they were reported is 17.10.