Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 827386 - net-im/discord-bin no longer crashes with glibc-2.34[clone3]
Summary: net-im/discord-bin no longer crashes with glibc-2.34[clone3]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard: Workaround applied
Keywords: PullRequest
Depends on:
Blocks: glibc-2.34
  Show dependency tree
 
Reported: 2021-11-26 08:14 UTC by Eray Aslan
Modified: 2022-03-26 20:08 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eray Aslan gentoo-dev 2021-11-26 08:14:15 UTC
discord crashes with

$ discord 
Discord 0.0.16
Starting app.
Starting updater.
[Modules] Modules initializing
[...]
[24513:1126/110428.826408:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.

Failed to get crash dump id.
Report Id: d604dbed-1e7c-42

Failed to get crash dump id.
Report Id: 74a78c81-8dcf-4e
Illegal instruction

ubuntu thinks it is due to the new glibc:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1944468

electron fix:
https://github.com/electron/electron/pull/31091

as stated in the bug starting the app with --disable-gpu-sandbox works for me.

not sure what we can do as this is a binary package.
Comment 1 Larry the Git Cow gentoo-dev 2021-12-01 14:28:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16d8fcd2df5e1f0d11f507257b71f69a1031749f

commit 16d8fcd2df5e1f0d11f507257b71f69a1031749f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-11-29 21:03:34 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-01 14:28:43 +0000

    sys-libs/glibc: allow disabling clone3 sysflag (breaks older Electron)
    
    Bug: https://bugs.gentoo.org/827386
    Bug: https://bugs.gentoo.org/819045
    Signed-off-by: Sam James <sam@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/23118
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/glibc-2.34-disable-clone3-syscall.patch  | 38 ++++++++++++++++++++++
 sys-libs/glibc/glibc-2.34-r3.ebuild                |  9 ++++-
 sys-libs/glibc/metadata.xml                        |  1 +
 3 files changed, 47 insertions(+), 1 deletion(-)
Comment 2 Larry the Git Cow gentoo-dev 2021-12-01 14:43:12 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ecb1efccc3ab395227fefc059d3da827ab9e1eb

commit 2ecb1efccc3ab395227fefc059d3da827ab9e1eb
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-01 14:42:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-01 14:42:57 +0000

    net-im/discord-bin: reference other glibc bug in comment too
    
    Bug: https://bugs.gentoo.org/827386
    Signed-off-by: Sam James <sam@gentoo.org>

 net-im/discord-bin/discord-bin-0.0.16-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 Mike Lothian 2021-12-02 01:51:03 UTC
Weird it's working fine here with glibc 2.34-r3 with clone3 enabled

Stable 106612 (00f7526)
Host 0.0.16 
Linux 64-Bit (5.16.0-Rc1-Agd5f+)
Comment 4 Jason A. Donenfeld gentoo-dev 2021-12-06 16:07:31 UTC
I can confirm this is the case.

I suspect the problem has been fixed and delivered with discord's built-in updater thing.

So we should probably remove the USE dep and, as it's the last use of -clone3 in the tree, remove the flag from glibc.

Reopening the bug.
Comment 5 Gabriel Marcano 2022-01-03 18:02:05 UTC
Discord is still crashing for me. I've never enabled the clone3 useflag on glibc, and even if I force net-im/discord-bin-r4 to install (using --nodeps), it crashes on initialization. I can start is successfully if I disable the GPU sandbox (e.g. "discord --disable-gpu-sandbox"). There doesn't seem to be any pending update through their auto-updater that I can see. I cleared the discord .config folder just in case, and still no change. I wonder if they're doing a limited test deployment first?
Comment 6 Gabriel Marcano 2022-01-03 18:30:59 UTC
Sorry, forgot to paste the version of Discord currently running on my system:

Stable 108924 (eb8c571)
Host 0.0.16
Linux 64-Bit (5.15.12-Gentoo)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-03 19:40:04 UTC
(In reply to Gabriel Marcano from comment #5)
> Discord is still crashing for me. I've never enabled the clone3 useflag on
> glibc, and even if I force net-im/discord-bin-r4 to install (using
> --nodeps), it crashes on initialization. I can start is successfully if I
> disable the GPU sandbox (e.g. "discord --disable-gpu-sandbox"). There
> doesn't seem to be any pending update through their auto-updater that I can
> see. I cleared the discord .config folder just in case, and still no change.
> I wonder if they're doing a limited test deployment first?

Why would you need nodeps for that? What does emerge -pvO glibc discord-bin say?

Note that Bedford the flag existed, for glibc 2.34, it was always on. The functionality (not the USE flag) didn't exist in earlier versions though.
Comment 8 Gabriel Marcano 2022-01-03 19:47:09 UTC
I added --nodeps to test that discord no longer needed -clone3 in glibc, as there is no discord-bin version in the tree that doesn't depend on glibc[-clone3]. In other words, currently, my glibc-2.34-r4 is built with clone3 enabled. I made sure that all other dependencies of discord-bin were met, except -clone3 in glibc, and then I installed discord-bin using --nodeps to skip that dependency and just install net-im/discord-bin-0.0.16-r4 .

I also created an ebuild on my local overlay removing the -clone3 requirement to test if discord had updated through its own channels and to see if it worked using clone3 as claimed in comment 3 and 4, and still, I'm seeing crashes unless I disable the GPU sandbox on Discord.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-03 19:50:46 UTC
(In reply to Gabriel Marcano from comment #8)
> I added --nodeps to test that discord no longer needed -clone3 in glibc, as
> there is no discord-bin version in the tree that doesn't depend on
> glibc[-clone3]. In other words, currently, my glibc-2.34-r4 is built with
> clone3 enabled. I made sure that all other dependencies of discord-bin were
> met, except -clone3 in glibc, and then I installed discord-bin using
> --nodeps to skip that dependency and just install
> net-im/discord-bin-0.0.16-r4 .
> 
> I also created an ebuild on my local overlay removing the -clone3
> requirement to test if discord had updated through its own channels and to
> see if it worked using clone3 as claimed in comment 3 and 4, and still, I'm
> seeing crashes unless I disable the GPU sandbox on Discord.

I'm sorry, I misunderstood, I get you now, I think? You were saying that clone3 still needs to be off?

This part is what confused me: "I've never enabled the clone3 useflag on glibc" and yet it still crashes, but you say now you have it enabled.
Comment 10 Gabriel Marcano 2022-01-03 20:00:32 UTC
Ah right, sorry, I misspoke the first comment. I've only ever had glibc[clone3] installed.

So yes, at least from what I can tell, we/I still need glibc[-clone3] as a dependency on discord-bin, or as an alternative with glibc[clone3] launching discord with --disable-gpu-sandbox
Comment 11 Larry the Git Cow gentoo-dev 2022-02-17 20:25:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2aea64cc19a0fb0cf14862032fa4f139dadf371

commit e2aea64cc19a0fb0cf14862032fa4f139dadf371
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2022-02-17 20:09:47 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2022-02-17 20:24:49 +0000

    net-im/discord-bin: remove clone3 check
    
    Seems to work fine with both old glibc-2.33 and glibc-2.34[clone3]
    
    Keep glibc dep itself given this is a prebuilt and can't work
    with alternate libcs.
    
    Closes: https://bugs.gentoo.org/827386
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 net-im/discord-bin/discord-bin-0.0.17.ebuild | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)