fc-match crashes with refreshed toolbox system cache on ostree
After running fc-cache -s
in a Fedora Toolbox with (edit: ostree) host fonts symlinked to /usr/local/share/fonts/,
fc-match etc starts dumping core for me.
I think the steps to reproduce should be roughly:
$ toolbox enter
⬢ $ sudo mkdir /usr/local/share/fonts
⬢ $ sudo ln -s /run/host/usr/share/fonts/* /usr/local/share/fonts/
⬢ $ sudo fc-cache -s
⬢ $ fc-match
NotoSans-VF.ttf: "Noto Sans" "Regular"
fc-match: fccache.c:808: FcCacheFini: Assertion `fcCacheChains[i] == NULL' failed.
Aborted (core dumped)
⬢ $ sudo rm /usr/local/share/fonts/*
⬢ $ fc-match
NotoSans-VF.ttf: "Noto Sans" "Regular"
⬢ $
The gdb backtrace is not too informative:
(gdb) r
Starting program: /usr/bin/fc-match
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
NotoSans-VF.ttf: "Noto Sans" "Regular"
fc-match: fccache.c:808: FcCacheFini: Assertion `fcCacheChains[i] == NULL' failed.
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007ffff7e08d33 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007ffff7db8aa6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff7da27fc in __GI_abort () at abort.c:79
#4 0x00007ffff7da271b in __assert_fail_base (fmt=0x7ffff7f169c0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=0x7ffff7f8cedf "fcCacheChains[i] == NULL", file=0x7ffff7f8ced5 "fccache.c", line=808, function=<optimized out>)
at assert.c:92
#5 0x00007ffff7db1656 in __GI___assert_fail (assertion=assertion@entry=0x7ffff7f8cedf "fcCacheChains[i] == NULL",
file=file@entry=0x7ffff7f8ced5 "fccache.c", line=line@entry=808,
function=function@entry=0x7ffff7f8dd90 <__PRETTY_FUNCTION__.0> "FcCacheFini") at assert.c:101
#6 0x00007ffff7f6de9b in FcCacheFini () at /usr/src/debug/fontconfig-2.14.0-2.fc37.x86_64/src/fccache.c:808
#7 IA__FcFini () at /usr/src/debug/fontconfig-2.14.0-2.fc37.x86_64/src/fcinit.c:206
#8 0x0000555555556776 in main (argc=<optimized out>, argv=<optimized out>)
at /usr/src/debug/fontconfig-2.14.0-2.fc37.x86_64/fc-match/fc-match.c:271
Edited by Jens-Ulrik Petersen