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

Godot crashes in ubuntu studio 18.04 (i586 architecture) #31743

Closed
JezSonic opened this issue Aug 28, 2019 · 32 comments · Fixed by godotengine/godot-build-scripts#19
Closed

Godot crashes in ubuntu studio 18.04 (i586 architecture) #31743

JezSonic opened this issue Aug 28, 2019 · 32 comments · Fixed by godotengine/godot-build-scripts#19

Comments

@JezSonic
Copy link

I really haven't found the answer/solution to this problem.

Godot version:
3.1

OS/device including version:
Ubuntu Studio 18.04 32bit (i586 architecture)

Issue description:
I runned Godot via terminal, and there was an error. Here is an output:

handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7f18d14] (??:0)
-- END OF BACKTRACE --
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7f18d14] (??:0)
-- END OF BACKTRACE --
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7f18d14] (??:0)
-- END OF BACKTRACE --

Steps to reproduce:
enter these commands in terminal:

  1. sudo su
  2. cd
  3. cp <godot's file name> /usr/bin/<godot's file name>
  4. <godot's file name>

2.Minimal reproduction project:
None. Just run Godot via terminal

@akien-mga
Copy link
Member

You're not supposed to run Godot as root. What happens if you run it normally without being root?

Additionally, I would advise not to put custom binaries in /usr/bin, this path is reserved for system packages. If you really need to have it in the path, I'd advise to put a symlink in /usr/local/bin/godot pointing to where you keep the binary in your $HOME.

@JezSonic
Copy link
Author

"What happens if you run it normally without being root?"

Nothing. I think the reason is the standard processor architecture.

@akien-mga
Copy link
Member

Can you post the output of lscpu? Are you using the 32-bit version of Godot?

@JezSonic
Copy link
Author

Can you post the output of lscpu?

There is only output i have seen (sorry for my english)

handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7f18d14] (??:0)
-- END OF BACKTRACE --
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7f18d14] (??:0)
-- END OF BACKTRACE --
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7f18d14] (??:0)
-- END OF BACKTRACE --

Are you using the 32-bit version of Godot?

Yes

@akien-mga
Copy link
Member

akien-mga commented Aug 28, 2019

I mean type lscpu in a terminal, post what it prints.

@JezSonic
Copy link
Author

Sorry, but I don't know what you mean. I'm totally shocked. In my last post in this problem I posted the exit from the Ubuntu Studio System Terminal. If this is not what you mean, please try to specify what you mean.

@akien-mga
Copy link
Member

In the steps to reproduce you wrote:

None. Just run Godot via terminal

And instructions including the use of sudo and cp.
It means that you know how to start a terminal.

So I ask you to start a terminal, then type lscpu, press Enter, and copy paste the text that will be printed by the lscpu command in the terminal...

@JezSonic
Copy link
Author

Ok. Thanks a lot btw. Wait a minute. I have to rewrite the text from 2nd pc to 1st pc (I have 2 PCs) and translate it. So, i will add a new comment when the text will (finally) be ready

@akien-mga
Copy link
Member

Well you don't need to type everything, I'm mostly interested in the first few lines about the exact CPU model, architecture, etc.

@JezSonic
Copy link
Author

There are a few first lines of output

Architecture: i686 (ubuntu studio 64bit installer detected i586 CPU, btw)
CPU Work mode: 32-bit
Bit order: Little Endian
CPU: 1
List of active CPU: 0
Model name: Intel(R) Celeron(R) M processor 1.60GHz

I know it is old pc, but it runned godot a half of year ago, so when i found the error i reported it as a issue. And I will try to run godot on that pc

@JezSonic
Copy link
Author

So? Any progress in fixing this?
Is this PC too old or is this a system error?
Btw. Now I realized what you meant in:

I mean type lscpu in a terminal, post what it prints.

Hehe 😅

@santouits
Copy link
Contributor

run godot in a terminal with -v like this:

godot_name -v

and paste all the output here, not just the backtrace.
Also does a window open? Describe a little what exactly happens.

@akien-mga
Copy link
Member

