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

Segfault when connecting from an android moonlight client on Arch Linux when compiled with avx512 support #2543

Open
3 tasks done
spleen-in-a-bean opened this issue May 19, 2024 · 5 comments

Comments

@spleen-in-a-bean
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the nightly release?

  • This issue is present in the nightly release

Describe the Bug

When connecting from an android moonlight client over LAN, sunshine segfaults before any video output can occur if it is compiled with avx512f support. The same does not occur if joining from another (linux) desktop moonlight client, or if moonlight is compiled without avx512f support.
STR:

  1. add -mavx512f to the c and cxx compiler flags (CMAKE_C_FLAGS and CMAKE_CXX_FLAGS) options in cmake
  2. setup sunshine
  3. (attempt to) join from an android moonlight client
  4. segfault

Expected Behavior

Moonlight should connect normally, and the application should be displayed.

Additional Context

Looking at the backtrace of the coredump in GDB suggests the problem is in nanors. However, setting the forward error correction percentage to 0 doesn't solve the problem.

Host Operating System

Linux

Operating System Version

Arch Linux

Architecture

64 bit

Sunshine commit or version

373390e

Package

Linux - AUR (Third Party)

GPU Type

Intel

GPU Model

Intel Tigerlake (Gen12)

GPU Driver/Mesa Version

24.0.7

Capture Method (Linux Only)

wlroots

Config

upnp = enabled
lan_encryption_mode = 1
origin_web_ui_allowed = pc
channels = 3
capture = wlr
address_family = both
encoder = vaapi

Apps

No response

Relevant log output

