Bug 103915 - Undertale crashes on startup (compiling shaders?)
Summary: Undertale crashes on startup (compiling shaders?)
Status: NEW
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: 17.2
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on: 105797
Blocks: 77449
  Show dependency treegraph
 
Reported: 2017-11-26 12:27 UTC by John Steele Scott
Modified: 2018-08-13 14:19 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
thread apply all bt full (74.65 KB, text/plain)
2017-11-26 12:27 UTC, John Steele Scott
Details
thread apply all bt full with git master 043d14db30. (76.21 KB, text/plain)
2017-11-27 11:34 UTC, John Steele Scott
Details
apitrace of Undertale startup taken on box with Iris 540 & Mesa 17.2.4. (1.87 MB, application/octet-stream)
2017-11-28 22:00 UTC, John Steele Scott
Details
Backtrace of Undertale / YoYo Game Linux Runner just before crash (8.86 KB, text/plain)
2018-01-22 13:33 UTC, Alexander Schlarb
Details
API trace warnings of game startup (7.25 KB, text/plain)
2018-01-22 13:34 UTC, Alexander Schlarb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Steele Scott 2017-11-26 12:27:48 UTC
Created attachment 135727 [details]
thread apply all bt full

Mesa 17.2.6 self-compiled, running on Debian Stretch
OpenGL renderer string: AMD Radeon (TM) RX 480 Graphics (AMD POLARIS10 / DRM 3.10.0 / 4.11.0-0.bpo.1-amd64, LLVM 5.0.0)

I picked up Undertale <http://store.steampowered.com/app/391540/Undertale/> today, tried to play it but it crashes on startup with the following backtrace:

