[NTG-context] context (lmtx) segfaults on x86_64 linux

Vladimir Lomov lomov.vl at yandex.ru
Wed Sep 11 10:14:43 CEST 2019


Hello,
** Hans Hagen [2019-09-11 08:39:03 +0200]:

>
>> but I explicitly set TEXMFCACHE=$HOME/.cache/lmtx (for context suite I
>> set it to $HOME/.cache/context-suite).
>
>>> I'm receiving the super helpful error message:
>>>
>>>      ! error (lua): function call: no
>>>
>>> Maybe some sort of cache versioning is in order to at least give a better error.
>>
>> It didn't occured to me that the problem may be with the cache, it would
>> be helpfull if context/luametatex will give error message, something
>> like "cache version mismatch" and exit.

> hm, i have the same cache for both (different files are used)

That's strange. AFAIR, I splitted the caches because they were different
and I checked this again: I deleted TEXMFCACHE directories (lmtx and
context-suite ones), regenerated both using

  $ mtxrun --generate; context --make

(using the right mtxrun,
/usr/local/opt/context/tex/texmf-linux-64/bin/mtxrun and
/usr/local/opt/lmtx/tex/texmf-linux-64/bin/mtxrun in my case) and
checked the generated files. They have identical names, for example,

CONTEXT SUITE:

-------------------------------------- 8< --------------------------------------
$ tree $TEXMFCACHE | sed -e "s@$HOME/.cache/@@"
context-suite
└── luatex-cache
    └── context
        └── 5fe67e0bfe781ce0dde776fb1556f32e
            ├── formats
            │   └── luatex
            │       ├── cont-en.fmt
            │       ├── cont-en.log
            │       ├── cont-en.lui
            │       └── cont-en.luv
            └── trees
                ├── 3952aa25b6a1b9f9f8d3eeb6e65f0039.lua
                ├── 3952aa25b6a1b9f9f8d3eeb6e65f0039.luc
                ├── 3f406286dc3075cdfb044f836920f46a.lua
                ├── 3f406286dc3075cdfb044f836920f46a.luc
                ├── 3f6978edf9feb817ad6c1f21fc262031.lua
                ├── 3f6978edf9feb817ad6c1f21fc262031.luc
                ├── 71c82419867f9a0df8a150196c03c86f.lua
                ├── 71c82419867f9a0df8a150196c03c86f.luc
                ├── 73630a261795d9c53610a28af4550cbc.lua
                ├── 73630a261795d9c53610a28af4550cbc.luc
                ├── dcb651482955ac31eaab7723b70e0184.lua
                ├── dcb651482955ac31eaab7723b70e0184.luc
                ├── fb39a92c95ceca857c3f2d0ee48a2ad3.lua
                └── fb39a92c95ceca857c3f2d0ee48a2ad3.luc

6 directories, 18 files
-------------------------------------- 8< --------------------------------------


-------------------------------------- 8< --------------------------------------
LANG=en_US.UTF-8 ls -goR $TEXMFCACHE/ | sed -e "s@$HOME/.cache/@@"
context-suite/:
total 0
drwxr-xr-x 3 21 Sep 11 15:28 luatex-cache

context-suite/luatex-cache:
total 0
drwxr-xr-x 3 46 Sep 11 15:28 context

context-suite/luatex-cache/context:
total 0
drwxr-xr-x 4 34 Sep 11 15:28 5fe67e0bfe781ce0dde776fb1556f32e

context-suite/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e:
total 4
drwxr-xr-x 3   20 Sep 11 15:28 formats
drwxr-xr-x 2 4096 Sep 11 15:28 trees

context-suite/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats:
total 0
drwxr-xr-x 2 82 Sep 11 15:28 luatex

context-suite/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex:
total 11044
-rw-r--r-- 1 10878224 Sep 11 15:28 cont-en.fmt
-rw-r--r-- 1   414753 Sep 11 15:28 cont-en.log
-rw-r--r-- 1     4118 Sep 11 15:28 cont-en.lui
-rw-r--r-- 1      263 Sep 11 15:28 cont-en.luv

