I build a Linux standalone version of my game. And I want it to run in batch mode in Ubuntu so that I can write some code to get screenshot automatically for further usage.
My env:
Ubuntu 16.04
Unity 5.4.3
Nvidia K2200 graphic card
Nvidia Drider version: 367.57-0ubuntu0.16.04.1
xvfb-run
But when I tried to run my game through SSH with this kind of command, I came across a core dumped and everything aborted:
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: operation not allowed.
No threads.
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Then I try to uninstall Nvidia driver and everything works fine. But as it cannot use graphic card, the app is with low efficiency.
Then I re-install driver again, and try building Linux standalone app with from Unity 5.2 to Unity 5.5. Nothing better.
Now I really don’t know want should I do. Can someone help me with this? Thanks!
84 ../sysdeps/unix/syscall-template.S: No such file or directory.
[New LWP 8748]
[New LWP 8749]
[New LWP 8750]
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/x86_64-linux-gnu/libthread_db.so.1”.
0x00007f3bacd3751d in read () at ../sysdeps/unix/syscall-template.S:84
Id Target Id Frame
1 Thread 0x7f3bad345740 (LWP 8747) “test.x86_64” 0x00007f3bacd3751d in read () at ../sysdeps/unix/syscall-template.S:84
2 Thread 0x7f3bad180700 (LWP 8748) “test.x86_64” pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
3 Thread 0x7f3ba804e700 (LWP 8749) “test.x86_64” 0x00007f3bacd36827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7f3ba8c06070) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
4 Thread 0x7f3ba7e4d700 (LWP 8750) “test.x86_64” 0x00007f3bacd36827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7f3ba9e8cab8) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
Thread 4 (Thread 0x7f3ba7e4d700 (LWP 8750)): #0 0x00007f3bacd36827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7f3ba9e8cab8) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 do_futex_wait (sem=sem@entry=0x7f3ba9e8cab8, abstime=0x0) at sem_waitcommon.c:111 #2 0x00007f3bacd368d4 in __new_sem_wait_slow (sem=0x7f3ba9e8cab8, abstime=0x0) at sem_waitcommon.c:181 #3 0x00007f3bacd3697a in __new_sem_wait (sem=) at sem_wait.c:29 #4 0x0000000000979e68 in ?? () #5 0x000000000097a679 in ?? () #6 0x000000000092ed18 in ?? () #7 0x00007f3bacd2e6ba in start_thread (arg=0x7f3ba7e4d700) at pthread_create.c:333 #8 0x00007f3bab5dd82d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 3 (Thread 0x7f3ba804e700 (LWP 8749)): #0 0x00007f3bacd36827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7f3ba8c06070) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 do_futex_wait (sem=sem@entry=0x7f3ba8c06070, abstime=0x0) at sem_waitcommon.c:111 #2 0x00007f3bacd368d4 in __new_sem_wait_slow (sem=0x7f3ba8c06070, abstime=0x0) at sem_waitcommon.c:181 #3 0x00007f3bacd3697a in __new_sem_wait (sem=) at sem_wait.c:29 #4 0x00007f3ba88e5faf in mono_sem_wait () from /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so #5 0x00007f3ba88508bd in ?? () from /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so #6 0x00007f3ba88b831a in ?? () from /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so #7 0x00007f3ba88ddec7 in ?? () from /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so #8 0x00007f3ba88fea16 in ?? () from /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so #9 0x00007f3bacd2e6ba in start_thread (arg=0x7f3ba804e700) at pthread_create.c:333 #10 0x00007f3bab5dd82d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 2 (Thread 0x7f3bad180700 (LWP 8748)): #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225 #1 0x00007f3ba88caaa2 in ?? () from /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so #2 0x00007f3bacd2e6ba in start_thread (arg=0x7f3bad180700) at pthread_create.c:333 #3 0x00007f3bab5dd82d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 1 (Thread 0x7f3bad345740 (LWP 8747)): #0 0x00007f3bacd3751d in read () at ../sysdeps/unix/syscall-template.S:84 #1 0x00007f3ba87ebb91 in ?? () from /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so #2 #3 0x00007f3bab50c428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #4 0x00007f3bab50e02a in __GI_abort () at abort.c:89 #5 0x0000000000886397 in ?? () #6 0x00007f3ba882a7eb in ?? () from /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so #7 0x00007f3ba878e8d3 in ?? () from /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so #8 #9 0x0000000000f92d9f in ?? () #10 0x0000000000f8a1c6 in ?? () #11 0x0000000000f8b97b in ?? () #12 0x00000000004a2d5e in ?? () #13 0x00007f3bab4f7830 in __libc_start_main (main=0x4a2030, argc=5, argv=0x7fff4c351548, init=, fini=, rtld_fini=, stack_end=0x7fff4c351538) at ../csu/libc-start.c:291 #14 0x00000000004ac679 in ?? () #15 0x00007fff4c351538 in ?? () #16 0x000000000000001c in ?? () #17 0x0000000000000005 in ?? () #18 0x00007fff4c3518a7 in ?? () #19 0x00007fff4c3518b5 in ?? () #20 0x00007fff4c3518c0 in ?? () #21 0x00007fff4c3518ce in ?? () #22 0x00007fff4c3518d7 in ?? () #23 0x0000000000000000 in ?? ()
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
I’m not sure whether the nvidia driver is meant to work with xvfb.
If possible, it’s better to connect to a real, existing desktop session by setting the DISPLAY environment variable.