ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.24k stars 175 forks source link

gameoverlayrenderer.so crashes a 32-bit glibc built with gcc-12 #8302

Open ghost opened 2 years ago

ghost commented 2 years ago

Your system information

Please describe your issue in as much detail as possible:

Glibc built with gcc-12 makes gameoverlayrenderer.so crash during a call to dlvsym():

Steps for reproducing this issue:

  1. build 32-bit x86 glibc with either gcc-12 OR add the gcc flag "-ftree-vectorize" to the build ("-O2 -ftree-vectorize -msse" is enough)
  2. try to start any game from within the steam client
  3. watch "reaper" crash in 32bit libc.so.6::dlvsym()
thesamesam commented 2 years ago

Note that in Gentoo, we've worked around this by adding a USE=stack-realign USE flag to the sys-libs/glibc and sys-libs/ncurses ebuilds.

But it's indeed not Gentoo specific. There's a lot of history there.

https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-libs/glibc?id=02aa6328a720c86d0157c4582f7e5bac72ae9296.

ghost commented 2 years ago

What I do not understand is why the steam client and its associated ecosystem still rely on the over-2-decade old 32bit stack layout. The new layout existed and was used long before the steam client came to linux, but now it seems it forces the ecosystem around it use technologies which have long been obsoleted by better alternatives (this and now the reliance on DT_HASH of EAC).

tgurr commented 2 years ago

We just ran into this issue on Exherbo Linux as well now that we unmasked GCC 12.x, .local/share/Steam/ubuntu12_32/reaper segfaulting:

[   81.971623] traps: reaper[3223] general protection fault ip:f7c86819 sp:ff95c840 error:0 in libc.so.6[f7c22000+182000]
[  527.975995] traps: reaper[75543] general protection fault ip:f7c86819 sp:ffae4490 error:0 in libc.so.6[f7c22000+182000]
[  823.272890] traps: reaper[134429] general protection fault ip:f7c86819 sp:ff82ed80 error:0 in libc.so.6[f7c22000+182000]

and no game making use of Proton was working anymore. We now also apply the workaround to build our 32bit glibc with -mstackrealign as already done on Gentoo stated above, thanks @thesamesam for mentioning this here. Considering this was reported such long time ago already it's sad it hasn't already been fixed, usually you guys are pretty fast to fix things.