context-suite/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees:
total 752
-rw-r--r-- 1  78031 Sep 11 15:28 3952aa25b6a1b9f9f8d3eeb6e65f0039.lua
-rw-r--r-- 1  45351 Sep 11 15:28 3952aa25b6a1b9f9f8d3eeb6e65f0039.luc
-rw-r--r-- 1    403 Sep 11 15:28 3f406286dc3075cdfb044f836920f46a.lua
-rw-r--r-- 1    398 Sep 11 15:28 3f406286dc3075cdfb044f836920f46a.luc
-rw-r--r-- 1   2026 Sep 11 15:28 3f6978edf9feb817ad6c1f21fc262031.lua
-rw-r--r-- 1   1371 Sep 11 15:28 3f6978edf9feb817ad6c1f21fc262031.luc
-rw-r--r-- 1    407 Sep 11 15:28 71c82419867f9a0df8a150196c03c86f.lua
-rw-r--r-- 1    400 Sep 11 15:28 71c82419867f9a0df8a150196c03c86f.luc
-rw-r--r-- 1    403 Sep 11 15:28 73630a261795d9c53610a28af4550cbc.lua
-rw-r--r-- 1    398 Sep 11 15:28 73630a261795d9c53610a28af4550cbc.luc
-rw-r--r-- 1 164062 Sep 11 15:28 dcb651482955ac31eaab7723b70e0184.lua
-rw-r--r-- 1  86572 Sep 11 15:28 dcb651482955ac31eaab7723b70e0184.luc
-rw-r--r-- 1 225577 Sep 11 15:28 fb39a92c95ceca857c3f2d0ee48a2ad3.lua
-rw-r--r-- 1 117644 Sep 11 15:28 fb39a92c95ceca857c3f2d0ee48a2ad3.luc
-------------------------------------- 8< --------------------------------------

###############################################################################

LUAMETATEX:

-------------------------------------- 8< --------------------------------------
tree $TEXMFCACHE/ | sed -e "s@$HOME/.cache/@@"
lmtx/
└── luatex-cache
    └── context
        └── 5fe67e0bfe781ce0dde776fb1556f32e
            ├── formats
            │   └── luametatex
            │       ├── cont-en.fmt
            │       ├── cont-en.log
            │       ├── cont-en.lui
            │       └── cont-en.luv
            └── trees
                ├── 3952aa25b6a1b9f9f8d3eeb6e65f0039.lua
                ├── 3952aa25b6a1b9f9f8d3eeb6e65f0039.luc
                ├── 3f406286dc3075cdfb044f836920f46a.lua
                ├── 3f406286dc3075cdfb044f836920f46a.luc
                ├── 3f6978edf9feb817ad6c1f21fc262031.lua
                ├── 3f6978edf9feb817ad6c1f21fc262031.luc
                ├── 71c82419867f9a0df8a150196c03c86f.lua
                ├── 71c82419867f9a0df8a150196c03c86f.luc
                ├── 73630a261795d9c53610a28af4550cbc.lua
                ├── 73630a261795d9c53610a28af4550cbc.luc
                ├── dcb651482955ac31eaab7723b70e0184.lua
                ├── dcb651482955ac31eaab7723b70e0184.luc
                ├── fb39a92c95ceca857c3f2d0ee48a2ad3.lua
                └── fb39a92c95ceca857c3f2d0ee48a2ad3.luc

6 directories, 18 files
-------------------------------------- 8< --------------------------------------

-------------------------------------- 8< --------------------------------------
LANG=en_US.UTF-8 ls -goR $TEXMFCACHE/ | sed -e "s@$HOME/.cache/@@"
lmtx/:
total 0
drwxr-xr-x 3 21 Sep 11 15:29 luatex-cache

lmtx/luatex-cache:
total 0
drwxr-xr-x 3 46 Sep 11 15:29 context

lmtx/luatex-cache/context:
total 0
drwxr-xr-x 4 34 Sep 11 15:29 5fe67e0bfe781ce0dde776fb1556f32e

lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e:
total 4
drwxr-xr-x 3   24 Sep 11 15:29 formats
drwxr-xr-x 2 4096 Sep 11 15:29 trees

lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats:
total 0
drwxr-xr-x 2 82 Sep 11 15:29 luametatex

lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex:
total 17148
-rw-r--r-- 1 17165315 Sep 11 15:29 cont-en.fmt
-rw-r--r-- 1   377257 Sep 11 15:29 cont-en.log
-rw-r--r-- 1     4118 Sep 11 15:29 cont-en.lui
-rw-r--r-- 1      257 Sep 11 15:29 cont-en.luv

lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees:
total 452
-rw-r--r-- 1    365 Sep 11 15:29 3952aa25b6a1b9f9f8d3eeb6e65f0039.lua
-rw-r--r-- 1    367 Sep 11 15:29 3952aa25b6a1b9f9f8d3eeb6e65f0039.luc
-rw-r--r-- 1    361 Sep 11 15:29 3f406286dc3075cdfb044f836920f46a.lua
-rw-r--r-- 1    365 Sep 11 15:29 3f406286dc3075cdfb044f836920f46a.luc
-rw-r--r-- 1    489 Sep 11 15:29 3f6978edf9feb817ad6c1f21fc262031.lua
-rw-r--r-- 1    465 Sep 11 15:29 3f6978edf9feb817ad6c1f21fc262031.luc
-rw-r--r-- 1    365 Sep 11 15:29 71c82419867f9a0df8a150196c03c86f.lua
-rw-r--r-- 1    367 Sep 11 15:29 71c82419867f9a0df8a150196c03c86f.luc
-rw-r--r-- 1    361 Sep 11 15:29 73630a261795d9c53610a28af4550cbc.lua
-rw-r--r-- 1    365 Sep 11 15:29 73630a261795d9c53610a28af4550cbc.luc
-rw-r--r-- 1  79655 Sep 11 15:29 dcb651482955ac31eaab7723b70e0184.lua
-rw-r--r-- 1  43851 Sep 11 15:29 dcb651482955ac31eaab7723b70e0184.luc
-rw-r--r-- 1 189893 Sep 11 15:29 fb39a92c95ceca857c3f2d0ee48a2ad3.lua
-rw-r--r-- 1  98765 Sep 11 15:29 fb39a92c95ceca857c3f2d0ee48a2ad3.luc
-------------------------------------- 8< --------------------------------------


The files under 'formats' are "safe" because they are in different
directories but files in 'trees' not only have identical names but also
differ in sizes.

I don't know why both caches have the same directory under
'luatex-cache', I thought it is related to a directory where
mtxrun/context installed but seems I'm wrong.

To be sure that I use correct "package"/"distribution" I often run
commands

  $ context --version

and get for ConTeXt Suite:

  mtx-context     | ConTeXt Process Management 1.03
  mtx-context     |
  mtx-context     | main context file: /usr/local/opt/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
  mtx-context     | current version: 2019.09.09 13:44
  mtx-context     | main context file: /usr/local/opt/context/tex/texmf-context/tex/context/base/mkiv/context.mkxl
  mtx-context     | current version: 2019.09.09 13:44

and for luametatex:

  mtx-context     | ConTeXt Process Management 1.03
  mtx-context     |
  mtx-context     | main context file: /usr/local/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv
  mtx-context     | current version: 2019.07.24 11:31
  mtx-context     | main context file: /usr/local/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkxl
  mtx-context     | current version: 2019.09.09 13:55

so I'm sure that this is different "context"s (I'm curious why current
version of mkiv files are different but I suppose it is related to other
"system" files of context).

Is it "safe" to simply run always

  $ mtxrun --generate; context --make

after each context/lmtx update? May be one should add there commands in
'install.sh'?

> so what does the tikz that fails look like (mwe)

I didn't say anything about tikz (I prefer metapost or asymptote
actually).

> 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
> -----------------------------------------------------------------

---
WBR, Vladimir Lomov

-- 
echo "Congratulations.  You aren't running Eunice."
		-- Larry Wall in Configure from the perl distribution
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190911/f314c3ed/attachment-0001.sig>


More information about the ntg-context mailing list