protonscr

Remote play together: client crashes after 20 minutes playing

steamopen AMD driversStreaming
ValveSoftware/steam-for-linux#6765 · opened 2019-12-14 by ricargoes · updated 2021-01-31 · 9 comments · github
Rricargoes 2019-12-14 github

Your system information

  • Steam client version (build number or date): 6 Dec 2019
  • Distribution (e.g. Ubuntu): Manjaro
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

Everytime I play games using Remote Play Together as a client, the game crashes after 20 minutes or so. Steam says 'The streaming client exited unexpectedly (2)'. According to this guide from Valve I should be able to find a log at /tmp/streaming_client.log but I have never been able to see such a file. However I have found useful information at /tmp/dumps/<user>_stdout.log:

At the beginning of the playing session/streaming I can find:

ffmpeg verbose: Opened VA display via X11 display :0.                
ffmpeg verbose: Initialised VAAPI connection: version 1.5                                                
ffmpeg verbose: Unknown driver "Mesa Gallium driver 19.2.7 for AMD NAVI10 (DRM 3.35.0, 5.4.2-1-MANJARO, LLVM 9.0.0)", assuming standard behaviour.
VAAPI hardware decoding
ffmpeg verbose: Reinit context to 1920x1088, pix_fmt: vaapi_vld

and everything works perfectly, I play for around 22 minutes (it is always about the same length) and then the screen goes to black and after some time the game crashes (sometimes I can still hear the music and control the character for a while). The host keeps working normally with one less player. The log says:

SDR connection: Ping 5ms IN: 1797.4kb/s 1725.6 pkts/s qual 100.0%   OUT: 8.1kb/s 116.2 pkts/s qual 100.0%
SDR connection: Ping 4ms IN: 1799.5kb/s 1746.8 pkts/s qual 100.0%   OUT: 9.6kb/s 132.7 pkts/s qual 100.0%
SDR connection: Ping 5ms IN: 1392.3kb/s 1351.2 pkts/s qual 100.0%   OUT: 4.5kb/s 77.6 pkts/s qual 100.0%
SDR connection: Ping 4ms IN: 1413.8kb/s 1372.9 pkts/s qual 100.0%   OUT: 5.1kb/s 82.3 pkts/s qual 100.0%
ffmpeg error: Failed to create slice data buffer (size 6699): 2 (resource allocation failed).
ffmpeg error: Failed to create slice parameter buffer: 2 (resource allocation failed).
ffmpeg error: Failed to create slice parameter buffer: 2 (resource allocation failed).
ffmpeg error: Failed to create slice parameter buffer: 2 (resource allocation failed).

it keeps like this for a whiles till:

ffmpeg error: Failed to create slice parameter buffer: 2 (resource allocation failed).
ffmpeg error: Failed to create slice paterminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
OnFocusWindowChanged to window type: k_nGameIDControllerConfigs_Desktop, AppID 413080

The host is also playing in Manjaro and we have seen this behavior in Wizard of Legend and Towerfall. Interestingly, when playing Towerfall 3 people: the host, a Manjaro client and a Windows client; only the linux one ended up crashing.

My specs:
CPU: AMD Ryzen 3600
GPU: AMD Radeon RX 5700

Manjaro linux up to date (14 Dec 2019)
Kernel: Linux 5.4
Mesa 19.2

Steps for reproducing this issue:

  1. Start a session of Wizard of legend with Remote Play Together as a client
  2. Play for around 20 minutes till it crashes
Aandrew-wja 2020-01-26 github

It looks like this is either a memory leak in libffmpeg or a memory leak in libva:

https://www.ffmpeg.org/doxygen/3.3/vaapi__decode_8c_source.html lines 100-112

AAlexithymia2014 2020-02-04 github

I am also running into this issue, perhaps we could file a bug report with ffmpeg?

JJames-C-000 2020-06-04 github

My only Nvidia card is in a windows machine so I am unable to test Nvidia drivers, but this crash does not occur while using intel drivers.

Nnforro 2020-09-29 github

I'm hitting this issue on two Arch Linux systems.

Here is one of the leaks reported by valgrind (the backtrace is always the same):