Does Godot 2.1.6 work on this computer?
https://downloads.tuxfamily.org/godotengine/2.1.6/Godot_v2.1.6-stable_x11.32.zip

I'm not sure what the issue would be, as official binaries are built on Ubuntu 14.04 LTS so they should run fine on 18.04 32-bit.

Maybe lack of SSE2? Though I don't think we enable it ourselves, but maybe a thirdparty library has a bogus check to enable it.

Can you post the output of lscpu | grep Flags?

@JezSonic
Copy link
Author

JezSonic commented Aug 30, 2019 via email

@JezSonic
Copy link
Author

@santouits Output is here:

XInput: Refreshing devices.
XInput: No touch devices found.
Detecting GPUs, set DRI_PRIME in the environment to override GPU detection logic.
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7fb4d14] (??:0)
-- END OF BACKTRACE --
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7fb4d14] (??:0)
-- END OF BACKTRACE --
Only one GPU found, using default.
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7fb4d14] (??:0)
-- END OF BACKTRACE --

@akien-mga
Binaries built on Ubuntu 14.04 LTS may not work because the support for this system is ending. Godot 2.1.6 works 100% correctly.

Full output of lscpu:

Architecture: i686
CPU mode (s): 32-bit
Byte order: Little Endian
CPU: 1
List of active CPUs: 0
Threads per core: 1
Cores per socket: 1
Sockets: 1
Manufacturer ID: GenuineIntel
CPU family: 6
Model: 13
Model Name: Intel (R) Celeron (R) M processor 1.60GHz
Version: 8
CPU MHz: 1592.214
BogoMIPS: 3184.42
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx bts cpuid pti

Output of <godot 2.1.6 32bit> -v :

No touch devices found
AudioServerSW Params:
-mix chans: 2
-mix rate: 44100
-latency: 10
-fx: 1
-interp: 1
failed cursor: size_bdiag
failed cursor: size_fdiag
Using GLES2 video driver
GLES2: Using GLEW 1.13.0
WARNING: create: Config file does not exist, creating.
At: editor/editor_settings.cpp:336.
EditorSettings Save OK!

Output of grep flags (Godot 3.1.1 32bit binary, named as Godot.32):

The Godot.32 binary file matches the pattern

@JezSonic
Copy link
Author

JezSonic commented Sep 8, 2019

So... is that bug fixed? Dou You need any help from me?

Please, don't be angry for that - I don't know whether to open it as a new issue, so I'll write briefly. I have bugs with VideoPlayer node, and I think godot should get 100% support for: dll libraries. It would be nice to export the game so that its files from the source code are next to the game's executable file. (I know that you can upload the godot binary next to the project, but due to the mentioned VideoPlayer bug this will not have the intended effect, because the intro will not start)

@bruvzg
Copy link
Member

bruvzg commented Dec 27, 2019

It's still relevant in 3.2 beta 4 (tested on freshly installed Lubuntu 18.04 and Debian 10.2.0 32-bit x86 VMs), version compiled on the 32-bit VM itself works fine.

@akien-mga akien-mga added this to the 3.2 milestone Jan 3, 2020
@DrZanuff
Copy link

DrZanuff commented Jan 4, 2020

It's still relevant in 3.2 beta 5 (tested on Linux Mint 64 bit and Windows 10 64 Bit)

@Calinou
Copy link
Member

Calinou commented Jan 4, 2020

@DrZanuff The issue reported here is very different, as it's reported on 32-bit Linux. Please create a new issue and make sure to include the requested information.

@akien-mga
Copy link
Member

akien-mga commented Jan 10, 2020

Did some tests in an Ubuntu Studio 18.04 i686 VM, and I can reproduce the issue with official binaries.

It seems to be caused by our use of use_static_cpp=yes. I also checked use_lto=yes but this one doesn't seem to be problematic, i.e.:

  • Official: debug_symbols=no use_lto=yes use_static_cpp=yes: crash.
  • Test 1: debug_symbols=yes use_lto=yes use_static_cpp=no: works (both as is and once stripped).
  • Test 1: debug_symbols=yes use_lto=no use_static_cpp=yes: crash.