Core was generated by `/pool/toojays/steam/SteamApps/common/Undertale/runner'.
Program terminated with signal SIGSEGV, Segmentation fault.

Thread 9 (Thread 0xe817fb40 (LWP 28800)):
#0  0xf775bc89 in __kernel_vsyscall ()
#1  0xf73fcb9b in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xef9a21da in cnd_wait (mtx=0xa74e410, cond=0xa74e428) at ../../include/c11/threads_posix.h:159
#3  util_queue_thread_func (input=0xa5a98a8) at u_queue.c:171
#4  0xf73f727a in start_thread (arg=0xe817fb40) at pthread_create.c:333
#5  0xf6f12b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 8 (Thread 0xe91e1b40 (LWP 28798)):
#0  0xf775bc89 in __kernel_vsyscall ()
#1  0xf73fcb9b in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xef9a21da in cnd_wait (mtx=0xa6b2324, cond=0xa6b233c) at ../../include/c11/threads_posix.h:159
#3  util_queue_thread_func (input=0xa5d1580) at u_queue.c:171
#4  0xf73f727a in start_thread (arg=0xe91e1b40) at pthread_create.c:333
#5  0xf6f12b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 7 (Thread 0xebb5eb40 (LWP 28793)):
#0  0xf775bc89 in __kernel_vsyscall ()
#1  0xf73fcb9b in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xef9a21da in cnd_wait (mtx=0xa6b1874, cond=0xa6b188c) at ../../include/c11/threads_posix.h:159
#3  util_queue_thread_func (input=0xa5cf958) at u_queue.c:171
#4  0xf73f727a in start_thread (arg=0xebb5eb40) at pthread_create.c:333
#5  0xf6f12b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 6 (Thread 0xf6be5700 (LWP 28792)):
#0  0xf775bc89 in __kernel_vsyscall ()
#1  0xf73fcb9b in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xef9a258a in cnd_wait (mtx=0xa7ac650, cond=0xa7ac668) at ../../include/c11/threads_posix.h:159
#3  util_queue_fence_wait (fence=0xa7ac650) at u_queue.c:106
#4  0xefbf991c in si_shader_select_with_key (sscreen=0xa6b1e50, state=state@entry=0xa6cd97c, compiler_state=compiler_state@entry=0xffea3dec, key=0xffea3ca4, thread_index=-1) at si_state_shaders.c:1596
#5  0xefbfa3c9 in si_shader_select (ctx=ctx@entry=0xa6ccec0, state=state@entry=0xa6cd97c, compiler_state=compiler_state@entry=0xffea3dec) at si_state_shaders.c:1753
#6  0xefbfc76f in si_update_shaders (sctx=0xa6ccec0) at si_state_shaders.c:3222
#7  0xefbf45e6 in si_draw_vbo (ctx=<optimized out>, info=<optimized out>) at si_state_draw.c:1266
#8  0xefaa2f91 in util_draw_arrays (start=0, count=3, mode=PIPE_PRIM_MAX, pipe=0xa6ccec0) at ./util/u_draw.h:66
#9  util_draw_vertex_buffer (pipe=0xa6ccec0, cso=0x0, vbuf=0xa7ac4a0, vbuf_slot=0, offset=0, prim_type=15, num_verts=3, num_attribs=2) at util/u_draw_quad.c:68
#10 0xefc32c6d in r600_draw_rectangle (blitter=0xa6976f0, x1=0, y1=0, x2=640, y2=480, depth=1, type=UTIL_BLITTER_ATTRIB_COLOR, attrib=0xa74e56c) at r600_pipe_common.c:239
#11 0xefa9f22b in util_blitter_clear_custom (blitter=0xa6976f0, width=640, height=480, num_layers=1, clear_buffers=7, color=0xa74e56c, depth=1, stencil=0, custom_dsa=0x0, custom_blend=0x0) at util/u_blitter.c:1406
#12 0xefa9f333 in util_blitter_clear (blitter=<optimized out>, width=<optimized out>, height=<optimized out>, num_layers=<optimized out>, clear_buffers=<optimized out>, color=<optimized out>, depth=<optimized out>, stencil=0) at util/u_blitter.c:1422
#13 0xefbc2102 in si_clear (ctx=0xa6ccec0, buffers=<optimized out>, color=0xa74e56c, depth=1, stencil=0) at si_blit.c:893
#14 0xefac48e1 in tc_call_clear (pipe=0xa6ccec0, payload=0xa74e568) at util/u_threaded_context.c:2073
#15 0xefac51bf in tc_batch_execute (thread_index=0, job=0xa74e4c0) at util/u_threaded_context.c:94
#16 _tc_sync (tc=tc@entry=0xa74e220, func=<optimized out>, info=<optimized out>) at util/u_threaded_context.c:185
#17 0xefac7777 in tc_texture_subdata (_pipe=0xa74e220, resource=0xa7a8ad0, level=0, usage=0, box=0xffea4208, data=0xa7a83d0, stride=64, layer_stride=1024) at util/u_threaded_context.c:1631
#18 0xef8ae3ba in st_TexSubImage (ctx=0xa756088, dims=2, texImage=<optimized out>, xoffset=0, yoffset=<optimized out>, zoffset=0, width=16, height=<optimized out>, depth=1, format=6408, type=5121, pixels=0xa7a83d0, unpack=0xa76e830) at state_tracker/st_cb_texture.c:1418
#19 0xef8afe6c in st_TexImage (ctx=0xa756088, dims=2, texImage=0xa6b8ab8, format=6408, type=5121, pixels=0xa7a83d0, unpack=0xa76e830) at state_tracker/st_cb_texture.c:1635
#20 0xef831165 in teximage (no_error=false, pixels=0xa7a83d0, imageSize=0, type=5121, format=6408, border=0, depth=<optimized out>, height=<optimized out>, width=<optimized out>, internalFormat=6408, level=0, target=3553, dims=2, compressed=0 '\000', ctx=0xa756088) at main/teximage.c:3055
#21 teximage_err (ctx=0xa756088, compressed=compressed@entry=0 '\000', dims=dims@entry=2, target=3553, level=0, internalFormat=<optimized out>, width=16, height=16, depth=1, border=<optimized out>, format=6408, type=5121, imageSize=0, pixels=0xa7a83d0) at main/teximage.c:3081
#22 0xef83310a in _mesa_TexImage2D (target=3553, level=0, internalFormat=6408, width=16, height=16, border=0, format=6408, type=5121, pixels=0xa7a83d0) at main/teximage.c:3119
#23 0x08303d5d in ?? ()
#24 0x08302a5e in ?? ()
#25 0x08303c2e in ?? ()
#26 0x083027c4 in ?? ()
#27 0x0830287f in ?? ()
#28 0x082fd629 in ?? ()
#29 0x081001fa in ?? ()
#30 0x081be8c3 in ?? ()
#31 0x082f7eda in ?? ()
#32 0x0831d356 in ?? ()
#33 0xf6e43276 in __libc_start_main (main=0x831d180, argc=1, argv=0xffea5c14, init=0x8351350, fini=0x83513c0, rtld_fini=0xf776d080 <_dl_fini>, stack_end=0xffea5c0c) at ../csu/libc-start.c:291
#34 0x08051525 in ?? ()

Thread 5 (Thread 0xe89e0b40 (LWP 28799)):
#0  0xf775bc89 in __kernel_vsyscall ()
#1  0xf73fcb9b in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xef9a21da in cnd_wait (mtx=0xa6b2324, cond=0xa6b233c) at ../../include/c11/threads_posix.h:159
#3  util_queue_thread_func (input=0xa5ad7f0) at u_queue.c:171
#4  0xf73f727a in start_thread (arg=0xe89e0b40) at pthread_create.c:333
#5  0xf6f12b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 4 (Thread 0xe99e2b40 (LWP 28797)):
#0  0xec2e3fc0 in llvm::VectorType::get(llvm::Type*, unsigned int) () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#1  0xec21926c in LLVMVectorType () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#2  0xefc4dee5 in ac_llvm_context_init (ctx=0xe99e10f8, context=0xa5720f8, chip_class=VI) at common/ac_llvm_build.c:68
#3  0xefbe995f in si_llvm_context_init (ctx=<optimized out>, sscreen=<optimized out>, tm=<optimized out>) at si_shader_tgsi_setup.c:1196
#4  0xefbd37aa in si_init_shader_ctx (ctx=ctx@entry=0xe99e03b0, sscreen=sscreen@entry=0xa6b1e50, tm=tm@entry=0xa6b92d8) at si_shader.c:5371
#5  0xefbe085d in si_compile_tgsi_shader (sscreen=0xa6b1e50, tm=0xa6b92d8, shader=0xe7400470, is_monolithic=false, debug=0x0) at si_shader.c:6147
#6  0xefbf9b8c in si_init_shader_selector_async (job=0xa7ab748, thread_index=2) at si_state_shaders.c:1840
#7  0xef9a228b in util_queue_thread_func (input=0xa5a98a8) at u_queue.c:187
#8  0xf73f727a in start_thread (arg=0xe99e2b40) at pthread_create.c:333
#9  0xf6f12b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 3 (Thread 0xea1e3b40 (LWP 28796)):
#0  __libc_message (do_abort=<optimized out>, fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:152
#1  0xf6e98fb7 in malloc_printerr (action=<optimized out>, str=0xf6f88d80 "free(): invalid pointer", ptr=<optimized out>, ar_ptr=0xf6fdf780 <main_arena>) at malloc.c:5049
#2  0xf6e997f6 in _int_free (av=0xf6fdf780 <main_arena>, p=0xef67e9fd <llvm::AllAnalysesOn<llvm::LazyCallGraph::SCC>::SetKey+5>, have_lock=0) at malloc.c:3905
#3  0x0834ff7f in operator delete(void*) ()
#4  0xec2a039c in void std::vector<std::pair<void const*, llvm::Pass*>, std::allocator<std::pair<void const*, llvm::Pass*> > >::_M_emplace_back_aux<std::pair<void const*, llvm::Pass*> const&>(std::pair<void const*, llvm::Pass*> const&) () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#5  0xec2a4bbb in llvm::PMDataManager::initializeAnalysisImpl(llvm::Pass*) () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#6  0xecf07c45 in ?? () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#7  0xec2a9f2a in llvm::legacy::PassManagerImpl::run(llvm::Module&) () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#8  0xec2aa10f in llvm::legacy::PassManager::run(llvm::Module&) () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#9  0xec22514c in LLVMRunPassManager () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#10 0xefbea0ec in si_llvm_optimize_module (ctx=0xea1e13b0) at si_shader_tgsi_setup.c:1420
#11 0xefbe0964 in si_compile_tgsi_shader (sscreen=0xa6b1e50, tm=0xa6b8cf0, shader=0xe7700470, is_monolithic=false, debug=0x0) at si_shader.c:6341
#12 0xefbf9b8c in si_init_shader_selector_async (job=0xa7a6758, thread_index=1) at si_state_shaders.c:1840
#13 0xef9a228b in util_queue_thread_func (input=0xa5ad7f0) at u_queue.c:187
#14 0xf73f727a in start_thread (arg=0xea1e3b40) at pthread_create.c:333
#15 0xf6f12b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 2 (Thread 0xeb21cb40 (LWP 28794)):
#0  0xf775bc89 in __kernel_vsyscall ()
#1  0xf73fcb9b in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S:187
#2  0xef9a21da in cnd_wait (mtx=0xa6b5bd0, cond=0xa6b5be8) at ../../include/c11/threads_posix.h:159
#3  util_queue_thread_func (input=0xa599ec8) at u_queue.c:171
#4  0xf73f727a in start_thread (arg=0xeb21cb40) at pthread_create.c:333
#5  0xf6f12b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110

Thread 1 (Thread 0xea9e4b40 (LWP 28795)):
#0  0xecd20da0 in ?? () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#1  0xec2a951b in llvm::FPPassManager::runOnFunction(llvm::Function&) () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#2  0xec2a95b2 in llvm::FPPassManager::runOnModule(llvm::Module&) () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#3  0xec2a9f2a in llvm::legacy::PassManagerImpl::run(llvm::Module&) () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#4  0xec2aa10f in llvm::legacy::PassManager::run(llvm::Module&) () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#5  0xed37e09f in ?? () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#6  0xed37e260 in LLVMTargetMachineEmitToMemoryBuffer () from /usr/lib/i386-linux-gnu/libLLVM-5.0.so.1
#7  0xefbe8597 in si_llvm_compile (M=0xe76015c8, binary=0xe760052c, tm=0xa6b78e8, debug=0x0) at si_shader_tgsi_setup.c:134
#8  0xefbdf395 in si_compile_llvm (sscreen=sscreen@entry=0xa6b1e50, binary=binary@entry=0xe760052c, conf=conf@entry=0xe7600560, tm=0xa6b78e8, mod=0xe76015c8, debug=0x0, processor=1, name=0xefd11a3c "TGSI shader") at si_shader.c:5070
#9  0xefbe0abf in si_compile_tgsi_shader (sscreen=0xa6b1e50, tm=0xa6b78e8, shader=0xe7600470, is_monolithic=false, debug=0x0) at si_shader.c:6351
#10 0xefbf9b8c in si_init_shader_selector_async (job=0xa7a54e0, thread_index=0) at si_state_shaders.c:1840
#11 0xef9a228b in util_queue_thread_func (input=0xa5a98a8) at u_queue.c:187
#12 0xf73f727a in start_thread (arg=0xea9e4b40) at pthread_create.c:333
#13 0xf6f12b56 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:110


Full backtrace attached.
FWIW it launches okay on my laptop running Ubuntu 16.04 / Mesa 17.2.4 / Iris Graphics 540.
Comment 1 fin4478 2017-11-26 12:52:22 UTC Comment hidden (spam)
Comment 2 Nicolai Hähnle 2017-11-27 10:55:21 UTC
Thanks for the report, that does indeed look like a bug while compiling a shader.

Could you try if it also happens with Mesa master?

If yes, could you provide an apitrace?

If no, you could use `git bisect` to find the commit that fixed the bug.
Comment 3 John Steele Scott 2017-11-27 11:34:54 UTC
Created attachment 135736 [details]
thread apply all bt full with git master 043d14db30.
Comment 4 John Steele Scott 2017-11-27 12:42:53 UTC
(In reply to Nicolai Hähnle from comment #2)
> Could you try if it also happens with Mesa master?

The crash is still happening with master 043d14db30. Backtrace is similar but slightly different, I've updated the attachment in comment 3.

> If yes, could you provide an apitrace?

I didn't have any luck here. I built a 32-bit build of apitrace, then set the steam launch options to "/home/toojays/src/apitrace/build/apitrace trace %command%". This resulted in a trace file containing two bytes: "at".

Likewise when I tried launching steam like:
  DEBUGGER="/home/toojays/src/apitrace/build/apitrace trace --verbose" steam steam://rungameid/391540

I also tried running Undertale directly like:

LD_LIBRARY_PATH=/home/toojays/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu:./lib ~/src/apitrace/build/apitrace trace ./runner

Still no good.

I can see from the core that apitrace had some data for us, but for some reason it couldn't get it out in time?

Thread 2 (Thread 0xf7009740 (LWP 18275)):
#0  snappy::internal::CompressFragment (input=<optimized out>, input_size=<optimized out>, op=<optimized out>, table=<optimized out>, table_size=<optimized out>) at /home/toojays/src/apitrace/thirdparty/snappy/snappy.cc:511
#1  0xf7ce0f4f in snappy::Compress (reader=0xffa35974, writer=0xffa3596c) at /home/toojays/src/apitrace/thirdparty/snappy/snappy.cc:876
#2  0xf7ce153b in snappy::RawCompress (input=0xf042e008 "\006\006\fprocess.name5/pool/toojays/steam/SteamApps/common/Undertale/runner", input_length=147412, compressed=0xf0303008 "\324\377\b\220\006\006\fprocess.name5/pool/toojays/steam/S\001\006\360\266Apps/common/Undertale/runner", compressed_length=0xffa359bc) at /home/toojays/src/apitrace/thirdparty/snappy/snappy.cc:1214
#3  0xf7cdc6c7 in SnappyOutStream::flushWriteCache (this=0x8c13f08) at /home/toojays/src/apitrace/lib/trace/trace_ostream_snappy.cpp:175
#4  0xf7cdca1f in SnappyOutStream::flush (this=0x8c13f08) at /home/toojays/src/apitrace/lib/trace/trace_ostream_snappy.cpp:163
#5  0xf7cdb561 in trace::LocalWriter::flush (this=0xf7f0b4e0 <trace::localWriter>) at /home/toojays/src/apitrace/lib/trace/trace_writer_local.cpp:243
#6  0xf7cdb59c in trace::exceptionCallback () at /home/toojays/src/apitrace/lib/trace/trace_writer_local.cpp:61
#7  0xf7cdcd13 in os::signalHandler (sig=11, info=0xffa35b0c, context=0xffa35b8c) at /home/toojays/src/apitrace/lib/os/os_posix.cpp:337
#8  <signal handler called>
#9  0x0834ed9c in ?? ()
#10 0x0834fb14 in operator new(unsigned int) ()
#11 0xefaf10a2 in ir_variable_refcount_visitor::get_variable_entry (this=0xffa360fc, var=0x9106e88) at glsl/ir_variable_refcount.cpp:86
#12 0xefaf1100 in ir_variable_refcount_visitor::visit (this=0xffa360fc, ir=0x9106e88) at glsl/ir_variable_refcount.cpp:97
#13 0xefaed8bb in visit_list_elements (v=0xffa360fc, l=0x910531c, statement_list=true) at glsl/ir_hv_accept.cpp:55
#14 0xefaed6fe in ir_hierarchical_visitor::run (this=0xffa360fc, instructions=0x910531c) at glsl/ir_hierarchical_visitor.cpp:364
#15 0xefb8f586 in do_dead_code (instructions=0x910531c, uniform_locations_assigned=false) at glsl/opt_dead_code.cpp:51
#16 0xefb8f796 in do_dead_code_unlinked (instructions=0x8e845e0) at glsl/opt_dead_code.cpp:190
#17 0xefacece4 in do_common_optimization (ir=0x8e845e0, linked=false, uniform_locations_assigned=false, options=0x8dddde4, native_integers=true) at glsl/glsl_parser_extras.cpp:2213
#18 0xefacf0e5 in opt_shader_and_create_symbol_table (ctx=ctx@entry=0x8ddd448, source_symbols=source_symbols@entry=0x0, shader=shader@entry=0x8e7ba60) at glsl/glsl_parser_extras.cpp:1986
#19 0xefacf8a1 in _mesa_glsl_compile_shader (ctx=0x8ddd448, shader=0x8e7ba60, dump_ast=false, dump_hir=false, force_recompile=true) at glsl/glsl_parser_extras.cpp:2069
#20 0xefb94273 in compile_shaders (ctx=ctx@entry=0x8ddd448, prog=<optimized out>, prog=<optimized out>) at glsl/shader_cache.cpp:73
#21 0xefb97381 in shader_cache_read_program_metadata (ctx=<optimized out>, prog=<optimized out>) at glsl/shader_cache.cpp:1369
#22 0xefb09584 in link_shaders (ctx=0x8ddd448, prog=0x910e9e8) at glsl/linker.cpp:4771
#23 0xefa58325 in _mesa_glsl_link_shader (ctx=0x8ddd448, prog=0x910e9e8) at program/ir_to_mesa.cpp:3081
#24 0xef97798f in link_program (no_error=<optimized out>, shProg=<optimized out>, ctx=<optimized out>) at main/shaderapi.c:1171
#25 link_program_error (ctx=0x8ddd448, shProg=0x910e9e8) at main/shaderapi.c:1249
#26 0xf7cd357a in glLinkProgram (program=12) at /home/toojays/src/apitrace/build/wrappers/glxtrace.cpp:32011
#27 0x08306749 in ?? ()
#28 0x08306c52 in ?? ()
#29 0x08306cca in ?? ()
#30 0x082fff75 in ?? ()
#31 0x082fd633 in ?? ()
#32 0x081001fa in ?? ()
#33 0x081be8c3 in ?? ()
#34 0x082f7eda in ?? ()
#35 0x0831d356 in ?? ()
#36 0xf7267276 in __libc_start_main (main=0x831d180, argc=1, argv=0xffa37a14, init=0x8351350, fini=0x83513c0, rtld_fini=0xf7f26080 <_dl_fini>, stack_end=0xffa37a0c) at ../csu/libc-start.c:291
#37 0x08051525 in ?? ()


Any ideas?
Comment 5 John Steele Scott 2017-11-28 22:00:58 UTC
Created attachment 135784 [details]
apitrace of Undertale startup taken on box with Iris 540 & Mesa 17.2.4.

My attempts to take an apitrace in comment 4 were on the box with the RX 480. Here's an apitrace of Undertale's startup taken on my laptop with the Iris 540.

Replaying this trace on the RX 480 does not cause a crash though.

Is this any use?
Comment 6 Alexander Schlarb 2018-01-22 13:32:35 UTC
Hi! Just wanted to report that I'm also affected by this issue.

I own an Undertale DRM-free edition from Humble Store and it crashes on startup. Running `apitrace` also only produces the word "on".

However I found that at least once before it crashed the following message was printed to the terminal window:

    LLVM ERROR: Unknown specifier in datalayout string

This error message seems to originate from line 395 of this file in LLVM:
http://llvm.org/doxygen/DataLayout_8cpp_source.html

I have therefore attached a backtrace of `gdb` with `break llvm::DataLayout::parseSpecifier` just before the crash (there is also a pointer to a "shader" mentioned several times in the trace, but it doesn't appear to be a string and I'm not sure how to extract it unfortunately; if I can do better please just ask).

Running the game using `LIBGL_ALWAYS_SOFTWARE=1` works without issues and if I take an `apitrace` of this and replay it there are no crashes, but lots of LLVM diagnostic warnings. I have attached those as well.

Also if a developer is willing to have a look at this I'm willing to sponsor a (DRM-free) copy of the game.
Comment 7 Alexander Schlarb 2018-01-22 13:33:14 UTC
Created attachment 136894 [details]
Backtrace of Undertale / YoYo Game Linux Runner just before crash
Comment 8 Alexander Schlarb 2018-01-22 13:34:27 UTC
Created attachment 136895 [details]
API trace warnings of game startup
Comment 9 Alexander Schlarb 2018-01-22 13:38:49 UTC
BTW: I should also probably mention my hardware & software:

 * Radeon R9 M280X (BonaireXT)
 * Linux 4.14.0-3-amd64
 * Debian unstable
 * Mesa 17.3.3
 * DRM 3.19.0
 * LLVM 5.0.1 from http://apt.llvm.org/ (also tested with Debian default LLVM)
 * apitrace 7.1+git20170623.d38a69d6+repack-3
Comment 10 Martin Jørgensen 2018-01-27 08:28:47 UTC
I've got the same issue with undertale running on AMD POLARIS10 and latest Debian Testing + liquorix 4.14 kernel. Tried using both Mesa 17.2 and 17.3 from Debian repos.

My Undertale game crashes on start with a segfault and produces this dmesg:

[98053.492153] si_shader:2[6898]: segfault at 9 ip 00000000eef3da0c sp 00000000ec1fc8dc error 4 in libLLVM-5.0.so.1[ee938000+37f2000]

Also, my Hollow Knight game also produces this line, but seems to work despite of it:

[98117.334979] hollow_knight.x[6938]: segfault at 7f5e52ff53b0 ip 00007f5e411d3850 sp 00007ffe6ad4cc28 error 4 in libLLVM-5.0.so.1[7f5e40978000+3245000]


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.