7,421,240 (386,368 direct, 7,034,872 indirect) bytes in 6,037 blocks are definitely lost in loss record 3,154 of 3,156
   at 0x483A595: calloc (vg_replace_malloc.c:760)
   by 0x44102EBD: vlVaCreateBuffer (buffer.c:49)
   by 0x584266C: vaCreateBuffer (va.c:1367)
   by 0x4D39C5D: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/libavcodec.so.57)
   by 0x4D3B13C: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/libavcodec.so.57)
   by 0x4C1EE70: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/libavcodec.so.57)
   by 0x4B9025D: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/libavcodec.so.57)
   by 0x4B90E36: avcodec_send_packet (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/libavcodec.so.57)
   by 0x37C9B9: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/streaming_client)
   by 0x3801E4: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/streaming_client)
   by 0x3394D7: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/streaming_client)
   by 0x339555: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/streaming_client)

I compiled ffmpeg 3.4.2 and everything works like a charm, no leaks, so it seems the issue has already been fixed upstream.

I wonder, is there a source code for the ffmpeg libraries shipped with Steam?

AAlexithymia2014 2020-09-29 github

How would I do this on my system? Just install ffmpeg or overwrite the
libraries in steam?

On Tue, Sep 29, 2020, 1:16 PM Nikola Forró [email protected] wrote:

I'm hitting this issue on two Arch Linux systems.

Here is one of the leaks reported by valgrind (the backtrace is always the
same):

7,421,240 (386,368 direct, 7,034,872 indirect) bytes in 6,037 blocks are definitely lost in loss record 3,154 of 3,156
at 0x483A595: calloc (vg_replace_malloc.c:760)
by 0x44102EBD: vlVaCreateBuffer (buffer.c:49)
by 0x584266C: vaCreateBuffer (va.c:1367)
by 0x4D39C5D: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/libavcodec.so.57)
by 0x4D3B13C: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/libavcodec.so.57)
by 0x4C1EE70: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/libavcodec.so.57)
by 0x4B9025D: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/libavcodec.so.57)
by 0x4B90E36: avcodec_send_packet (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/libavcodec.so.57)
by 0x37C9B9: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/streaming_client)
by 0x3801E4: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/streaming_client)
by 0x3394D7: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/streaming_client)
by 0x339555: ??? (in /home/turbotraktor/.local/share/Steam/ubuntu12_32/streaming_client)

I compiled ffmpeg 3.4.2 and everything works like a charm, no leaks, so it
seems the issue has already been fixed upstream.

I wonder, is there a source code for the ffmpeg libraries shipped with
Steam?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ValveSoftware/steam-for-linux/issues/6765#issuecomment-700857742,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH52BU46YKWE3CFXAUZLCITSIII7HANCNFSM4J2XQWWA
.

Nnforro 2020-09-29 github

How would I do this on my system? Just install ffmpeg or overwrite the libraries in steam?

I cross-compiled ffmpeg 3.4.2 (you need 32-bit build, and you need version 3.X), installed it in /usr/lib32 and deleted the libraries shipped with Steam. But beware that Steam detects they are missing and puts them back on every launch.

AAlexithymia2014 2020-09-29 github

Hmmm alright. A symlink might work or maybe running the native version
could work. Thank you! Sounds like steam needs to update its runtime ffmpeg
libraries.

On Tue, Sep 29, 2020, 1:41 PM Nikola Forró [email protected] wrote:

How would I do this on my system? Just install ffmpeg or overwrite the
libraries in steam?

I cross-compiled ffmpeg 3.4.2 (you need 32-bit build, and you need version
3.X), installed it in /usr/lib32 and deleted the libraries shipped with
Steam. But beware that Steam detects they are missing and puts them back on
every launch.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ValveSoftware/steam-for-linux/issues/6765#issuecomment-700872309,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH52BU64Y2X3QFFHVFOFAR3SIIL4NANCNFSM4J2XQWWA
.

AAlexithymia2014 2020-09-30 github

So on my Fedora system (cause I blew up my Arch system sadly), I installed ffmpeg-libs from RPMFusion for both i686 and x86_64 and deleted libavcodec57.so from both steam ubuntu lib folders. Seems great so far using the native ffmpeg-libs. @kisak-valve Is it possible to request that Valve updates the ffmpeg-libs that are bundled to a newer version? This would easily fix the hardware decoding leak for users using AMD. Also noticed vaapi doesn't work on Wayland but that's a separate issue.

Rrmb938 2021-01-31 github

I am also having this problem. Seems like rpmfusion no longer has ffmpeg 3.x, only 4.x which no longer provides libavcodec.so.57, it has been updated to libavcodec.so.58.

A lot of packages now require 4.x so 3.x cannot be installed.