Source-1-Games icon indicating copy to clipboard operation
Source-1-Games copied to clipboard

engine.so: cannot enable executable stack as shared object requires: Invalid argument

Open munoida opened this issue 10 months ago • 22 comments

As per title. (Haven't tested other Source games, but I'd imagine it'd also affect every outdated Source 1 game not taking advantage of Vulkan and 64-Bit) PC Specs:

OS: Arch Linux
KERNEL: 6.12.12-1-lts
CPU: 13th Gen Intel Core i5-13400F
GPU: NVIDIA GeForce RTX 4060
GPU DRIVER: NVIDIA 570.86.16
RAM: 16 GB

Logs:

steamwebhelper.sh[95715]: Using CEF sandbox \(try with -no-cef-sandbox if this fails\)
steamwebhelper.sh[95715]: Starting steamwebhelper with Sniper steam runtime at /home/lunar/.local/share/Steam/ubuntu12_64/steam-runtime-sniper/_v2-entry-point
exec ./steamwebhelper -nocrashdialog -lang=en_US -cachedir=/home/lunar/.local/share/Steam/config/htmlcache -steampid=95706 -buildid=1738026274 -steamid=0 -logdir=/home/lunar/.local/share/Steam/logs -uimode=7 -startcount=0 -steamuniverse=Public -realm=Global -clientui=/home/lunar/.local/share/Steam/clientui -steampath=/home/lunar/.local/share/Steam/ubuntu12_32/steam -launcher=0 -use_xcomposite_workaround -no-restart-on-ui-mode-change --valve-initial-threadpool-size=6 --valve-enable-site-isolation --enable-smooth-scrolling --password-store=basic --log-file=/home/lunar/.local/share/Steam/logs/cef_log.txt --disable-quick-menu --enable-features=PlatformHEVCDecoderSupport --disable-features=SpareRendererForSitePerProcess,DcheckIsFatal,ValveFFmpegAllowLowDelayHEVC
Steam Runtime Launch Service: starting steam-runtime-launcher-service
Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 95874
bus_name=com.steampowered.PressureVessel.LaunchAlongsideSteam
/usr/share/themes/Breeze-Dark/gtk-2.0/widgets/entry:70: error: unexpected identifier 'direction', expected character '}'
/usr/share/themes/Breeze-Dark/gtk-2.0/widgets/styles:36: error: invalid string constant "combobox_entry", expected valid string constant
Desktop state changed: desktop: { pos:    0,   0 size: 1920,1080 } primary: { pos:    0,   0 size: 1920,1080 }
Caching cursor image for , size 32x32, serial 40, cache size = 0
chdir "/home/lunar/.local/share/Steam/steamapps/common/Counter-Strike Source"
ERROR: ld.so: object '/home/lunar/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/lunar/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/lunar/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/lunar/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/lunar/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Game Recording - would start recording game 240, but recording for this game is disabled
Adding process 96086 for gameID 240
Adding process 96087 for gameID 240
Adding process 96088 for gameID 240
WARNING: discarding _NET_WM_PID 5 as invalid for X11 window - use specialized XCB_X11_TO_PID function!
WARNING: discarding _NET_WM_PID 5 as invalid for X11 window - use specialized XCB_X11_TO_PID function!
WARNING: discarding _NET_WM_PID 5 as invalid for X11 window - use specialized XCB_X11_TO_PID function!
pid 96171 != 96166, skipping destruction (fork without exec?)
pid 96176 != 96166, skipping destruction (fork without exec?)
pid 96197 != 96166, skipping destruction (fork without exec?)
Adding process 96166 for gameID 240
Adding process 96198 for gameID 240
Adding process 96199 for gameID 240
SDL video target is 'x11'
SDL video target is 'x11'
 failed to dlopen /home/lunar/.local/share/Steam/steamapps/common/Counter-Strike Source/bin/engine.so error=/home/lunar/.local/share/Steam/steamapps/common/Counter-Strike Source/bin/engine.so: cannot enable executable stack as shared object requires: Invalid argument
 failed to dlopen engine.so error=engine.so: cannot enable executable stack as shared object requires: Invalid argument
AppFramework : Unable to load module engine.so!
Unable to load interface VCvarQuery001 from engine.so
02/06 00:22:44 minidumps folder is set to /tmp/dumps
02/06 00:22:44 Init: Installing breakpad exception handler for appid(gameoverlayui)/version(20250128005041)/tid(96205)
02/06 00:22:44 Init: Installing breakpad exception handler for appid(gameoverlayui)/version(1.0)/tid(96205)
This system supports the OpenGL extension GL_EXT_framebuffer_object.
This system supports the OpenGL extension GL_EXT_framebuffer_blit.
This system supports the OpenGL extension GL_EXT_framebuffer_multisample.
This system DOES NOT support the OpenGL extension GL_APPLE_fence.
This system supports the OpenGL extension GL_NV_fence.
This system supports the OpenGL extension GL_ARB_sync.
This system supports the OpenGL extension GL_EXT_draw_buffers2.
This system supports the OpenGL extension GL_EXT_bindable_uniform.
This system DOES NOT support the OpenGL extension GL_APPLE_flush_buffer_range.
This system supports the OpenGL extension GL_ARB_map_buffer_range.
This system supports the OpenGL extension GL_ARB_vertex_buffer_object.
This system supports the OpenGL extension GL_ARB_occlusion_query.
This system DOES NOT support the OpenGL extension GL_APPLE_texture_range.
This system DOES NOT support the OpenGL extension GL_APPLE_client_storage.
This system DOES NOT support the OpenGL extension GL_ARB_uniform_buffer.
This system supports the OpenGL extension GL_ARB_vertex_array_bgra.
This system supports the OpenGL extension GL_EXT_vertex_array_bgra.
This system supports the OpenGL extension GL_ARB_framebuffer_object.
This system DOES NOT support the OpenGL extension GL_GREMEDY_string_marker.
This system supports the OpenGL extension GL_ARB_debug_output.
This system supports the OpenGL extension GL_EXT_direct_state_access.
This system supports the OpenGL extension GL_NV_bindless_texture.
This system DOES NOT support the OpenGL extension GL_AMD_pinned_memory.
This system supports the OpenGL extension GL_EXT_framebuffer_multisample_blit_scaled.
This system supports the OpenGL extension GL_EXT_texture_sRGB_decode.
This system supports the OpenGL extension GL_NVX_gpu_memory_info.
This system DOES NOT support the OpenGL extension GL_ATI_meminfo.
This system supports the OpenGL extension GL_EXT_texture_compression_s3tc.
This system supports the OpenGL extension GL_EXT_texture_compression_dxt1.
This system DOES NOT support the OpenGL extension GL_ANGLE_texture_compression_dxt3.
This system DOES NOT support the OpenGL extension GL_ANGLE_texture_compression_dxt5.
This system supports the OpenGL extension GL_ARB_buffer_storage.
This system DOES NOT support the OpenGL extension GLX_EXT_swap_control_tear.
OpenGL: NVIDIA GeForce RTX 4060/PCIe/SSE2 4.6.0 NVIDIA 570.86.16 (4.6.0)
GL_NV_bindless_texture: DISABLED
GL_AMD_pinned_memory: DISABLED
GL_ARB_buffer_storage: AVAILABLE
GL_EXT_texture_sRGB_decode: AVAILABLE
Game Recording - game stopped [gameid=240]
Removing process 96199 for gameID 240
Removing process 96198 for gameID 240
Removing process 96166 for gameID 240
Removing process 96088 for gameID 240
Removing process 96087 for gameID 240
Removing process 96086 for gameID 240```

munoida avatar Feb 06 '25 05:02 munoida

Related: #6978

kisak-valve avatar Feb 06 '25 13:02 kisak-valve

Generalizing this topic to various game titles. Left 4 Dead 2 has already been triaged.

kisak-valve avatar Feb 06 '25 16:02 kisak-valve

can confirm

zukas97 avatar Feb 06 '25 17:02 zukas97

Is it safe to use execstack -c engine.so fix on VAC secured servers?

Nyvyme avatar Feb 08 '25 14:02 Nyvyme

It appears to be an issue with the glibc update https://gitlab.archlinux.org/archlinux/packaging/packages/glibc/-/issues/19

cnqso avatar Feb 08 '25 20:02 cnqso

It appears to be an issue with the glibc update https://gitlab.archlinux.org/archlinux/packaging/packages/glibc/-/issues/19

If it is that, this might also be related: https://archlinux.org/news/glibc-241-corrupting-discord-installation/

Lightningblade avatar Feb 09 '25 02:02 Lightningblade

Also can confirm, and at least from the glibc thread, does not sound like they are interested in doing anything upstream:

https://sourceware.org/bugzilla/show_bug.cgi?id=32653

note: only have been trying CS Source and it has this issue, too.

bakgwailo avatar Feb 09 '25 03:02 bakgwailo

HL2 and HL:S are now fixed if you opt into the beta branch.

TTimo avatar Feb 12 '25 16:02 TTimo

Latest systemd update broke something and it can't be ran with glibc 2.40 So... Valve, pls fix

Nyvyme avatar Feb 17 '25 10:02 Nyvyme

Can you guys test again if today's update has fixed the affected Source 1 games?

Tiagoquix avatar Feb 18 '25 20:02 Tiagoquix

Different error now for me on CS:S, but it still tries to launch but just dies instantly:

chdir "/mnt/games/SteamLibrary/steams/common/Counter-Strike Source"
ERROR: ld.so: object '/home/<home>/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF c
lass: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/<home>/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF c
lass: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/<home>/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF c
lass: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/<home>/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF c
lass: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/<home>/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF c
lass: ELFCLASS32): ignored.
Game Recording - would start recording game 240, but recording for this game is disabled
Adding process 285538 for gameID 240
Adding process 285539 for gameID 240
Adding process 285540 for gameID 240
pid 285632 != 285628, skipping destruction (fork without exec?)
pid 285637 != 285628, skipping destruction (fork without exec?)
Adding process 285628 for gameID 240
pid 285659 != 285628, skipping destruction (fork without exec?)
SDL video target is 'x11'
SDL video target is 'x11'
AppFramework : Unable to load module vguimatsurface.so!
Unable to load interface VGUI_Surface030 from vguimatsurface.so
Adding process 285658 for gameID 240
Adding process 285660 for gameID 240
Adding process 285661 for gameID 240
Adding process 285662 for gameID 240
Game Recording - game stopped [gameid=240]
Removing process 285662 for gameID 240
Removing process 285661 for gameID 240
Removing process 285660 for gameID 240
Removing process 285658 for gameID 240
Removing process 285628 for gameID 240
Removing process 285540 for gameID 240
Removing process 285539 for gameID 240

bakgwailo avatar Feb 18 '25 21:02 bakgwailo

@bakgwailo using "Legacy runtime 1.0" in "Compatibility" settings fixes the issue.

Nyvyme avatar Feb 18 '25 21:02 Nyvyme

That new issue is probably https://github.com/ValveSoftware/Source-1-Games/issues/7010

Tiagoquix avatar Feb 18 '25 22:02 Tiagoquix

@Nyvyme and @Tiagoquix yup, that was it. Works fine now w/ Legacy Runtime

bakgwailo avatar Feb 19 '25 05:02 bakgwailo

All games appear to launch normally now except for Portal.

OstojaOfficial avatar Feb 22 '25 11:02 OstojaOfficial

~~Both Portal and Portal 2 are affected~~ Only Portal is left to fix

Lassebq avatar Feb 23 '25 14:02 Lassebq

In distributions that ship very recent changes from the glibc 2.41 branch, it will be possible to work around this class of issue in any remaining unfixed games by setting Launch Options to:

GLIBC_TUNABLES=glibc.rtld.execstack=2 %command%

At the time I write this, Arch Linux doesn't seem to have the necessary glibc change yet [edit: it was added later, see https://github.com/ValveSoftware/Source-1-Games/issues/6982#issuecomment-2871965686 ]. This workaround will not be effective until glibc has been updated.

Debian sid since 2.41-7 does have the necessary change, which hopefully means the Debian 13 stable release will also have that workaround available.

smcv avatar Apr 13 '25 23:04 smcv

GLIBC_TUNABLES=glibc.rtld.execstack=2 %command%

Thanks! This also made Slice & Dice work again.

Not a source game, but maybe other people will find this when they search for the issue.

notpentadactyl avatar May 10 '25 12:05 notpentadactyl

At the time I write this, Arch Linux doesn't seem to have the necessary glibc change yet, but will presumably pick it up in a future glibc update.

According to https://repology.org/project/glibc/versions this is now in at least: Arch (and relatives like Artix and Manjaro), Debian 13 prereleases (and relatives like Devuan and Kali), Fedora 42, Gentoo, OpenMandriva, Ubuntu 25.04.

It does not seem to be available in at least PLD Linux and Solus, if I'm reading their change history correctly. For various other distributions, I couldn't tell.

I would suggest that distributions that have updated to glibc 2.41 should pick up this change from upstream git for best results. glibc does not do micro-version bug fix releases (2.41.1), so distributions that want to receive post-release fixes need to monitor the release/2.41/master git branch.

smcv avatar May 12 '25 10:05 smcv

This also made Slice & Dice work again.

Please report this to that game's developer - it's good that GLIBC_TUNABLES=glibc.rtld.execstack=2 is available as a workaround, but it would be better if individual games were fixed to not need workarounds (like Valve has done for everything mentioned in this issue, except for Portal 1 which is not fixed yet). Ideally they should recompile with -Wl,-z,noexecstack as described in https://github.com/ValveSoftware/Source-1-Games/issues/6978#issuecomment-2633738175.

smcv avatar May 12 '25 10:05 smcv

This also made Slice & Dice work again.

Please report this to that game's developer - it's good that GLIBC_TUNABLES=glibc.rtld.execstack=2 is available as a workaround, but it would be better if individual games were fixed to not need workarounds (like Valve has done for everything mentioned in this issue, except for Portal 1 which is not fixed yet). Ideally they should recompile with -Wl,-z,noexecstack as described in #6978 (comment).

They did. They updated Portal 1 to 20th anniversary branch which fixed this issue but it caused crashes and some other issues that they had to revert the changes.

OstojaOfficial avatar May 17 '25 22:05 OstojaOfficial

For Portal 1, this seems to have been fixed in the 2025-05-28 update, https://store.steampowered.com/news/app/400?updates=true&emclan=103582791430075523&emgid=520840848816997084. As per https://github.com/ValveSoftware/Source-1-Games/issues/6982#issuecomment-2676164791 I think that was the last remaining Valve game that was known to need fixing? If so, this can now be closed.

If non-Valve games are affected by a similar issue, please report it to the other game's developers, not here - Valve does not control other developers' games (even if they are using the Source Engine too).

For users, https://github.com/ValveSoftware/Source-1-Games/issues/6982#issuecomment-2800172077 is a workaround that should work in many cases.

For game developers, https://github.com/ValveSoftware/Source-1-Games/issues/6978#issuecomment-2633738175 outlines how to fix this "properly". Editing engine.so with execstack -c might work as a stopgap solution in some cases.

smcv avatar Jun 05 '25 14:06 smcv

Closing per the last comment.

kisak-valve avatar Jul 26 '25 11:07 kisak-valve