Bug: [snap] ptrace not authorized prevents crash reporter
Status: UNCONFIRMED
Priority: --
Created: 2022-09-19 18:24:12+00:00
Resolved: 2024-07-08 20:06:44+00:00

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0

Steps to reproduce:

Something caused Thunderbird to crash triggering the crash reporter.

Additional information:

$ snap list thunderbird
Name         Version    Rev  Tracking       Publisher   Notes
thunderbird  102.2.2-1  251  latest/stable  canonical✓  -

This is very similar to a problem affecting Firefox's snap: bug 1791427


Actual results:

The crash reporter couldn't do its job due to the snap confinement preventing the use of ptrace. Here is is what's in the journal around the time of the crash:

```
Sep 16 11:59:47 sdeziel-lemur thunderbird_thunderbird.desktop[272030]: RunWatchdog: Mainthread nested event loops during hang:
Sep 16 11:59:47 sdeziel-lemur thunderbird_thunderbird.desktop[272030]:  --- nsThread::Shutdown: IMAP
Sep 16 11:59:47 sdeziel-lemur thunderbird_thunderbird.desktop[272030]: ExceptionHandler::GenerateDump cloned child 294207
Sep 16 11:59:47 sdeziel-lemur thunderbird_thunderbird.desktop[272030]: ExceptionHandler::SendContinueSignalToChild sent continue signal to child
Sep 16 11:59:47 sdeziel-lemur thunderbird_thunderbird.desktop[294207]: ExceptionHandler::WaitForContinueSignal waiting for continue signal...
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272030] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272180] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272186] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272192] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272193] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272194] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272195] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272196] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272207] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur kernel: ptrace attach of "/snap/thunderbird/251/thunderbird-bin"[272208] was attempted by "/snap/thunderbird/251/thunderbird-bin"[294207]
Sep 16 11:59:47 sdeziel-lemur crashreporter[294208]: Failed to load module "canberra-gtk-module"
Sep 16 11:59:47 sdeziel-lemur crashreporter[294208]: Failed to load module "canberra-gtk-module"
```