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

Segmentation Fault When Disabling Runtime #3863

Closed
shoober420 opened this issue May 29, 2015 · 11 comments

Comments

Projects
None yet
6 participants
@shoober420
Copy link

commented May 29, 2015

After I log into Steam with the "STEAM_RUNTIME=0 steam" command, right before the Steam window pops up, it crashes and I get errors about a segmentation fault. Steam will load up when executed, but crashes after I log in. These are the error strings from my terminal.

FontManager.cpp (276) : Assertion Failed: descs.Count() >= 1

Running Steam on arch 64-bit
STEAM_RUNTIME is disabled by the user
/home/*****/.local/share/Steam/steam.sh: line 756: 1309 Segmentation fault (core dumped) $STEAM_DEBUGGER "$STEAMROOT/$STEAMEXEPATH" "$@"

I have the steam-libs package installed from the alucryd-multilib repository in Arch Linux, so all the required packages are present on my system. I also ran the following command in the ubuntu12_32 directory, just to make sure I have all the dependencies installed. It returns nothing, meaning they are all installed.

LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" ldd $(file |sed '/ELF/!d;s/:.//g')|grep 'not found'|sort|uniq

Steam will run fine with the runtime, but crashes at log in if I disable the runtime.

My specs are in my Steam profile, which is linked in my Github profile.

@shoober420 shoober420 changed the title Segmentation Fault When Disabling Runtime FontManager.cpp (276) Assertion Failed and Segmentation Fault When Disabling Runtime May 30, 2015

@shoober420

This comment has been minimized.

Copy link
Author

commented Jun 7, 2015

I recently removed the nvidia proprietary drivers, and installed the nouveau drivers. To my amazement, Steam started up perfectly fine with the nouveau drivers and STEAM_RUNTIME=0. So this must be an issue with the proprietary drivers.

@shoober420

This comment has been minimized.

Copy link
Author

commented Jun 14, 2015

I found out what was causing the issue. It was 2 packages, libgudev and libusb. For some reason, I had to put these two packages from the steam-runtime directory, into the usr/lib32 directory. Once I did this,steam started normally without the runtime enabled.

@shoober420

This comment has been minimized.

Copy link
Author

commented Jun 22, 2015

I also should note that I had these packages already installed.

@adam900710

This comment has been minimized.

Copy link

commented Dec 18, 2015

The workaround seems not work.
Copied these files but still segfault.

@Tele42

This comment has been minimized.

Copy link

commented Dec 18, 2015

For what it's worth, I have had that FontManager.cpp assert for a relatively long time, and steam appears to run fine here on gentoo. There is a fairly good chance there is another silent issue going on being masked by this assert.

@LeonardKoenig

This comment has been minimized.

Copy link

commented Mar 31, 2016

I'm pretty sure I found what's the reason here, at least it solved it for me:

The issue comes from steam both loading the libudev0 and libudev libraries. The way it's run normally (ie. with STEAM_RUNTIME=1) everything's ok since all calls of libudev0 and libudev are not mangled.

However, if you disable the runtime, it seems that libudev0 will be loaded before libudev and thus intercepting some calls from libudev "to itself".
To be more precise:
udev_device_get_parent_with_subsystem_devtype () from /usr/lib32/libudev.so.1 calls
udev_device_get_parent () from /usr/lib32/libudev.so.0 and not its own (which is what happens with STEAM_RUNTIME=1).

And this basically results in a segfault when libudev0 wants to use strlen() on a NULL pointer in a function called util_strpcpy().

The solution:

Use LD_PRELOAD=/usr/lib32/libudev.so.1 STEAM_RUNTIME=0 steam.

@Tele42

This comment has been minimized.

@shoober420

This comment has been minimized.

Copy link
Author

commented Jun 13, 2016

Ever since I've used the "LD_PRELOAD=/usr/lib32/libudev.so.1" command line parameter, Valve games will not launch. I'm going to try and figure out why, all the other games launch fine.

@shoober420

This comment has been minimized.

Copy link
Author

commented Jun 13, 2016

I got DOTA 2 to launch successfully. I needed to download the libudev0 legacy package from the Arch AUR (I'm on Arch Linux). I also can launch GoldSrc games now. I had to set the command line parameter to "LD_PRELOAD=/usr/lib32/libudev.so.0" instead of using "libudev.so.1". Is there any particular reason I wouldn't want to preload libudev.so.0 and preload libudev.so.1 instead?

@shoober420 shoober420 changed the title FontManager.cpp (276) Assertion Failed and Segmentation Fault When Disabling Runtime Segmentation Fault When Disabling Runtime Jun 13, 2016

@shoober420

This comment has been minimized.

Copy link
Author

commented Jun 20, 2016

Today I have removed the legacy libudev0 package and installed a package that simply symlinks instead. I now can start Steam without having to change libudev.so.1 to libudev.so.0 everytime I want to play a GoldSrc game. Dota 2 also starts fine without having to install the libudev0 legacy package. The symlinks work just fine. I'm on Arch Linux by the way, and the packages I used were "lib32-libudev.so.0" and "libudev.so.0" from the Arch AUR.

@shoober420

This comment has been minimized.

Copy link
Author

commented Jan 12, 2017

I've been using the "libudev0-shim" package for a while now on Arch, and everything is working. I'm closing this.

@shoober420 shoober420 closed this Jan 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.