Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Mattermost 5.2.1 crashes due to AppArmor denial #66

Closed
najamansari opened this issue Nov 25, 2022 · 10 comments
Closed

[Bug]: Mattermost 5.2.1 crashes due to AppArmor denial #66

najamansari opened this issue Nov 25, 2022 · 10 comments
Assignees
Labels

Comments

@najamansari
Copy link

What happened?

mattermost-desktop 5.2.1 randomly crashes. dmesg output shows an AppArmor denial for the file /proc/${PID}/oom_score_adj

What should have happened?

Mattermost should not crash. It should also not attempt to adjust its own OOM score but that is probably a separate bug report.

Output of snap info $snap_name

name:      mattermost-desktop
summary:   Open source, private cloud Slack-alternative
publisher: Snapcrafters
store-url: https://snapcraft.io/mattermost-desktop
contact:   https://github.com/snapcrafters/mattermost-desktop/issues
license:   unset
description: |
  Mattermost is secure workplace messaging from behind your firewall.
  
    - Discuss topics in private groups, one-to-one or team-wide
    - Easily share and view image files
    - Connect in-house systems with webhooks and Slack-compatible integrations
  
  To use this app, you need a URL for a Mattermost server.
  
  -------
  
  Host your own server: https://about.mattermost.com/download
  Terms of Service: http://about.mattermost.com/terms/
  Contribute to the project: https://github.com/mattermost/desktop
  
  
  This snap is maintained by the Snapcrafters community, and is not necessarily endorsed or
  officially maintained by the upstream developers.
commands:
  - mattermost-desktop
snap-id:      ed0pxJoDHrgmAWHH7baX5nryAHy1UNj0
tracking:     latest/stable
refresh-date: yesterday at 20:40 PKT
channels:
  latest/stable:    5.2.1 2022-11-21 (567) 135MB -
  latest/candidate: 5.2.1 2022-11-17 (567) 135MB -
  latest/beta:      ↑                            
  latest/edge:      5.2.1 2022-11-24 (571) 135MB -
installed:          5.2.1            (567) 135MB -

Output of snap connections $snap_name

Interface               Plug                                       Slot                            Notes
audio-playback          mattermost-desktop:audio-playback          :audio-playback                 -
audio-record            mattermost-desktop:audio-record            -                               -
camera                  mattermost-desktop:camera                  -                               -
content[gnome-42-2204]  mattermost-desktop:gnome-42-2204           gnome-42-2204:gnome-42-2204     -
content[gtk-3-themes]   mattermost-desktop:gtk-3-themes            gtk-common-themes:gtk-3-themes  -
content[icon-themes]    mattermost-desktop:icon-themes             gtk-common-themes:icon-themes   -
content[sound-themes]   mattermost-desktop:sound-themes            gtk-common-themes:sound-themes  -
desktop                 mattermost-desktop:desktop                 :desktop                        -
desktop-legacy          mattermost-desktop:desktop-legacy          :desktop-legacy                 -
gsettings               mattermost-desktop:gsettings               :gsettings                      -
home                    mattermost-desktop:home                    :home                           -
login-session-observe   mattermost-desktop:login-session-observe   -                               -
network                 mattermost-desktop:network                 :network                        -
network-bind            mattermost-desktop:network-bind            :network-bind                   -
opengl                  mattermost-desktop:opengl                  :opengl                         -
pulseaudio              mattermost-desktop:pulseaudio              :pulseaudio                     -
removable-media         mattermost-desktop:removable-media         -                               -
screen-inhibit-control  mattermost-desktop:screen-inhibit-control  :screen-inhibit-control         -
shared-memory           mattermost-desktop:shmem                   :shared-memory                  -
unity7                  mattermost-desktop:unity7                  :unity7                         -
wayland                 mattermost-desktop:wayland                 :wayland                        -
x11                     mattermost-desktop:x11                     :x11                            -

Output of snap version

snap    2.57.5
snapd   2.57.5
series  16
ubuntu  22.10
kernel  5.19.0-23-generic

Relevant log output

[ 5836.619833] mattermost-desk[30360]: segfault at 15c0030ba000 ip 00007ffb13777dc5 sp 00007fff08d871c0 error 4 in libayatana-appindicator3.so.1.0.0[7ffb13774000+6000]
[ 5836.619850] Code: 8b 73 40 49 89 c5 4d 85 f6 0f 84 86 00 00 00 48 8d 54 24 0c 48 8d 74 24 10 4c 89 ef 31 db e8 d2 cc ff ff 66 90 48 8b 44 24 10 <48> 8b 3c d8 39 5c 24 0c 7f 09 48 85 ff 0f 85 98 01 00 00 4c 89 f6
[ 5841.953024] audit: type=1326 audit(1669369399.159:401): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.mattermost-desktop.mattermost-desktop pid=42000 comm="mattermost-desk" exe="/snap/mattermost-desktop/567/opt/Mattermost/mattermost-desktop" sig=0 arch=c000003e syscall=330 compat=0 ip=0x7fac9d08911b code=0x50000
[ 5842.312940] audit: type=1107 audit(1669369399.519:402): pid=1250 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/" interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" mask="send" name="org.bluez" pid=42000 label="snap.mattermost-desktop.mattermost-desktop" peer_pid=1246 peer_label="unconfined"
                exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[ 5842.313328] audit: type=1326 audit(1669369399.519:403): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.mattermost-desktop.mattermost-desktop pid=42000 comm="mattermost-desk" exe="/snap/mattermost-desktop/567/opt/Mattermost/mattermost-desktop" sig=0 arch=c000003e syscall=314 compat=0 ip=0x7fac9d080a3d code=0x50000
