protonscr

Steam crashes after suspend (NM related)

steamclosed reviewed
ValveSoftware/steam-for-linux#4042 · opened 2015-09-28 by pernatiy · updated 2020-01-27 · 16 comments · github
Ppernatiy 2015-09-28 github

I have steam client running on my laptop. Sometimes, after suspend (and network change), steam crashed. Looks like this happens between system resume and NM establish actual connection. Here are steam log:

(steam:16146): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `NMRemoteSettings'

(steam:16146): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion `instance != NULL && instance->g_class != NULL' failed

(steam:16146): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion `instance != NULL && instance->g_class != NULL' failed
assert_20150926223701_1.dmp[27452]: Uploading dump (out-of-process)
/tmp/dumps/assert_20150926223701_1.dmp
./steam.sh: line 756: 16146 Segmentation fault      $STEAM_DEBUGGER "$STEAMROOT/$STEAMEXEPATH" "$@"
assert_20150926223701_1.dmp[27452]: Finished uploading minidump (out-of-process): success = no
assert_20150926223701_1.dmp[27452]: error: Couldn't resolve host name
assert_20150926223701_1.dmp[27452]: file ''/tmp/dumps/assert_20150926223701_1.dmp'', upload no: ''Couldn't resolve host name''
[0928/160916:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 1, remote ID 1)
[0928/160916:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 2147483648, remote ID 2)

Relative kernel log:

Sep 28 16:09:15 isis kernel: [210512.552125] PM: resume of devices complete after 802.298 msecs
Sep 28 16:09:15 isis kernel: [210512.552499] PM: Finishing wakeup.
Sep 28 16:09:15 isis kernel: [210512.552500] Restarting tasks ... 
...
Sep 28 16:09:15 isis kernel: [210513.086085] e1000e: enp0s25 NIC Link is Down
Sep 28 16:09:15 isis kernel: [210513.089031] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
Sep 28 16:09:15 isis kernel: [210513.089201] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
Sep 28 16:09:15 isis kernel: [210513.095642] iwlwifi 0000:03:00.0: Radio type=0x1-0x2-0x0
Sep 28 16:09:16 isis kernel: [210513.362489] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
Sep 28 16:09:16 isis kernel: [210513.368942] iwlwifi 0000:03:00.0: Radio type=0x1-0x2-0x0
Sep 28 16:09:16 isis kernel: [210513.445126] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
Sep 28 16:09:16 isis kernel: [210513.447259] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
Sep 28 16:09:16 isis kernel: [210513.672130] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
Sep 28 16:09:16 isis kernel: [210513.698348] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
Sep 28 16:09:16 isis kernel: [210513.883947] CIPCServer::Thr[16170]: segfault at 1c ip 00000000f04d9366 sp 00000000eebf9b00 error 4 in libnm-glib.so.4.3.0[f04b9000+36000]
Sep 28 16:09:19 isis kernel: [210516.997398] wlp3s0: authenticate with 68:86:a7:53:0c:4c
Sep 28 16:09:19 isis kernel: [210516.999972] wlp3s0: send auth to 68:86:a7:53:0c:4c (try 1/3)
Sep 28 16:09:19 isis kernel: [210517.097411] wlp3s0: authenticated
Sep 28 16:09:19 isis kernel: [210517.097997] wlp3s0: associate with 68:86:a7:53:0c:4c (try 1/3)
Sep 28 16:09:19 isis kernel: [210517.100096] wlp3s0: RX AssocResp from 68:86:a7:53:0c:4c (capab=0x11 status=0 aid=7)
Sep 28 16:09:19 isis kernel: [210517.118699] wlp3s0: associated
Sep 28 16:09:19 isis kernel: [210517.118721] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready

On my system (which happen to be Gentoo) installed networkmanager 1.0.6, which provide /usr/lib64/libnm-glib.so.4.9.0. The only libnm-glib.so.4.3.0 found in steam runtime directory:

~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/libnm-glib.so.4.3.0
~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/libnm-glib.so.4.3.0
Ggdrewb-valve maintainer 2015-10-12 github

Likely a duplicate of other suspend / resume issues.

OOxalin 2015-12-09 github

Mostly. Still the same issue where NMRemoteSettings has been removed from newer NetworkManager versions:
"NMRemoteSettings no longer exists; its API has been merged into NMClient (along with the addition of a connections property and associated signals, and a few other small changes)."
https://wiki.gnome.org/Projects/NetworkManager/libnm

Workaround on ArchLinux: add alucryd-multilib and install the lib32-libnm-glib46 package. This could be an option for other distribution. For Gentoo, there may be a 0.9.8 NetworkManager package available in a portage overlay, but I'm not sure how to do it.

Ddsboger-zz 2016-02-14 github

Hello, I'm on ArchLinux, but installing alucryd-multilib/lib32-libnm-glib46 did not solve the problem. Is there any other possible workaround?

OOxalin 2016-02-14 github

@dsboger: Do you have any log to help us figure out what is going on? Launch Steam from a terminal.

Ddsboger-zz 2016-02-15 github

Steam output:
steam_output.txt
Also here: http://pastebin.com/VLTW5HWk

Core dump:
crash_20160214193351_1.dmp.zip

Hope it helps. Please, let me know if I can provide any more info.

OOxalin 2016-02-15 github

From your log, you do have a problem coming from NetworkManager lib. Also, you are running with Steam's runtime libraries.

Could you tell me if you have any other libnm package installed beyond lib32-libnm-glib46 (should be 0.9.8...) and libnm-glib (1.0...)? Also, which window manager are you using?

Finally, could you try what is under Using native runtime to see if things can be run with native libs: https://wiki.archlinux.org/index.php/steam#Using_native_runtime

If you do want to run with Steam's runtime libraries instead of native, you could rename libnm libs provided by Steam's runtime libs so they are not found and Steam turns to the native versions. But first thing first, let's try the other solution first.

Ddsboger-zz 2016-02-16 github

Versions: lib32-libnm-glib46 0.9.8.10-1, libnm-glib 1.0.10-2

I've installed alucryd-multilib/steam-libs (the whole set of libraries) and run steam from the terminal with STEAM_RUNTIME=0 steam. Got the same outcome, I think. Logs and core dump attached below.

Steam output:
steam_output.txt

Core dump:
crash_20160215214556_1.dmp.zip

OOxalin 2016-02-16 github

@dsboger: you are using AntergOS, which is an ArchLinux derivative with Cinnamon on top (unless you chose otherwise).

Your log seems to indicate that you were able to launch (at least tried to) "Heroes of a Broken Land", which suggests that Steam was running, isn't it? You tried twice before closing Steam (or before it crashed).

On the other hand, your previous log didn't have any information about a game that you would have tried to launch, am I right?

So, is Steam displaying, is it crashing right at start or is it crashing after a suspend/resume cycle as described in the original bug?

Ddsboger-zz 2016-02-16 github

I'm using GNOME Shell, actually, forgot to mention before (nowadays, Antergos allows you to choose the DE through the installer).

It is crashing as described in the bug (sorry, I thought it was implied): Steam opens, store and library work, games launch properly and run fine. Only problem is when I suspend the laptop: sometimes, on resume Steam is nowhere to be found. The behavior seems to be the same regardless of having or not a game running (and when Steam crashes, game goes down also [edit: not the case of the logs attached above, Steam crashed alone]).

OOxalin 2016-02-16 github

@pernatiy: are you still experiencing this bug?

I would be tempted to think that the problem arises from the fact that there is no more connection available on resume. This would be consistent with NetworkManager specs (https://developer.gnome.org/NetworkManager/unstable/spec.html): NM_DEVICE_TYPE_GENERIC = 14. What I don't know however is whether it is a problem on how Steam manages that case or on how GLib object system (GObject) does it.

Debugging the following (on Valve part @gdrewb-valve) could help, since there is an assertion on which Steam stops.
(steam:1946): GLib-GObject-WARNING *: invalid unclassed pointer in cast to 'NMRemoteSettings'
(steam:1946): GLib-GObject-CRITICAL *
: g_type_instance_get_private: assertion 'instance != NULL && instance->g_class != NULL' failed
(steam:1946): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion 'instance != NULL && instance->g_class != NULL' failed

"Instance" or its member "g_class" must be set to "NULL" on resume when hitting "GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'NMRemoteSettings'", probably if the connection is checked BEFORE the network link was reestablished completely. Maybe an assert is overkilled in this area of the code.

Both of you (@pernatiy and @dsboger) are using laptops. Since wifi connections are longer to reestablished than wired connections, this could all be related.

I also have a wifi card at home, but I'm unable to test it because it doesn't support "suspend/resume".

Ppernatiy 2016-02-19 github

2016-02-16 21:14 GMT+02:00 Alexandre Demers [email protected]:

@pernatiy https://github.com/pernatiy: are you still experiencing this
bug?

Yes. Can't check right now if it will happen with STEAM_RUNTIME=0, may be
later on this week.

I would be tempted to think that the problem arises from the fact that
there is no more connection available on resume. This would be consistent
with NetworkManager specs (
https://developer.gnome.org/NetworkManager/unstable/spec.html):
NM_DEVICE_TYPE_GENERIC = 14. What I don't know however is whether it is a
problem on how Steam manages that case or on how GLib object system
(GObject) does it.

Debugging the following (on Valve part @gdrewb-valve
https://github.com/gdrewb-valve) could help, since there is an
assertion on which Steam stops.
(steam:1946): GLib-GObject-WARNING *
: invalid unclassed pointer in cast to 'NMRemoteSettings' (steam:1946):
GLib-GObject-CRITICAL *
: g_type_instance_get_private: assertion
'instance != NULL && instance->g_class != NULL' failed
(steam:1946): GLib-GObject-CRITICAL **: g_type_instance_get_private:
assertion 'instance != NULL && instance->g_class != NULL' failed

"Instance" or its member "g_class" must be set to "NULL" on resume when
hitting "GLib-GObject-WARNING **: invalid unclassed pointer in cast to
'NMRemoteSettings'", probably if the connection is checked BEFORE the
network link was reestablished completely. Maybe an assert is overkilled in
this area of the code.

Both of you (@pernatiy https://github.com/pernatiy and @dsboger
https://github.com/dsboger) are using laptops. Since wifi connections
are longer to reestablished than wired connections, this could all be
related.

This is for sure related. At time, when I fill this bug, I made a lot of
suspend/resume cycles on same system, but on wire. With constant, non-dhcp,
address I can't reproduce issue at all. With dhcp address it can happen,
but very rare. And always happen when dhcp server delay answer so long,
that after resume I can see nm icon showing "establishing" status.

I also have a wifi card at home, but I'm unable to test it because it
doesn't support "suspend/resume".


Reply to this email directly or view it on GitHub
https://github.com/ValveSoftware/steam-for-linux/issues/4042#issuecomment-184836578
.

Denis Sokolovsky

Ppernatiy 2016-03-26 github

After about week of testing I saw same crash when steam client use bundled runtime. But it works pretty stable with STEAM_RUNTIME=0. I made few connection scenarios in different environments and steam client still alive.

Kkisak-valve maintainer 2019-01-04 github

Hello, is anyone still experiencing this issue on an up to date system?

Ppernatiy 2019-01-06 github

Hello, is anyone still experiencing this issue on an up to date system?

Didn't move my linux laptop for a while. Also, I use steam, from 2016, only with external libraries, so can't comment on this.

Kkisak-valve maintainer 2019-02-08 github

Closing pending feedback.