Search Unity

Ubuntu xvfb-run a Unity application with Nvidia leads to a “core dumped”

Discussion in 'Linux' started by johnny1225, Jan 16, 2017.

  1. johnny1225

    johnny1225

    Joined:
    Oct 27, 2016
    Posts:
    3
    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:

    xvfb-run --auto-servernum --server-args='-screen 1 2560x1600x24:32' -e /home/unreal/video/error_xvfb ./test.x86_64 -batchmode -logFile /home/unreal/video/stdout_unity

    And in that log file "stduo_unity", some error happened but I have no idea what it is talking about:

    Stacktrace:


    Native stacktrace:

    /home/unreal/Unity/New Unity Project/test_Data/Mono/x86_64/libmono.so(+0x91a46) [0x7f61216dba46]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f6125c28390]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7f61243fc428]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f61243fe02a]
    ./test.x86_64() [0x886397]
    /home/unreal/Unity/New Unity Project/test_Data/Mono/x86_64/libmono.so(+0xd07eb) [0x7f612171a7eb]
    /home/unreal/Unity/New Unity Project/test_Data/Mono/x86_64/libmono.so(+0x348d3) [0x7f612167e8d3]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f6125c28390]
    ./test.x86_64() [0xf92d9f]
    ./test.x86_64() [0xf8a1c6]
    ./test.x86_64() [0xf8b97b]
    ./test.x86_64() [0x4a2d5e]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f61243e7830]
    ./test.x86_64() [0x4ac679]

    Debug info from gdb:

    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!
     
  2. johnny1225

    johnny1225

    Joined:
    Oct 27, 2016
    Posts:
    3
    [What's more] Here is the full output of Unity app:

    Stacktrace:


    Native stacktrace:

    /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so(+0x91a46) [0x7f3ba87eba46]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f3bacd38390]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7f3bab50c428]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f3bab50e02a]
    ./test.x86_64() [0x886397]
    /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so(+0xd07eb) [0x7f3ba882a7eb]
    /home/unreal/test/u54/test_Data/Mono/x86_64/libmono.so(+0x348d3) [0x7f3ba878e8d3]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f3bacd38390]
    ./test.x86_64() [0xf92d9f]
    ./test.x86_64() [0xf8a1c6]
    ./test.x86_64() [0xf8b97b]
    ./test.x86_64() [0x4a2d5e]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f3bab4f7830]
    ./test.x86_64() [0x4ac679]

    Debug info from gdb:

    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=<optimized out>) 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=<optimized out>) 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 <signal handler called>
    #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 <signal handler called>
    #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=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 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.
    =================================================================
     
  3. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    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.