[encoder] -- [vaapi ]
[address_family] -- [both]
[capture] -- [wlr]
[channels] -- [3]
[origin_web_ui_allowed] -- [pc]
[lan_encryption_mode] -- [1]
[upnp] -- [enabled]
[2024:05:19:15:11:13]: Info: Sunshine version: 0.23.1.dirty
[2024:05:19:15:11:13]: Info: Found display [wayland-1]
[2024:05:19:15:11:13]: Info: Found interface: zxdg_output_manager_v1(7) version 3
[2024:05:19:15:11:13]: Info: Found interface: zwlr_export_dmabuf_manager_v1(26) version 1
[2024:05:19:15:11:13]: Info: Found interface: wl_output(48) version 4
[2024:05:19:15:11:13]: Info: Resolution: 2256x1504
[2024:05:19:15:11:13]: Info: Name: eDP-1
[2024:05:19:15:11:13]: Info: Found monitor: BOE 0x095F (eDP-1)
[2024:05:19:15:11:13]: Info: Offset: 1920x0
[2024:05:19:15:11:13]: Info: Logical size: 1128x752
[2024:05:19:15:11:13]: Info: -------- Start of Wayland monitor list --------
[2024:05:19:15:11:13]: Info: Monitor 0 is eDP-1: BOE 0x095F (eDP-1)
[2024:05:19:15:11:13]: Info: --------- End of Wayland monitor list ---------
[2024:05:19:15:11:13]: Error: Couldn't find any working encoder matching [vaapi ]
[2024:05:19:15:11:13]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:05:19:15:11:13]: Info: Trying encoder [nvenc]
[2024:05:19:15:11:13]: Info: Screencasting with Wayland's protocol
[2024:05:19:15:11:13]: Info: Found display [wayland-1]
[2024:05:19:15:11:13]: Info: Found interface: zxdg_output_manager_v1(7) version 3
[2024:05:19:15:11:13]: Info: Found interface: zwlr_export_dmabuf_manager_v1(26) version 1
[2024:05:19:15:11:13]: Info: Found interface: wl_output(48) version 4
[2024:05:19:15:11:13]: Info: Resolution: 2256x1504
[2024:05:19:15:11:13]: Info: Name: eDP-1
[2024:05:19:15:11:13]: Info: Found monitor: BOE 0x095F (eDP-1)
[2024:05:19:15:11:13]: Info: Offset: 1920x0
[2024:05:19:15:11:13]: Info: Logical size: 1128x752
[2024:05:19:15:11:13]: Info: Selected monitor [BOE 0x095F (eDP-1)] for streaming
[2024:05:19:15:11:13]: Info: SDR color coding [Rec. 601]
[2024:05:19:15:11:13]: Info: Color depth: 8-bit
[2024:05:19:15:11:13]: Info: Color range: [JPEG]
[2024:05:19:15:11:13]: Error: [AVHWDeviceContext @ 0x5e78dbe50640] Cannot load libcuda.so.1
[2024:05:19:15:11:13]: Error: [AVHWDeviceContext @ 0x5e78dbe50640] Could not dynamically load CUDA
[2024:05:19:15:11:13]: Error: Failed to create a CUDA device: Operation not permitted
[2024:05:19:15:11:13]: Info: SDR color coding [Rec. 601]
[2024:05:19:15:11:13]: Info: Color depth: 8-bit
[2024:05:19:15:11:13]: Info: Color range: [JPEG]
[2024:05:19:15:11:13]: Error: [AVHWDeviceContext @ 0x5e78dbe51d40] Cannot load libcuda.so.1
[2024:05:19:15:11:13]: Error: [AVHWDeviceContext @ 0x5e78dbe51d40] Could not dynamically load CUDA
[2024:05:19:15:11:13]: Error: Failed to create a CUDA device: Operation not permitted
[2024:05:19:15:11:13]: Info: Encoder [nvenc] failed
[2024:05:19:15:11:13]: Info: Trying encoder [vaapi]
[2024:05:19:15:11:13]: Info: Screencasting with Wayland's protocol
[2024:05:19:15:11:13]: Info: Found display [wayland-1]
[2024:05:19:15:11:13]: Info: Found interface: zxdg_output_manager_v1(7) version 3
[2024:05:19:15:11:13]: Info: Found interface: zwlr_export_dmabuf_manager_v1(26) version 1
[2024:05:19:15:11:13]: Info: Found interface: wl_output(48) version 4
[2024:05:19:15:11:13]: Info: Resolution: 2256x1504
[2024:05:19:15:11:13]: Info: Name: eDP-1
[2024:05:19:15:11:13]: Info: Found monitor: BOE 0x095F (eDP-1)
[2024:05:19:15:11:13]: Info: Offset: 1920x0
[2024:05:19:15:11:13]: Info: Logical size: 1128x752
[2024:05:19:15:11:13]: Info: Selected monitor [BOE 0x095F (eDP-1)] for streaming
[2024:05:19:15:11:13]: Info: System tray created
[2024:05:19:15:11:13]: Info: SDR color coding [Rec. 601]
[2024:05:19:15:11:13]: Info: Color depth: 8-bit
[2024:05:19:15:11:13]: Info: Color range: [JPEG]
[2024:05:19:15:11:13]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:13]: Info: SDR color coding [Rec. 601]
[2024:05:19:15:11:13]: Info: Color depth: 8-bit
[2024:05:19:15:11:13]: Info: Color range: [JPEG]
[2024:05:19:15:11:13]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:13]: Info: SDR color coding [Rec. 601]
[2024:05:19:15:11:13]: Info: Color depth: 8-bit
[2024:05:19:15:11:13]: Info: Color range: [JPEG]
[2024:05:19:15:11:13]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:13]: Error: [av1_vaapi @ 0x5e78dbf8c340] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:05:19:15:11:13]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
[2024:05:19:15:11:13]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:13]: Error: [av1_vaapi @ 0x5e78dc8c0680] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:05:19:15:11:13]: Error: Could not open codec [av1_vaapi]: Function not implemented
[2024:05:19:15:11:13]: Info: SDR color coding [Rec. 601]
[2024:05:19:15:11:13]: Info: Color depth: 8-bit
[2024:05:19:15:11:13]: Info: Color range: [JPEG]
[2024:05:19:15:11:13]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:13]: Error: [av1_vaapi @ 0x5e78dc052b80] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:05:19:15:11:13]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
[2024:05:19:15:11:13]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:13]: Error: [av1_vaapi @ 0x5e78dc8c0680] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:05:19:15:11:13]: Error: Could not open codec [av1_vaapi]: Function not implemented
[2024:05:19:15:11:13]: Info: Screencasting with Wayland's protocol
[2024:05:19:15:11:13]: Info: Found display [wayland-1]
[2024:05:19:15:11:13]: Info: Found interface: zxdg_output_manager_v1(7) version 3
[2024:05:19:15:11:13]: Info: Found interface: zwlr_export_dmabuf_manager_v1(26) version 1
[2024:05:19:15:11:13]: Info: Found interface: wl_output(48) version 4
[2024:05:19:15:11:13]: Info: Resolution: 2256x1504
[2024:05:19:15:11:13]: Info: Name: eDP-1
[2024:05:19:15:11:13]: Info: Found monitor: BOE 0x095F (eDP-1)
[2024:05:19:15:11:13]: Info: Offset: 1920x0
[2024:05:19:15:11:13]: Info: Logical size: 1128x752
[2024:05:19:15:11:13]: Info: Selected monitor [BOE 0x095F (eDP-1)] for streaming
[2024:05:19:15:11:13]: Info: SDR color coding [Rec. 709]
[2024:05:19:15:11:13]: Info: Color depth: 10-bit
[2024:05:19:15:11:13]: Info: Color range: [JPEG]
[2024:05:19:15:11:13]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:13]: Info:
[2024:05:19:15:11:13]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:05:19:15:11:13]: Info:
[2024:05:19:15:11:13]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2024:05:19:15:11:13]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2024:05:19:15:11:13]: Info: Adding avahi service Sunshine
[2024:05:19:15:11:13]: Info: Configuration UI available at [https://localhost:47990]
[2024:05:19:15:11:14]: Info: Avahi service Sunshine successfully established.
[2024:05:19:15:11:15]: Error: Failed to map TCP 48010: 501
[2024:05:19:15:11:15]: Error: Failed to map UDP 47998: 501
[2024:05:19:15:11:15]: Error: Failed to map UDP 48000: 501
[2024:05:19:15:11:15]: Error: Failed to map UDP 47999: 501
[2024:05:19:15:11:15]: Error: Failed to map TCP 47989: 501
[2024:05:19:15:11:15]: Error: Failed to map TCP 47984: 501
[2024:05:19:15:11:15]: Info: Completed UPnP port mappings to 192.168.1.226 via http://192.168.1.1:5000/rootDesc.xml
[2024:05:19:15:11:19]: Error: Couldn't find any working encoder matching [vaapi ]
[2024:05:19:15:11:19]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:05:19:15:11:19]: Info: Trying encoder [nvenc]
[2024:05:19:15:11:19]: Info: Screencasting with Wayland's protocol
[2024:05:19:15:11:19]: Info: Found display [wayland-1]
[2024:05:19:15:11:19]: Info: Found interface: zxdg_output_manager_v1(7) version 3
[2024:05:19:15:11:19]: Info: Found interface: zwlr_export_dmabuf_manager_v1(26) version 1
[2024:05:19:15:11:19]: Info: Found interface: wl_output(48) version 4
[2024:05:19:15:11:19]: Info: Resolution: 2256x1504
[2024:05:19:15:11:19]: Info: Name: eDP-1
[2024:05:19:15:11:19]: Info: Found monitor: BOE 0x095F (eDP-1)
[2024:05:19:15:11:19]: Info: Offset: 1920x0
[2024:05:19:15:11:19]: Info: Logical size: 1128x752
[2024:05:19:15:11:19]: Info: Selected monitor [BOE 0x095F (eDP-1)] for streaming
[2024:05:19:15:11:19]: Info: SDR color coding [Rec. 601]
[2024:05:19:15:11:19]: Info: Color depth: 8-bit
[2024:05:19:15:11:19]: Info: Color range: [JPEG]
[2024:05:19:15:11:19]: Error: [AVHWDeviceContext @ 0x7c47d8032500] Cannot load libcuda.so.1
[2024:05:19:15:11:19]: Error: [AVHWDeviceContext @ 0x7c47d8032500] Could not dynamically load CUDA
[2024:05:19:15:11:19]: Error: Failed to create a CUDA device: Operation not permitted
[2024:05:19:15:11:19]: Info: Encoder [nvenc] failed
[2024:05:19:15:11:19]: Info: Trying encoder [vaapi]
[2024:05:19:15:11:19]: Info: Screencasting with Wayland's protocol
[2024:05:19:15:11:19]: Info: Found display [wayland-1]
[2024:05:19:15:11:19]: Info: Found interface: zxdg_output_manager_v1(7) version 3
[2024:05:19:15:11:19]: Info: Found interface: zwlr_export_dmabuf_manager_v1(26) version 1
[2024:05:19:15:11:19]: Info: Found interface: wl_output(48) version 4
[2024:05:19:15:11:19]: Info: Resolution: 2256x1504
[2024:05:19:15:11:19]: Info: Name: eDP-1
[2024:05:19:15:11:19]: Info: Found monitor: BOE 0x095F (eDP-1)
[2024:05:19:15:11:19]: Info: Offset: 1920x0
[2024:05:19:15:11:19]: Info: Logical size: 1128x752
[2024:05:19:15:11:19]: Info: Selected monitor [BOE 0x095F (eDP-1)] for streaming
[2024:05:19:15:11:19]: Info: SDR color coding [Rec. 601]
[2024:05:19:15:11:19]: Info: Color depth: 8-bit
[2024:05:19:15:11:19]: Info: Color range: [JPEG]
[2024:05:19:15:11:19]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:19]: Info: SDR color coding [Rec. 601]
[2024:05:19:15:11:19]: Info: Color depth: 8-bit
[2024:05:19:15:11:19]: Info: Color range: [JPEG]
[2024:05:19:15:11:19]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:19]: Info: SDR color coding [Rec. 601]
[2024:05:19:15:11:19]: Info: Color depth: 8-bit
[2024:05:19:15:11:19]: Info: Color range: [JPEG]
[2024:05:19:15:11:19]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:19]: Error: [av1_vaapi @ 0x7c47d8012380] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:05:19:15:11:19]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
[2024:05:19:15:11:19]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:19]: Error: [av1_vaapi @ 0x7c47d8e54240] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:05:19:15:11:19]: Error: Could not open codec [av1_vaapi]: Function not implemented
[2024:05:19:15:11:19]: Info: SDR color coding [Rec. 601]
[2024:05:19:15:11:19]: Info: Color depth: 8-bit
[2024:05:19:15:11:19]: Info: Color range: [JPEG]
[2024:05:19:15:11:19]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:19]: Error: [av1_vaapi @ 0x7c47d85b3880] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:05:19:15:11:19]: Info: Retrying with fallback configuration options for [av1_vaapi] after error: Function not implemented
[2024:05:19:15:11:19]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:19]: Error: [av1_vaapi @ 0x7c47d8e54240] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024:05:19:15:11:19]: Error: Could not open codec [av1_vaapi]: Function not implemented
[2024:05:19:15:11:19]: Info: Screencasting with Wayland's protocol
[2024:05:19:15:11:19]: Info: Found display [wayland-1]
[2024:05:19:15:11:19]: Info: Found interface: zxdg_output_manager_v1(7) version 3
[2024:05:19:15:11:19]: Info: Found interface: zwlr_export_dmabuf_manager_v1(26) version 1
[2024:05:19:15:11:19]: Info: Found interface: wl_output(48) version 4
[2024:05:19:15:11:19]: Info: Resolution: 2256x1504
[2024:05:19:15:11:19]: Info: Name: eDP-1
[2024:05:19:15:11:19]: Info: Found monitor: BOE 0x095F (eDP-1)
[2024:05:19:15:11:19]: Info: Offset: 1920x0
[2024:05:19:15:11:19]: Info: Logical size: 1128x752
[2024:05:19:15:11:19]: Info: Selected monitor [BOE 0x095F (eDP-1)] for streaming
[2024:05:19:15:11:19]: Info: SDR color coding [Rec. 709]
[2024:05:19:15:11:19]: Info: Color depth: 10-bit
[2024:05:19:15:11:19]: Info: Color range: [JPEG]
[2024:05:19:15:11:19]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
[2024:05:19:15:11:19]: Info:
[2024:05:19:15:11:19]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:05:19:15:11:19]: Info:
[2024:05:19:15:11:19]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2024:05:19:15:11:19]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2024:05:19:15:11:19]: Info: Executing [Desktop]
[2024:05:19:15:11:19]: Info: Video encryption enabled
[2024:05:19:15:11:19]: Info: CLIENT CONNECTED
[2024:05:19:15:11:19]: Info: Found display [wayland-1]
[2024:05:19:15:11:19]: Info: Found interface: zxdg_output_manager_v1(7) version 3
[2024:05:19:15:11:19]: Info: Found interface: zwlr_export_dmabuf_manager_v1(26) version 1
[2024:05:19:15:11:19]: Info: Found interface: wl_output(48) version 4
[2024:05:19:15:11:19]: Info: Resolution: 2256x1504
[2024:05:19:15:11:19]: Info: Name: eDP-1
[2024:05:19:15:11:19]: Info: Found monitor: BOE 0x095F (eDP-1)
[2024:05:19:15:11:19]: Info: Offset: 1920x0
[2024:05:19:15:11:19]: Info: Logical size: 1128x752
[2024:05:19:15:11:19]: Info: -------- Start of Wayland monitor list --------
[2024:05:19:15:11:19]: Info: Monitor 0 is eDP-1: BOE 0x095F (eDP-1)
[2024:05:19:15:11:19]: Info: --------- End of Wayland monitor list ---------
[2024:05:19:15:11:19]: Info: Screencasting with Wayland's protocol
[2024:05:19:15:11:19]: Info: Found display [wayland-1]
[2024:05:19:15:11:19]: Info: Found interface: zxdg_output_manager_v1(7) version 3
[2024:05:19:15:11:19]: Info: Found interface: zwlr_export_dmabuf_manager_v1(26) version 1
[2024:05:19:15:11:19]: Info: Found interface: wl_output(48) version 4
[2024:05:19:15:11:19]: Info: Resolution: 2256x1504
[2024:05:19:15:11:19]: Info: Name: eDP-1
[2024:05:19:15:11:19]: Info: Found monitor: BOE 0x095F (eDP-1)
[2024:05:19:15:11:19]: Info: Offset: 1920x0
[2024:05:19:15:11:19]: Info: Logical size: 1128x752
[2024:05:19:15:11:19]: Info: Selected monitor [BOE 0x095F (eDP-1)] for streaming
[2024:05:19:15:11:19]: Info: SDR color coding [Rec. 709]
[2024:05:19:15:11:19]: Info: Color depth: 8-bit
[2024:05:19:15:11:19]: Info: Color range: [MPEG]
[2024:05:19:15:11:19]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 24.2.2 ()
Segmentation fault (core dumped)
@ReenigneArcher
Copy link
Member