[ 5842.315832] audit: type=1400 audit(1669369399.523:404): apparmor="DENIED" operation="open" class="file" profile="snap.mattermost-desktop.mattermost-desktop" name="/proc/42112/oom_score_adj" pid=42000 comm="ThreadPoolSingl" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000
[ 5842.338729] audit: type=1326 audit(1669369399.547:405): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.mattermost-desktop.mattermost-desktop pid=42112 comm="mattermost-desk" exe="/snap/mattermost-desktop/567/opt/Mattermost/mattermost-desktop" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7f020a3a05b1 code=0x50000
[ 5842.338735] audit: type=1326 audit(1669369399.547:406): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.mattermost-desktop.mattermost-desktop pid=42112 comm="mattermost-desk" exe="/snap/mattermost-desktop/567/opt/Mattermost/mattermost-desktop" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7f020a3a05b1 code=0x50000
[ 5842.338737] audit: type=1326 audit(1669369399.547:407): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.mattermost-desktop.mattermost-desktop pid=42112 comm="mattermost-desk" exe="/snap/mattermost-desktop/567/opt/Mattermost/mattermost-desktop" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7f020a3a05b1 code=0x50000
[ 5842.338738] audit: type=1326 audit(1669369399.547:408): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.mattermost-desktop.mattermost-desktop pid=42112 comm="mattermost-desk" exe="/snap/mattermost-desktop/567/opt/Mattermost/mattermost-desktop" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7f020a3a05b1 code=0x50000
[ 5842.338740] audit: type=1326 audit(1669369399.547:409): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.mattermost-desktop.mattermost-desktop pid=42112 comm="mattermost-desk" exe="/snap/mattermost-desktop/567/opt/Mattermost/mattermost-desktop" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7f020a3a05b1 code=0x50000
[ 5842.338741] audit: type=1326 audit(1669369399.547:410): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.mattermost-desktop.mattermost-desktop pid=42112 comm="mattermost-desk" exe="/snap/mattermost-desktop/567/opt/Mattermost/mattermost-desktop" sig=0 arch=c000003e syscall=203 compat=0 ip=0x7f020a3a05b1 code=0x50000

Teminal output of app

No response

@jugmac00
Copy link

I experience the same issue, but on Ubuntu 20.04.

Additionally my journal is flooded with:

Nov 25 10:25:36 XPS-13-9310 mattermost-desktop_mattermost-desktop.desktop[506658]: [506658:1125/102536.068266:ERROR:browser_main_loop.cc(269)] GLib: g_str_has_prefix: assertion 'str != NULL' failed

@alexmurray
Copy link

It is not clear that is crash is due to the AppArmor denial - more likely I suspect some issue between mattermost and libayatana-indicator given the first line of the output above.

@jnsgruk
Copy link
Member

jnsgruk commented Dec 7, 2022

Okay, this looks very related: https://bugs.launchpad.net/ubuntu/+source/libappindicator/+bug/1867996

@jnsgruk
Copy link
Member

jnsgruk commented Dec 8, 2022

@kenvandine it sounds like @jugmac00 also suffered a crash while using the branch you published for the gnome-42-2204 snap :/

Update including the error that preceded the crash:

[Do Dez  8 08:44:16 2022] mattermost-desk[899218]: segfault at 3b3c03683000 ip 00007fc9106e9dc5 sp 00007ffc83fee410 error 4 in libayatana-appindicator3.so.1.0.0[7fc9106e6000+6000]

@jugmac00
Copy link

jugmac00 commented Apr 8, 2023

Since installing the latest candidate version on Wednesday, 2023-04-05, I do not experience crashes anymore.

sudo snap refresh mattermost-desktop --channel=latest/candidate

@najamansari Could you also update and check whether this issue is fixed for you?

@najamansari
Copy link
Author

@najamansari Could you also update and check whether this issue is fixed for you?

I have just installed it on my machine, will update here after a day or two of usage.

@mitchdz
Copy link

mitchdz commented Apr 17, 2023

I have also been seeing this same issue On Ubuntu 22.04 using regolith-desktop DE.

The version of mattermost-desktop that is installed that I noticed the crashes is 5.2.2 and I see dmesg with very similar logs:

[631188.933363] mattermost-desk[3589451]: segfault at 1c7803682000 ip 00007ff820f70dc5 sp 00007ffff7f6b680 error 4 in libayatana-appindicator3.so.1.0.0[7ff820f6d000+6000]

I have just updated mattermost with

sudo snap refresh mattermost-desktop --channel=latest/candidate

To version 5.3.1 and will update if I see any more crashes.

@mitchdz
Copy link

mitchdz commented Apr 17, 2023

I had mattermost-desktop crash on me again, but did not see the above segfault - instead I saw the following in dmesg which I did not observe last time.

[637376.354623] traps: mattermost-desk[3951104] trap int3 ip:5604f80faf4b sp:7ffda02b5500 error:0 in mattermost-desktop[5604f7c98000+7859000]

It is to be noted that

  • I did not reboot after upgrading mattermost-desktop
  • I see the error usually when I leave my laptop for a bit and come back to put the mattermost window into focus.

@mitchdz
Copy link

mitchdz commented Jun 16, 2023

Coming back to this issue, mattermost-desktop snap version 5.3.1 is in my opinion more stable in my environment (Ubuntu 22.04 using regolith-desktop), I see less crashes with this version.

@mitchdz
Copy link

mitchdz commented Jun 20, 2023

Maybe close this issue since 5.4.0 is out now?

@popey popey closed this as completed Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants