snapcrafters / discord

A community-maintained package to easily install Discord on Linux
MIT License
75 stars 19 forks source link

Hey, it might be happening again, causing random restarts. #224

Closed niyazikemer closed 3 months ago

niyazikemer commented 3 months ago
          Hey, it might be happening again, causing random restarts.

discord_logs.txt these are my Discord only logs for five hours is 8.7 MB . Removing the discord seems to help it. tons of: Aug 06 12:52:06 niyazi-MS-7D67 kernel: audit: type=1400 audit(1722937926.215:223651): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=15442 comm="Utils" requested_mask="read" denied_mask="read" peer="unconfined" Aug 06 12:52:06 niyazi-MS-7D67 kernel: audit: type=1400 audit(1722937926.215:223652): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=15442 comm="Utils" requested_mask="read" denied_mask="read" peer="unconfined" Aug 06 12:52:06 niyazi-MS-7D67 kernel: audit: type=1400 audit(1722937926.215:223653): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=15442 comm="Utils" requested_mask="read" denied_mask="read" peer="unconfined" Aug 06 12:52:06 niyazi-MS-7D67 kernel: audit: type=1400 audit(1722937926.215:223654): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=15442 comm="Utils" requested_mask="read" denied_mask="read" peer="unconfined"

Originally posted by @niyazikemer in https://github.com/snapcrafters/discord/issues/29#issuecomment-2272828996

jnsgruk commented 3 months ago

Hey, per the README, have you tried the following?

sudo snap connect discord:system-observe

Discord is trying to ptrace processes, which the confinement is rightly stopping. We've chosen to not try and pursue autoconnect for the above interface, but you can choose to grant it on a per machine basis.

niyazikemer commented 3 months ago

Hey, per the README, have you tried the following?

sudo snap connect discord:system-observe

Discord is trying to ptrace processes, which the confinement is rightly stopping. We've chosen to not try and pursue autoconnect for the above interface, but you can choose to grant it on a per machine basis.

Thanks for the fix suggestion. I’m aware of that one (see the link). I've been experiencing this issue for the last 6 months and assumed it was related to Linux or a hardware problem. I recently discovered that it’s actually related to Discord. Along the way, I tried everything—full system reinstallation, buying a UPS, running intensive memory tests, replacing the GPU, and more. If you don’t know that Discord is the cause, then good luck (or it could be an AppArmor issue).

Last week, I found this issue, which is already closed (claiming it's fixed). But the problem persists, which is why I reopened it.

Fuseteam commented 3 months ago

But did you try that command? If it is apparmor related to discord, it should have an effect. At the very least the logs you posted should change

niyazikemer commented 3 months ago

No I didn't but rather remove Discord from the system. So this is just a flag. If somebody Do not know how Discord works without any problem on MacOS or windows or IOS. Now I realize that the problem is much more widespread, but somehow hidden from daily Discord users. This is what I think: Here is the link of the open issue. WOW from 2018. I will close this one going to put my comment there. Thanks

niyazikemer commented 3 months ago

Somehow I can not close it.

memory-thrasher commented 3 months ago

The issue you linked is a separate issue about spamming the audit log. That will not cause a restart.

Fuseteam commented 3 months ago

Also that spam is resolved by the given command.

That issue is open because

niyazikemer commented 3 months ago

Also that spam is resolved by the given command.

That issue is open because

* the connection is not made by default, so it spams by default

* half of the people in that issue are against the connection by default

I appreciate the command you suggested to solve the problem, but that command only bypasses it and potentially only for me, not for the rest of the community—unless they manage to find their way to this GitHub page, which was very difficult.

Anyway, I couldn't close this issue because I'm probably not a member. Instead, @jnsgruk marked it as 'completed,' but from my point of view, it is not. I'm going to try informing people through Stack Exchange instead.

Regards niyazi

Fuseteam commented 3 months ago

I appreciate the command you suggested to solve the problem, but that command only bypasses it and potentially only for me, not for the rest of the community—unless they manage to find their way to this GitHub page, which was very difficult.

It's not a bypass. Discord is requesting a permission, that command grants it. It is written in the readme

As mentioned earlier as well as why this isn't 'solved' by default

Hey, per the README, have you tried the following?

sudo snap connect discord:system-observe

Discord is trying to ptrace processes, which the confinement is rightly stopping. We've chosen to not try and pursue autoconnect for the above interface, but you can choose to grant it on a per machine basis.