ReenigneArcher commented May 20, 2024

What's the reason you're adding those flags? And... what are you expecting us to do?

If the problem is in nanors, maybe you should file an issue, or PR, here: https://github.com/sleepybishop/nanors

@cgutman
Copy link
Contributor

cgutman commented May 23, 2024

Looking at the backtrace of the coredump in GDB suggests the problem is in nanors. However, setting the forward error correction percentage to 0 doesn't solve the problem.

Can you provide the GDB output with the crashing stack? (and preferably also the crashing instruction)

@spleen-in-a-bean
Copy link
Author

Looking at the backtrace of the coredump in GDB suggests the problem is in nanors. However, setting the forward error correction percentage to 0 doesn't solve the problem.

Can you provide the GDB output with the crashing stack? (and preferably also the crashing instruction)

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `sunshine'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  _mm512_loadu_si512 (__P=0x72f2140394e0) at /usr/lib/gcc/x86_64-pc-linux-gnu/14.1.1/include/avx512fintrin.h:9458
9458	  return *(__m512i_u *)__P;
[Current thread is 1 (Thread 0x72ab44c006c0 (LWP 1180487))]
(gdb) backtrace
#0  _mm512_loadu_si512 (__P=0x72f2140394e0) at /usr/lib/gcc/x86_64-pc-linux-gnu/14.1.1/include/avx512fintrin.h:9458
#1  obl_axpy (a=<optimized out>, b=<optimized out>, u=42 '*', k=<optimized out>)
    at /home/user/.cache/yay/sunshine-git/src/Sunshine/third-party/nanors/deps/obl/oblas_lite.c:234
#2  axpy (a=<optimized out>, b=<optimized out>, u=42 '*', k=<optimized out>)
    at /home/user/.cache/yay/sunshine-git/src/Sunshine/third-party/nanors/rs.c:20
#3  gemm (a=<optimized out>, b=0x72ab140480b0, c=<optimized out>, n=<optimized out>, k=68, m=1008)
    at /home/user/.cache/yay/sunshine-git/src/Sunshine/third-party/nanors/rs.c:38
#4  0x0000611f5c57944d in reed_solomon_encode (rs=0x72ab14048350, shards=0x72ab140480b0, nr_shards=82, bs=<optimized out>)
    at /home/user/.cache/yay/sunshine-git/src/Sunshine/third-party/nanors/rs.c:168
#5  stream::fec::encode
    (payload='\000' <repeats 20 times>, "\001\000\000\000\005\000\020\200\000\000\000\000\001\000\000\002\360\000\000\000\000\000\000\001@\001\f\001\377\377\001`\000\000\003\000\260\000\000\003\000\000\003\000\231,\f\000\000\003\000\004\000\000\003\000{\240\000\000\000\001B\001\001\001`\000\000\003\000\260\000\000\003\000\000\003\000\231\240\001, \0049bK\222Fڦ\240   \200\000\000\003\000\200\000\000\017k\341\000\202\000\000\000\001D\001\300b\0310\"@\000\000\000\001&\001\257\240\366lp\001\377\371\215\322\030x\354\251\335\311\352\261H~\025rHu:8\225z\036\247N\235+\243\215R\006\227gAX\343\326ł\000Q\211QQes\037"..., blocksize=1008, fecpercentage=20, minparityshards=<optimized out>, prefixsize=32)
    at /home/user/.cache/yay/sunshine-git/src/Sunshine/src/stream.cpp:698
#6  operator()
    (__closure=<synthetic pointer>, current_payload='\000' <repeats 20 times>, "\001\000\000\000\005\000\020\200\000\000\000\000\001\000\000\002\360\000\000\000\000\000\000\001@\001\f\001\377\377\001`\000\000\003\000\260\000\000\003\000\000\003\000\231,\f\000\000\003\000\004\000\000\003\000{\240\000\000\000\001B\001\001\001`\000\000\003\000\260\000\000\003\000\000\003\000\231\240\001, \0049bK\222Fڦ\240   \200\000\000\003\000\200\000\000\017k\341\000\202\000\000\000\001D\001\300b\0310\"@\000\000\000\001&\001\257\240\366lp\001\377\371\215\322\030x\354\251\335\311\352\261H~\025rHu:8\225z\036\247N\235+\243\215R\006\227gAX\343\326ł\000Q\211QQes\037"...) at /home/user/.cache/yay/sunshine-git/src/Sunshine/src/stream.cpp:1399
#7  std::for_each<std::basic_string_view<char>*, stream::videoBroadcastThread(boost::asio::ip::udp::socket&)::<lambda(std::string_view&)> > (__first=0x72ab44bffb00, __last=<optimized out>, __f=...) at /usr/include/c++/14.1.1/bits/stl_algo.h:3785
#8  stream::videoBroadcastThread (sock=<optimized out>)
    at /home/user/.cache/yay/sunshine-git/src/Sunshine/src/stream.cpp:1375
#9  0x000072ab53ce0c84 in std::execute_native_thread_routine (__p=0x611f7c99b110)
    at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
#10 0x000072ab538c3ded in ??? () at /usr/lib/libc.so.6
#11 0x000072ab539470dc in ??? () at /usr/lib/libc.so.6
(gdb)

@spleen-in-a-bean
Copy link
Author

spleen-in-a-bean commented May 23, 2024

What's the reason you're adding those flags? And... what are you expecting us to do?

If the problem is in nanors, maybe you should file an issue, or PR, here: https://github.com/sleepybishop/nanors

  1. -mavx512f gets added when compiling with -march=native on some intel CPUs. I realize that sunshine might not support being compiled with -march=native, and that debug time might be better spent elsewhere, but this should probably be explicitly stated. Furthermore, the same problem occurs when using -march=native, and attempting to connect from an android client on some AMD CPUs without avx512 support as well, which suggests that this is probably the result of an actual bug somewhere, and not some weird miscompilation bug. (Can no longer reproduce this with the latest master build. Previously (about a month or two ago), sunshine would also segfault on AMD CPU's when joining from an android client, but this appears to have been resolved at some point. The intel bug still remains.)
  2. I don't have enough knowledge of nanors, or how sunshine is using it, to file a bug report at their repository, or to continue debugging nanors, if this is an actual issue with nanors and not sunshine. The fact that this only occurs when joining from an android client, biases me towards sunshine probably messing up somewhere, but the back trace shows nanors doing something in the run-up to the crash.

@spleen-in-a-bean
Copy link
Author

Crash also requires encryption to be enabled, doesn't occur when LAN encryption is forcibly disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants