segfault on build-testing luatex
Dear luatex masters! I am trying to hunt down a build failure on Debian. We are building of the sources from svn 44572, which is practically the released version of TL2017. When building normally nothing happens, all works out well. But when building using the Debian rules files I see an error on testing in luaimage.test, namely at the first line: ./luatex -ini luaimage || exit 1 The log file does not contain anything but: ... This is LuaTeX, Version 1.0.4 (TeX Live 2017/Debian) (INITEX) restricted system commands enabled. ../../../texk/web2c/luatexdir/tests/luaimage.tex (../../../texk/web2c/tests/basic.tex Preloading the plain format: codes, registers, parameters, macros, math definitions, output routines, hyphenation)) Beginning to dump on file luaimage.fmt (format=luaimage 2017.8.7) 2374 strings using 6763 bytes 10085 memory locations dumped; current usage is 132&5003 1335 multiletter control sequences \font\nullfont=nullfont 0 preloaded fonts No pages of output. Transcript written on luaimage.log. Segmentation fault Now the funny part is the "Segmentation fault" at the end ...which is really a pain, because everything worked out properly. I have put into the luaimage.test file a line `set' to see the complete environment, and copied it. After some adaptions (see below) and running it I get no errors and successful builds The only things I changed are converting local path (../../../texk/web2c/luatexdir/) to absoilute path (/home/norbert/.......). Nothing else. And with this minuscule change I get a proper compilation. So I am really completely surprised about what could go wrong, and why luatex does not report any errors. Note that I also added --debug-format to the failing luatex invocation, but there was no change in output. Does anyone have any idea how to debug this? Why does luatex properly dump a format and then die? Thanks for any suggestions! (and please keep Cc) Norbert -- PREINING Norbert http://www.preining.info Accelia Inc. + JAIST + TeX Live + Debian Developer GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
On 8/7/2017 3:09 PM, Norbert Preining wrote:
Dear luatex masters!
I am trying to hunt down a build failure on Debian. We are building of the sources from svn 44572, which is practically the released version of TL2017.
When building normally nothing happens, all works out well. But when building using the Debian rules files I see an error on testing in luaimage.test, namely at the first line: ./luatex -ini luaimage || exit 1 The log file does not contain anything but: ... This is LuaTeX, Version 1.0.4 (TeX Live 2017/Debian) (INITEX) restricted system commands enabled. ../../../texk/web2c/luatexdir/tests/luaimage.tex (../../../texk/web2c/tests/basic.tex Preloading the plain format: codes, registers, parameters, macros, math definitions, output routines, hyphenation))
Beginning to dump on file luaimage.fmt (format=luaimage 2017.8.7) 2374 strings using 6763 bytes 10085 memory locations dumped; current usage is 132&5003 1335 multiletter control sequences \font\nullfont=nullfont 0 preloaded fonts No pages of output. Transcript written on luaimage.log. Segmentation fault
Now the funny part is the "Segmentation fault" at the end ...which is really a pain, because everything worked out properly.
I have put into the luaimage.test file a line `set' to see the complete environment, and copied it. After some adaptions (see below) and running it I get no errors and successful builds
The only things I changed are converting local path (../../../texk/web2c/luatexdir/) to absoilute path (/home/norbert/.......). Nothing else. And with this minuscule change I get a proper compilation.
So I am really completely surprised about what could go wrong, and why luatex does not report any errors. Note that I also added --debug-format to the failing luatex invocation, but there was no change in output.
Does anyone have any idea how to debug this?
Why does luatex properly dump a format and then die?
Thanks for any suggestions!
Can you try 1.05 ? I don't get a crash here (i tested windows as well as bash on windows) and assumed that basic.tex sets catcodes (i could somehow google luaimage.tex). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi Norbert,
./luatex -ini luaimage || exit 1 The log file does not contain anything but: ... Transcript written on luaimage.log. Segmentation fault
Related to gcc-7.1? http://tug.org/pipermail/tex-live/2017-June/040192.html Hironobu
Related to gcc-7.1? http://tug.org/pipermail/tex-live/2017-June/040192.html
Ahh, sounds reasonable ... will try tomorrow, time for bed. Thanks!!!! Norbert -- PREINING Norbert http://www.preining.info Accelia Inc. + JAIST + TeX Live + Debian Developer GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
On Mon, Aug 7, 2017 at 4:17 PM, Norbert Preining
Related to gcc-7.1? http://tug.org/pipermail/tex-live/2017-June/040192.html
Ahh, sounds reasonable .
OK I see it with gcc 7.1 and -O3 , but not with -O0 It happens when luatex exits and closes the state L; the garbage collector calls the pending finalizers and luaffi fails. I am working on the luaffi code, it could be that will aply the patch. (gdb) fr 1 #1 check_cdata (L=L@entry=0x30e8b90, idx=idx@entry=1, ct=ct@entry=0x7fff8b5aed30) at ../../../source/texk/web2c/luatexdir/luaffi/ctype.c:266 266 void* p = to_cdata(L, idx, ct); (gdb) fr 2 #2 0x00000000006845d5 in cdata_gc (L=0x30e8b90) at ../../../source/texk/web2c/luatexdir/luaffi/ffi.c:1429 1429 check_cdata(L, 1, &ct); (gdb) fr 3 #3 0x00000000006a9ea8 in luaD_precall (L=L@entry=0x30e8b90, func=<optimized out>, nresults=0) at ../../../source/libs/lua52/lua52-src/src/ldo.c:319 319 n = (*f)(L); /* do the actual call */ (gdb) fr 4 #4 0x00000000006aa582 in luaD_call (L=0x30e8b90, func=<optimized out>, nResults=<optimized out>, allowyield=<optimized out>) at ../../../source/libs/lua52/lua52-src/src/ldo.c:401 401 if (!luaD_precall(L, func, nResults)) /* is a Lua function? */ (gdb) fr 5 #5 0x00000000006a9599 in luaD_rawrunprotected (L=0x30e8b90, f=0x6abc30 <dothecall>, ud=0x0) at ../../../source/libs/lua52/lua52-src/src/ldo.c:131 131 LUAI_TRY(L, &lj, (gdb) fr 6 #6 0x00000000006aa933 in luaD_pcall (L=L@entry=0x30e8b90, func=func@entry=0x6abc30 <dothecall>, u=u@entry=0x0, old_top=896, ef=ef@entry=0) at ../../../source/libs/lua52/lua52-src/src/ldo.c:603 603 status = luaD_rawrunprotected(L, func, u); (gdb) fr 7 #7 0x00000000006ad750 in GCTM (propagateerrors=0, L=0x30e8b90) at ../../../source/libs/lua52/lua52-src/src/lgc.c:824 824 status = luaD_pcall(L, dothecall, NULL, savestack(L, L->top - 2), 0); (gdb) fr 8 #8 callallpendingfinalizers (propagateerrors=<optimized out>, L=<optimized out>) at ../../../source/libs/lua52/lua52-src/src/lgc.c:978 978 GCTM(L, propagateerrors); (gdb) fr 9 #9 luaC_freeallobjects (L=L@entry=0x30e8b90) at ../../../source/libs/lua52/lua52-src/src/lgc.c:988 988 callallpendingfinalizers(L, 0); (gdb) fr 10 #10 0x00000000006b7677 in close_state (L=0x30e8b90) at ../../../source/libs/lua52/lua52-src/src/lstate.c:226 226 luaC_freeallobjects(L); /* collect all objects */ (gdb) fr 11 #11 lua_close (L=0x30e8b90) at ../../../source/libs/lua52/lua52-src/src/lstate.c:320 320 close_state(L); (gdb) fr 12 #12 0x0000000000476ff6 in do_final_end () at ../../../source/texk/web2c/luatexdir/tex/errors.w:223 223 lua_close(Luas); /* new per 0.99 */ (gdb) fr 13 #13 0x0000000000447abe in main (ac=<optimized out>, av=<optimized out>) at ../../../source/texk/web2c/luatexdir/luatex.c:582 582 main_body(); -- luigi
Related to gcc-7.1? http://tug.org/pipermail/tex-live/2017-June/040192.html
Ahh, sounds reasonable ... will try tomorrow, time for bed.
Confirmed that the patch fixes it, at leasts for now. THanks Norbert -- PREINING Norbert http://www.preining.info Accelia Inc. + JAIST + TeX Live + Debian Developer GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
participants (4)
-
Hans Hagen
-
Hironobu Yamashita
-
luigi scarso
-
Norbert Preining