Backtrace for the crash:

Godot Engine v3.2.beta5.90.official - https://godotengine.org
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7fd6d14] (??:0)
-- END OF BACKTRACE --
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7fd6d14] (??:0)
-- END OF BACKTRACE --
warning: Error reading shared library list entry at 0x2490

Thread 1 "godot.x11.opt.t" received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0xb7c3c845 in __pthread_once_slow (once_control=0xb5d62f2c, 
    init_routine=0xac0e3a0 <__once_proxy>) at pthread_once.c:116
#2  0xb237cd27 in void std::call_once<void (&)()>(std::once_flag&, void (&)()) ()
   from /usr/lib/i386-linux-gnu/libLLVM-6.0.so.1
#3  0xb237cdb6 in llvm::ManagedStaticBase::RegisterManagedStatic(void* (*)(), void (*)(void*)) const () from /usr/lib/i386-linux-gnu/libLLVM-6.0.so.1
#4  0xb23581f9 in llvm::cl::OptionCategory::registerCategory() ()
   from /usr/lib/i386-linux-gnu/libLLVM-6.0.so.1
#5  0xb2282f35 in ?? () from /usr/lib/i386-linux-gnu/libLLVM-6.0.so.1
#6  0xb7fe77db in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0xbffff244, 
    env=0xbffff24c) at dl-init.c:72
#7  0xb7fe78de in call_init (env=0xbffff24c, argv=0xbffff244, argc=1, l=<optimized out>)
    at dl-init.c:30
#8  _dl_init (main_map=<optimized out>, argc=1, argv=0xbffff244, env=0xbffff24c)
    at dl-init.c:119
#9  0xb7feb855 in dl_open_worker (a=<optimized out>) at dl-open.c:522
#10 0xb7a7dc20 in __GI__dl_catch_exception (exception=0xbfffe070, 
    operate=0xb7feb390 <dl_open_worker>, args=0xbfffe07c) at dl-error-skeleton.c:196
#11 0xb7feafe6 in _dl_open (file=0xbfffe2d4 "/usr/lib/i386-linux-gnu/dri/swrast_dri.so", 
    mode=-2147483390, caller_dlopen=0xb6c67bf8, nsid=<optimized out>, argc=1, argv=0xbffff244, 
    env=0xbffff24c) at dl-open.c:605
#12 0xb7c27c65 in dlopen_doit (a=0xbfffe27c) at dlopen.c:66
#13 0xb7a7dc20 in __GI__dl_catch_exception (exception=0xbfffe210, 
    operate=0xb7c27bf0 <dlopen_doit>, args=0xbfffe27c) at dl-error-skeleton.c:196
#14 0xb7a7dcd0 in __GI__dl_catch_error (objname=0xc3e918c, errstring=0xc3e9190, 
    mallocedp=0xc3e9188, operate=0xb7c27bf0 <dlopen_doit>, args=0xbfffe27c)
    at dl-error-skeleton.c:215
#15 0xb7c283c1 in _dlerror_run (operate=0xb7c27bf0 <dlopen_doit>, args=0xbfffe27c)
    at dlerror.c:162
#16 0xb7c27d28 in __dlopen (file=0xbfffe2d4 "/usr/lib/i386-linux-gnu/dri/swrast_dri.so", 
    mode=258) at dlopen.c:87
#17 0xb6c67bf8 in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
#18 0xb6c6728a in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
#19 0xb6c4388e in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
#20 0xb6c3f094 in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
#21 0xb6c404a1 in ?? () from /usr/lib/i386-linux-gnu/libGLX_mesa.so.0
#22 0xb77ee4f9 in glXChooseFBConfig () from /usr/lib/i386-linux-gnu/libGLX.so.0
#23 0x0843de24 in ContextGL_X11::initialize () at platform/x11/context_gl_x11.cpp:157
#24 0x084484ba in OS_X11::initialize(OS::VideoMode const&, int, int) ()
    at platform/x11/os_x11.cpp:304
