The game can run well with Vulkan on Linux until it suddenly gets stuck when receiving a candidate.
As shown in Player.log, I consider the stuck is caused by the following Native Crash. The package version is exp2.
…
Signaling: Receiving message: {“from”:“449a8c1e646042198448cca14e999cca”,“to”:“”,“type”:“candidate”,“data”:{“candidate”:“candidate:1130711874 1 tcp 1517887231 172.20.229.173 13735 typ host tcptype passive generation 0 ufrag ZMEq network-id 5 network-cost 10”,“sdpMLineIndex”:0,“sdpMid”:“0”,“datetime”:1679916875770}}
Native Crash Reporting
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Native stacktrace:
0x7fec11715062 - /home/fers/exp2v/pt1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so :
0x7fec116bdd3d - /home/fers/exp2v/pt1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so :
0x7fec11643250 - /home/fers/exp2v/pt1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so :
0x7fec1c442520 - /lib/x86_64-linux-gnu/libc.so.6 :
0x7feb46b02a67 - /home/fers/exp2v/pt1_Data/Plugins/libwebrtc.so : _ZNK5unity6webrtc20VulkanGraphicsDevice13AccessTextureEPv
0x7feb46b01484 - /home/fers/exp2v/pt1_Data/Plugins/libwebrtc.so : _ZN5unity6webrtc15GraphicsUtility32TextureHandleToNativeGraphicsPtrEPvPNS0_15IGraphicsDeviceE16UnityGfxRenderer
0x7feb46aee446 - /home/fers/exp2v/pt1_Data/Plugins/libwebrtc.so :
0x7fec1e30f430 - /home/fers/exp2v/UnityPlayer.so :
0x7fec1ecc0262 - /home/fers/exp2v/UnityPlayer.so :
0x7fec1ecc0f2f - /home/fers/exp2v/UnityPlayer.so :
0x7fec1ecb6931 - /home/fers/exp2v/UnityPlayer.so :
0x7fec1e024122 - /home/fers/exp2v/UnityPlayer.so :
0x7fec1c494b43 - /lib/x86_64-linux-gnu/libc.so.6 :
0x7fec1c526a00 - /lib/x86_64-linux-gnu/libc.so.6 :
Telemetry Dumper:
Thread 0x7feaf27ff640 may have been prematurely finalized* Assertion at mono-threads.c:702, condition `info’ not met, function:mono_thread_info_current,
Signaling: Sending WS data: {“from”:“449a8c1e646042198448cca14e999cca”,“to”:“”,“type”:“candidate”,“data”:{“connectionId”:“449a8c1e646042198448cca14e999cca”,“candidate”:“candidate:941157666 1 udp 2122265343 fd00:4f9:f8b4:fa5c:8e5c:6fe3:2c94:e972 47682 typ host generation 0 ufrag BNbX network-id 2 network-cost 50”,“sdpMid”:“0”,“sdpMLineIndex”:0}}
The exp6 get crashed with SIGABRT with the following stacktrace, so I downgraded to exp2:
Signaling: Sending WS data: {“from”:“08b57c73506b407b850926eee79edf2e”,“to”:“”,“type”:“candidate”,“data”:{“connectionId”:“08b57c73506b407b850926eee79edf2e”,“candidate”:“candidate:3796128048 1 tcp 1518280447 10.123.1.5 35397 typ host tcptype passive generation 0 ufrag 4bMc network-id 1 network-cost 50”,“sdpMid”:“0”,“sdpMLineIndex”:0}}
<…>
terminate called without an active exception
Caught fatal signal - signo:6 code:-6 errno:0 addr:0x3e800014127
Obtained 18 stack frames.
#0 0x007fcf7340c140 in funlockfile
#1 0x007fcf7325cce1 in gsignal
#2 0x007fcf73246537 in abort
#3 0x007fcf22ad87ec in __cxa_throw_bad_array_new_length
#4 0x007fcf22ae3966 in std::rethrow_exception(std::__exception_ptr::exception_ptr)
#5 0x007fcf22ae39d1 in std::terminate()
#6 0x007fcf22ae3cb9 in __cxa_rethrow
#7 0x007fce0af8bbb0 in std::vector<char const*, std::allocator<char const*> >::insert(__gnu_cxx::__normal_iterator<char const* const*, std::vector<char const*, std::allocator<char const*> > >, char const* const&)
#8 0x007fce0af7ee43 in std::vector<unsigned char, std::allocator >::_M_default_append(unsigned long)
#9 0x007fce0af7e803 in std::vector<unsigned char, std::allocator >::_M_default_append(unsigned long)
#10 0x007fce0af7e533 in std::vector<unsigned char, std::allocator >::_M_default_append(unsigned long)
#11 0x007fce0af645fe in GetRenderEventFunc
#12 0x007fcf75a5b262 in std::vector<std::pair<int, unsigned int>, std::allocator<std::pair<int, unsigned int> > >::operator=(std::vector<std::pair<int, unsigned int>, std::allocator<std::pair<int, unsigned int> > > const&)
#13 0x007fcf75a5bf2f in std::vector<std::pair<int, unsigned int>, std::allocator<std::pair<int, unsigned int> > >::operator=(std::vector<std::pair<int, unsigned int>, std::allocator<std::pair<int, unsigned int> > > const&)
#14 0x007fcf75a51931 in std::vector<std::pair<int, unsigned int>, std::allocator<std::pair<int, unsigned int> > >::operator=(std::vector<std::pair<int, unsigned int>, std::allocator<std::pair<int, unsigned int> > > const&)
#15 0x007fcf74dbf122 in void std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::_M_realloc_insert<std::pair<int, int> const&>(__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > >, std::pair<int, int> const&)
#16 0x007fcf73400ea7 in start_thread
#17 0x007fcf73320a2f in clone
The performance issue of openGL is why I switched to Vulkan, but it doesn’t work.
With OpenGL, I can get a ~60FPS when not moving while ~6FPS when moving the character.
With windows on the same machine, I can get a stable 30+FPS render result.
Is there any way to improve the performance under OpenGL, or fix the bug under Vulkan?
FerdinandSu:
The game can run well with Vulkan on Linux until it suddenly gets stuck when receiving a candidate.
As shown in Player.log, I consider the stuck is caused by the following Native Crash. The package version is exp2.
The exp6 get crashed with SIGABRT with the following stacktrace, so I downgraded to exp2:
The performance issue of openGL is why I switched to Vulkan, but it doesn’t work.
With OpenGL, I can get a ~60FPS when not moving while ~6FPS when moving the character.
With windows on the same machine, I can get a stable 30+FPS render result.
Is there any way to improve the performance under OpenGL, or fix the bug under Vulkan?
Hi, exp.6 is the latest version of Unity Render Streaming.
exp.2 is too old version to fix issues.
I would like to know the issue of exp.6.
Which version of Unity are you using?
kazuki_unity729:
Hi, exp.6 is the latest version of Unity Render Streaming.
exp.2 is too old version to fix issues.
I would like to know the issue of exp.6.
Which version of Unity are you using?
Unity 2021.3.13f1c1 on Windows.
Adding Audio Sender to exp2 also causes a crash, which is later than the exp.6 crash (Video Stream Connected):
Fatal error in: …/src/api/audio/audio_frame.cc, line 90
last system error: 0
Check failed: length <= kMaxDataSizeSamples (128562 vs. 7680)
Caught fatal signal - signo:6 code:-6 errno:0 addr:0x3e80000125d
Obtained 12 stack frames.
#0 0x007f76f3642520 in __sigaction
#1 0x007f76f3696a7c in pthread_kill
#2 0x007f76f3642476 in raise
#3 0x007f76f36287f3 in abort
#4 0x007f76a4190457 in (anonymous namespace)::WriteFatalLogAndAbort(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)
#5 0x007f76a419040b in rtc::webrtc_checks_impl::FatalLog(char const*, int, char const*, rtc::webrtc_checks_impl::CheckArgType const*, …)
#6 0x007f76a48365de in webrtc::AudioFrame::UpdateFrame(unsigned int, short const*, unsigned long, int, webrtc::AudioFrame::SpeechType, webrtc::AudioFrame::VADActivity, unsigned long)
#7 0x007f76a436a494 in cricket::WebRtcVoiceMediaChannel::WebRtcAudioSendStream::OnData(void const*, int, int, unsigned long, unsigned long, absl::optional)
#8 0x007f76a493105b in webrtc::LocalAudioSinkAdapter::OnData(void const*, int, int, unsigned long, unsigned long, absl::optional)
#9 0x007f76a4932bfa in webrtc::LocalAudioSinkAdapter::OnData(void const*, int, int, unsigned long, unsigned long)
#10 0x007f76a40fd029 in unity::webrtc::UnityAudioTrackSource::OnData(float const*, int, unsigned long, unsigned long)
#11 0x000000412eb83f in (wrapper managed-to-native) Unity.WebRTC.NativeMethods:ProcessAudio (intptr,intptr,int,int,int)
Removing the AudioSender still caused exp6 crash
Well, i tried to re-adapt my project from exp2 to exp6, and it even crashed earlier (Signalling not started):
Mono path[0] = ‘/home/fers/exp6a/pt1_Data/Managed’
Mono config path = ‘/home/fers/exp6a/pt1_Data/MonoBleedingEdge/etc’
Found 1 interfaces on host : 0) 10.123.1.5
Multi-casting “[IP] 10.123.1.5 [Port] 55000 [Flags] 2 [Guid] 2864950755 [EditorId] 279735073 [Version] 1048832 [Id] LinuxPlayer(13,10.123.1.5) [Debug] 0 [PackageName] LinuxPlayer [ProjectName] TalesOfEvilSword” to [225.0.0.222:54997]…
Preloaded ‘libwebrtc.so’
AS: AutoStreaming module initializing.
Display 0 ‘screen’: 2560x1440 (primary device).
Desktop is 2560 x 1440 @ 0 Hz
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 0 ()
Serial number of failed request: 9
Current serial number in output stream: 9
What’s more, the performance of exp6 on windows is much lower (10-30fps) than exp2 on linux (30-60fps).
The logs of exp2 starts with:
Mono path[0] = ‘/home/fers/exp2/pt1_Data/Managed’
Mono config path = ‘/home/fers/exp2/pt1_Data/MonoBleedingEdge/etc’
Found 1 interfaces on host : 0) 10.123.1.5
Multi-casting “[IP] 10.123.1.5 [Port] 55001 [Flags] 2 [Guid] 1277068983 [EditorId] 1680492084 [Version] 1048832 [Id] LinuxPlayer(13,10.123.1.5) [Debug] 0 [PackageName] LinuxPlayer [ProjectName] TalesOfEvilSword” to [225.0.0.222:54997]…
Preloaded ‘libwebrtc.so’
AS: AutoStreaming module initializing.
Display 0 ‘screen’: 2560x1440 (primary device).
Desktop is 2560 x 1440 @ 0 Hz
Initialize engine version: 2021.3.13f1c1 (07291ec823bf)
[Subsystems] Discovering subsystems at path /home/fers/exp2/pt1_Data/UnitySubsystems
GfxDevice: creating device client; threaded=1; jobified=0
Renderer: NVIDIA GeForce RTX 3060/PCIe/SSE2
Vendor: NVIDIA Corporation
Version: 4.5.0 NVIDIA 525.89.02
GLES: 0
I notice the Render Streaming Wizard ‘fixed’ Current Graphics API, which worked well in exp2. In the project, the Graphics APIs are configured as ‘Auto’. So I wonder what the wizard actually did with my Graphics API settings.
FerdinandSu:
Well, i tried to re-adapt my project from exp2 to exp6, and it even crashed earlier (Signalling not started):
What’s more, the performance of exp6 on windows is much lower (10-30fps) than exp2 on linux (30-60fps).
The logs of exp2 starts with:
I’m curious about this line in the log. It looks the error is about X Window.
X Error of failed request: BadRequest (invalid request code or no such operation)
Well, it seems to be ‘fixed’ as it can run adequately on another Ubuntu machine (while not working on this Debian machine). Maybe some configurations differed, but it is no more important.
We now care more about why the performance of exp6 is much lower (10-30fps) than exp2 (30-60fps) on Linux.
FerdinandSu:
Well, it seems to be ‘fixed’ as it can run adequately on another Ubuntu machine (while not working on this Debian machine). Maybe some configurations differed, but it is no more important.
We now care more about why the performance of exp6 is much lower (10-30fps) than exp2 (30-60fps) on Linux.
Can you try to change the framerate setting for video streaming?
FYI, we have issues about Vulkan Graphics API and are fixing here. It might be related your issue.
https://github.com/Unity-Technologies/com.unity.webrtc/pull/888
All exp6 builds have a 60fps framerate setting, exp2 seems to have a default 60fps setting ?
How to try the latest branch of WebRtc, just import in package manager?
FerdinandSu:
All exp6 builds have a 60fps framerate setting, exp2 seems to have a default 60fps setting ?
How to try the latest branch of WebRtc, just import in package manager?
We haven’t finished fixing in the branch so please wait for next release.
Hello.
I have successfully solved the issue by installing Intel Graphics Driver for Ubuntu. You can download it from Intel’s official website:
https://www.intel.com/content/www/us/en/download/747008/intel-arc-graphics-driver-ubuntu.html
Wow, good to hear that.
I am still a beginner for Linux.