Dying Light Crashes in Fedora 23

Resolution Up Front:

$ wget http://mirrors.kernel.org/ubuntu/pool/main/c/curl/libcurl3-gnutls_7.35.0-1ubuntu2.5_amd64.deb http://mirrors.kernel.org/ubuntu/pool/main/c/curl/libcurl3-gnutls_7.35.0-1ubuntu2.5_i386.deb ./
$ mkdir amd64 && mv libcurl3-gnutls_7.35.0-1ubuntu2.5_amd64.deb amd64/
$ mkdir i386 && mv libcurl3-gnutls_7.35.0-1ubuntu2.5_i386.deb i386/

$ cd amd64
$ ar vx libcurl3-gnutls_7.35.0-1ubuntu2.5_amd64.deb
$ tar Jxvf data.tar.xz
$ cp usr/lib/x86_64-linux-gnu/libcurl3-gnutls.so.4.3.0 ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/

$ cd ../i386
$ ar vx libcurl3-gnutls_7.35.0-1ubuntu2.5_i386.deb
$ tar Jxvf data.tar.xz
$ cp usr/lib/i386-linux-gnu/libcurl3-gnutls.so.4.3.0 ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/

$ cd ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/
$ ln -fsT libcurl3-gnutls.so.4.3.0 libcurl-gnutls.so.4

$ cd ../../../../i386/usr/lib/i386-linux-gnu/
$ ln -fsT libcurl3-gnutls.so.4.3.0 libcurl-gnutls.so.4

If you’re experiencing the same problem I was, that should be all you need to do.

Problem Description:

When running Dying Light on GNU/Linux platforms, some users have experienced crashes wherein the game simply and immediately exits back to the user’s Desktop Environment without warning or overt declaration of error.  If the application’s crash logs are scrutinized (../steam/steamapps/common/Dying Light/DW/out/logs/crash_*), it is made apparent that the Steam Runtime file “libcurl-gnutls.so.4” is at fault.

The ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 file (which is actually a symlink pointing to libcurl3-gnutls.so.4.2.0 in that same directory location) seems to be of a version not expected by the Dying Light development staff.  It looks like, perhaps, the application was coded with the expectation that libcurl3-gnutls.so.4.3.0, and not version 4.2.0, would be available for use.

Resolving the issue, therefore, is a simple matter of replacing that file with the later version.  Since (in general theory) minor versions should retain backwards compatibility within major versions, we shouldn’t have anything to worry about regarding the use of this file by other Steam applications, but if we run into trouble, we can always change the symlink for Dying Light and then change it back for other games.

Discussion:

So, I’m just going to go out on a limb and say it: I think it’s something of a moral obligation that those of us who make use of free and open source technology game on the platform when able.  =)  I mean, seriously though, Valve is supporting FOSS in a big way and we should give them some stats indicating that we appreciate it.  Unfortunately, FOSS is still too difficult for non-IT-professionals to use in many cases, so it looks like we’re only hitting about 1% Linux use in the Steam userbase, but we should do what we can.  And if gaming for a good cause is what must be done, then so be it.

So in line with that, I recently purchased (during the ridiculously awesome Steam Winter Sale – Civ V with all DLC to-date for $12?  Dying Light four-pack for $66?  Mmmm) Dying Light and, to my great delight, it ran smoothly and beautifully in Fedora 23 with my NVidia GTX 960 (and that’s in a PCI-pass-through arrangement in a guest domain!  w00t.).

Unfortunately, it seems sometime between 20 and 60 minutes of play, my game crashes to the desktop immediately, as though I had never been running the game at all.  I am left looking at my Steam Library as though I were about to launch the game, and all that I had played had been a dream..

I begrudgingly Googled the problem, hoping it wouldn’t be too hard to solve, but fearing the worst, and lo and behold, a few people have come across what seems to be the same thing.  Much more to my surprise and delight, the Dying Light team has written software that actually dumps useful crash logs in plain text!  I quickly located the two crash files from my sessions:

$ ll ../steam/steamapps/common/Dying\ Light/DW/out/logs/
total 56
-rw-rw-r--. 1 user user 25281 Jan  2 00:05 crash_20160101_234441500.log
-rw-rw-r--. 1 user user 26233 Jan  2 00:08 crash_20160102_000544052.log

The hypotheses in the link above regarding the network card being the culprit seem strange, but unfortunately they seem to be supported, if not confirmed, by the log output:

{00:02:38.395} INFO: [INFO] > >>>>> <1634684404> Performing save - mode <FromQuests>
{00:05:22.095} INFO: [INFO] > Caught signal 6 (Aborted).
{00:05:22.096} INFO: [INFO] > /lib64/libc.so.6(+0x34b20) [0x7f6e16c03b20]
{00:05:22.096} INFO: [INFO] | /lib64/libc.so.6(gsignal+0x38) [0x7f6e16c03a98]
{00:05:22.096} INFO: [INFO] | /lib64/libc.so.6(abort+0x16a) [0x7f6e16c0569a]
{00:05:22.096} INFO: [INFO] | /lib64/libc.so.6(+0x77e3a) [0x7f6e16c46e3a]
{00:05:22.096} INFO: [INFO] | /lib64/libc.so.6(__fortify_fail+0x37) [0x7f6e16ce3627]
{00:05:22.096} INFO: [INFO] | /lib64/libc.so.6(+0x11454d) [0x7f6e16ce354d]
{00:05:22.096} INFO: [INFO] | /lib64/libc.so.6(__longjmp_chk+0x29) [0x7f6e16ce34a9]
{00:05:22.096} INFO: [INFO] | /home/user/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4(+0xca45) [0x7f6e17c20a45]
{00:05:22.096} INFO: [INFO] | /lib64/libpthread.so.0(+0x109f0) [0x7f6e18fb09f0]
{00:05:22.096} INFO: [INFO] | /lib64/libc.so.6(syscall+0x19) [0x7f6e16ccbc69]
{00:05:22.096} INFO: [INFO] | /lib64/libGL.so.1(+0xa4d25) [0x7f6e1838ed25]

The second crash log showed the same signal 6 incident and cited libcurl-gnutls.so.4.

So props to the Dying Light development team for that, but now one must wonder how one might game with friends if restricted in this manner…  Or if one relies on any network services such as NFS or somesuch..

Unfortunately for me, simply putting Steam in Offline Mode doesn’t do the trick.  I still receive libcurl-gnutls errors.  I attempted to terminate support for Steam Cloud Sync, thinking perhaps that was what was calling the libcurl-gnutls library (even in Offline Mode?), but that didn’t work either.

Update [1/2/2016]:

I found this post in a discussion where one mblackwell seems to confidently indicate that manually updating the libcurl3-gnutls.4.2.0.so file to libcurl3-gnutls.4.3.0.so resolved the problem for him.  The users describe the same symptoms and note the same log evidence that this file is to blame, so this seems completely reasonable.  It should be safe to attempt (I’ll just preserve the current file so I can easily revert if there’s an issue), but the difficult part is in acquiring the needed file for use in a Fedora 23 operating system.

Fedora repositories don’t provide any package with a file of that name:

$ sudo dnf provides "*libcurl3-gnutls*"
Last metadata expiration check performed 2:17:15 ago on Sat Jan  2 20:22:35 2016.
Error: No Matches found

Granted, that’s not a very thorough search, and if someone would like to demonstrate a more thorough search (maybe e.g. using known conventions for changing names in equivalent files across distributions, or perhaps with knowledge of the libcurl package and its structure) I’d love to see it.

Anyway, that means we need to download the relevant package from a respectable repository.  Ubuntu publishes its packages online clearly, and we know from Steam’s official Linux Distribution Support policy that we should target Ubuntu version 12.04.  However, the solution comes from a user running Ubuntu 14.04, so we’ll need to head there to get the package.  We’ll need both the 32 bit and 64 bit packages, I’m guessing, because the steam_runtime libraries include both and I doubt we’d want to leave a version discrepancy like that lying around, though the crash logs on my machine do consistently indicate the x86_64 version of the package as the cause of the problem.

Now we need to extract the file we need from its .deb package format.  To do this, we can use the ar utility from binutils (which is installed on Fedora 23 by default, so one need not install it as bodhi.zazen had to all those years ago, but credit to him for the idea).  We’ll then copy the files into the relevant directories (or maybe just the i386-linux-gnu location if you’re running a 32 bit OS).  Finally, we’ll modify the final symbolic link in the link chain pointing to the old version of the file to point to the new version.  Ultimately, that modification will be all we need to commit or reverse to enable or disable our patch attempt.  It should be simple and safe to try.

Update [1/3/2016]:

It seems the patch works!  I played for 90 minutes without a crash, whereas the previous 90 minutes included 6 crashes.  Woo hoo!  Thanks Interwebs!  I hope others meeting a similar fate find their way here.

Advertisements
This entry was posted in Gaming, Information Technology and tagged , , , . Bookmark the permalink.

3 Responses to Dying Light Crashes in Fedora 23

  1. Nice. Solved my problem. Thank you so much! you have news about the multiplayer in linux?

    • Interesting; does multiplayer not work in Dying Light for GNU/Linux platforms? I never tried, to be honest. I haven’t played the game at all in a while..

      • thanks for the reply brief. And to answer your question, yes. The game never worked in cooperative mode. Only on Linux. There were several game updates citing improvements in coop but unfortunately it was never resolved. If any windows user access my play session, it works. If I try to access the session from someone who is running the game on Windows or Linux does not connect. This problem is old and already runs various forums, both steam as the Techland. We’re almost at the end of 2016 and I no longer hope to solve this. Many requests for money back was required due to this problem.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s