#25 0x08465aa6 in Main::setup2(unsigned long long) () at main/main.cpp:1201
#26 0x0846b97e in Main::setup(char const*, int, char**, bool) () at main/main.cpp:1146
#27 0x08438cd4 in main () at platform/x11/godot_x11.cpp:49
#28 0xb7961e81 in __libc_start_main (main=0x8438c30 <main>, argc=1, argv=0xbffff244, 
    init=0xac6a440 <__libc_csu_init>, fini=0xac6a4b0 <__libc_csu_fini>, 
    rtld_fini=0xb7fe79b0 <_dl_fini>, stack_end=0xbffff23c) at ../csu/libc-start.c:310
#29 0x0843ba74 in _start ()

The multiple segfaults are due to the PRIME detection that we have for X11, but it crashes even if we bypass it with DRI_PRIME=0 (with same backtrace as above).

@akien-mga
Copy link
Member

I found that the export templates seem to work fine even though they're also compiled with use_static_cpp=yes.

So it seems something editor-specific crashes when using -lstatic-libgcc -lstatic-libstdc++, which doesn't affect the runtime.

@akien-mga
Copy link
Member

3.2 RC 1 and later should now work fine on 32-bit systems, they no longer link libgcc and libstbc++ statically.

@akien-mga
Copy link
Member

Reminder to self: use the same workaround for 3.1.3 or rebuild 3.1.2 binaries.

@JezSonic
Copy link
Author

Ok. I will check it soon and write what happened

@JezSonic
Copy link
Author

Not working.
Output here:

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  27
  Current serial number in output stream:  25
X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  27
  Current serial number in output stream:  25
ERROR: initialize: Condition ' ctxErrorOccurred || !p->glx_context ' is true. returned: ERR_UNCONFIGURED
   At: platform/x11/context_gl_x11.cpp:190.
OpenGL ES 2.0 Renderer: ATI RC410
ERROR: initialize: Directional shadow framebuffer status invalid
   At: drivers/gles2/rasterizer_scene_gles2.cpp:4053.
 
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] linux-gate.so.1(__kernel_sigreturn+0) [0xb7edcd14] (??:0)
[2] [0xb7ecb2c3] (??:0)
[3] /usr/lib/i386-linux-gnu/dri/r300_dri.so(+0x4e7f48) [0xb5f3cf48] (??:0)
-- END OF BACKTRACE --
Aborted (core dumped)

@JezSonic
Copy link
Author

Anything else I can write is: system is using packages for i386 architecture, and some programs like steam client and blender crashes. Maybe source of those issues is the hardware.

@akien-mga
Copy link
Member

Indeed, if Steam, Blender and Godot all crash on this system, it's not something we can handle further in Godot. The last backtrace and the GLX errors show that the crash happens in your drivers, which do not properly support OpenGL 2.1. You might have some luck upgrading to the latest version of Mesa available (either via a PPA, or trying Ubuntu Studio 19.10 if they still provide i386 support), but I wouldn't bet on it.

I'll keep this issue open though as the crash described in #31743 (comment) is still valid if using use_static_cpp=yes when compiling Godot for 32-bit Linux (though I could only reproduce it on Ubuntu derivatives).

@JezSonic
Copy link
Author

JezSonic commented Jan 19, 2020 via email

@akien-mga akien-mga modified the milestones: 3.2, 4.0 Jan 19, 2020
@nathanfranke
Copy link
Contributor

When debugging #26887 I added a print_line to the end of OS_Unix::get_ticks_usec() which causes enough overhead to cause this bug. I am on the latest master

@JezSonic
Copy link
Author

JezSonic commented Jan 30, 2020 via email

@KoBeWi
Copy link
Member

KoBeWi commented Dec 14, 2020

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?

@akien-mga
Copy link
Member

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?

I haven't tried but I think the tests I did with early 3.2 in #31743 (comment) would still fail. It's not a Godot bug, but either a Ubuntu or a toolchain one. I'll have to give it another look one day and see if I can make a bug report in Ubuntu or the involved toolchain (not sure if it's GCC, binutils, ld-linux, or for some reason LLVM seems to be involved in my above stacktrace?).

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

Successfully merging a pull request may close this issue.

9 participants