Hello! Thank you for looking into this.
I know nothing about mimalloc bug you've mentioned, but I'd be surprised if
this bug was related to memory allocation, because the error seems to mention
stuff related to parsing the font file (?) in lua (?). Not impossible though.
Yes, I can reproduce, on apt-get-upgrade'd trixie. I have fonts-lmodern
2.005-1. Please check the dpkg -l output yourself in case I misunderstood
something. Here you have the relevant stuff, resulting after failed `context
test.tex` incantation.
% ls -l
total 68
-rw-rw-r-- 1 woju woju 2172 Oct 19 14:58 test-error.log
-rw-rw-r-- 1 woju woju 50634 Oct 19 14:58 test.log
-rw-rw-r-- 1 woju woju 4171 Oct 19 14:58 test.pdf
-rw-rw-r-- 1 woju woju 52 Oct 19 14:57 test.tex
% cat test.tex
\starttext
\bTABLE\bTR\bTD\eTD\eTR\eTABLE
\stoptext
% pdffonts test.pdf
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
WURDFA+LMMonoPropLt10-Regular CID Type 0C Identity-H yes yes yes 1 0
% tail -n50 test.log
fonts > otf loading > loading '/usr/share/texmf/fonts/opentype/public/context-companion-fonts/LatinModernMath-Companion.otf', hash 'latinmodernmath-companion'
otf reader > unknown version '{"pa' in file '/usr/share/texmf/fonts/opentype/public/context-companion-fonts/LatinModernMath-Companion.otf'
fonts > otf loading > loading done
fonts > otf loading > saving '/usr/share/texmf/fonts/opentype/public/context-companion-fonts/LatinModernMath-Companion.otf' in cache
system > lua > compiling '/home/woju/.texlive2025/texmf-var/luametatex-cache/context/f919750633122078d706dd10f1cfd39b/fonts/otl/latinmodernmath-companion.tma' into '/home/woju/.texlive2025/texmf-var/luametatex-cache/context/f919750633122078d706dd10f1cfd39b/fonts/otl/latinmodernmath-companion.tmd'
system > lua > dumping '/home/woju/.texlive2025/texmf-var/luametatex-cache/context/f919750633122078d706dd10f1cfd39b/fonts/otl/latinmodernmath-companion.tma' into '/home/woju/.texlive2025/texmf-var/luametatex-cache/context/f919750633122078d706dd10f1cfd39b/fonts/otl/latinmodernmath-companion.tmd' stripped
fonts > otf loading > loading, optimizing, packing and caching time 0.001
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
mathematics > initializing > font 'LatinModernMath-Companion.otf*tweakreplacealphabets1' doesn't exist
fonts > otf loading > loading '/usr/share/texmf/fonts/opentype/public/context-companion-fonts/LatinModernMath-Companion.otf', hash 'latinmodernmath-companion'
otf reader > unknown version '{"pa' in file '/usr/share/texmf/fonts/opentype/public/context-companion-fonts/LatinModernMath-Companion.otf'
fonts > otf loading > loading done
fonts > otf loading > saving '/usr/share/texmf/fonts/opentype/public/context-companion-fonts/LatinModernMath-Companion.otf' in cache
system > lua > compiling '/home/woju/.texlive2025/texmf-var/luametatex-cache/context/f919750633122078d706dd10f1cfd39b/fonts/otl/latinmodernmath-companion.tma' into '/home/woju/.texlive2025/texmf-var/luametatex-cache/context/f919750633122078d706dd10f1cfd39b/fonts/otl/latinmodernmath-companion.tmd'
system > lua > dumping '/home/woju/.texlive2025/texmf-var/luametatex-cache/context/f919750633122078d706dd10f1cfd39b/fonts/otl/latinmodernmath-companion.tma' into '/home/woju/.texlive2025/texmf-var/luametatex-cache/context/f919750633122078d706dd10f1cfd39b/fonts/otl/latinmodernmath-companion.tmd' stripped
fonts > otf loading > loading, optimizing, packing and caching time 0.001
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
fonts > otf loading > missing specification
mathematics > initializing > font 'LatinModernMath-Companion.otf*tweakreplacealphabets1' doesn't exist
fonts > 'fallback modern rm 12pt' is loaded
tex error > tex error on line 1 in file ./test.tex:
1 >> \starttext
2 \bTABLE\bTR\bTD\eTD\eTR\eTABLE
3 \stoptext
4
% cat test-error.log
return {
["filename"]="./test.tex",
["lastcontext"]="",
["lastluaerror"]="registered function call [254]: /usr/share/texmf/tex/context/base/mkxl/lpdf-lmt.lmt:1681: attempt to perform bitwise operation on a nil value (local 'options')\nstack traceback:\n /usr/share/texmf/tex/context/base/mkxl/lpdf-lmt.lmt:1681: in upvalue 'flushrule'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1659: in upvalue 'vlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1196: in upvalue 'hlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1198: in upvalue 'hlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1198: in upvalue 'hlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1198: in upvalue 'hlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1198: in upvalue 'hlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1625: in upvalue 'vlist_out'\n/usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1196: in upvalue 'hlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1625: in upvalue 'vlist_out'\n ... (skipping 6 levels)\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1196: in upvalue 'hlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1625: in upvalue 'vlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1623: in upvalue 'vlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1623: in upvalue 'vlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1196: in upvalue 'hlist_out'\n/usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1198: in upvalue 'hlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1198: in upvalue 'hlist_out'\n /usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1625: in upvalue 'vlist_out'\n/usr/share/texmf/tex/context/base/mkxl/driv-shp.lmt:1799: in upvalue 'converter'\n /usr/share/texmf/tex/context/base/mkxl/lpdf-lmt.lmt:3719: in upvalue 'convert'\n /usr/share/texmf/tex/context/base/mkxl/driv-ini.lmt:211: in function </usr/share/texmf/tex/context/base/mkxl/driv-ini.lmt:207>\n (...tail calls...)",
["lasttexerror"]="",
["linenumber"]=1,
["offset"]=10,
["skiplinenumber"]=1,
}
% dpkg -l context\* fonts-lmodern liblua\* libmimalloc3 luametatex
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===================-=============================-============-============================================================
ii context 2024.04.01.20240428+dfsg-2 all powerful TeX format
un context-doc-nonfree <none> <none> (no description available)
ii context-modules 20240428-5 all additional ConTeXt modules
un context-nonfree <none> <none> (no description available)
ii fonts-lmodern 2.005-1 all OpenType fonts based on Computer Modern
ii liblua5.1-0:amd64 5.1.5-11 amd64 Shared library for the Lua interpreter version 5.1
ii liblua5.3-0:amd64 5.3.6-2+b4 amd64 Shared library for the Lua interpreter version 5.3
ii liblua5.4-0:amd64 5.4.7-1+b2 amd64 Shared library for the Lua interpreter version 5.4
ii libmimalloc3:amd64 3.0.1+ds-2.1 amd64 compact general purpose allocator with excellent performance
ii luametatex 2.11.02+really2.11.01+ds-1+b1 amd64 Next generation ConTeXt processing engine
The log contains many more stanzas of „initialising > font” plus many „missing
specification” lines. There's a difference in pdffonts output, but I don't
understand it (and I haven't snipped anything, it is this single line). The
error backtrace is familiar.
I've also tested with libmimalloc 3.5.3+ds-1~bpo13+1, the result is the same.
I didn't test anything on forky or other newer packages, should I?
The file in question seems to be intact:
% dpkg -S /usr/share/texmf/fonts/opentype/public/context-companion-fonts/LatinModernMath-Companion.otf
context-modules: /usr/share/texmf/fonts/opentype/public/context-companion-fonts/LatinModernMath-Companion.otf
% dpkg -V context-modules
% sha256sum /usr/share/texmf/fonts/opentype/public/context-companion-fonts/LatinModernMath-Companion.otf
6b47afe0388d8f4a0a10872102ba40464f30be3c3409f37ab493b5b13c3fc61f /usr/share/texmf/fonts/opentype/public/context-companion-fonts/LatinModernMath-Companion.otf
Probably because in clean docker, in which I've performed the original test,
you need to generate the format during compilation of the first document.
Unless shown otherwise, I'd concur this should be irrelevant. In any case,
I've tested also after `mtxrun --generate`, same thing happens every time.
Thank you again,