public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: cygwin@cygwin.com
Subject: Re: postinstall: fontconfig abnormal exit
Date: Wed, 21 Jul 2021 15:26:37 -0400	[thread overview]
Message-ID: <e36120a8-fbc0-c603-5208-518a0ab99136@cornell.edu> (raw)
In-Reply-To: <cc8d11d5-ca74-4a0b-a108-47623088cd2a@SystematicSw.ab.ca>

On 7/20/2021 1:00 PM, Brian Inglis wrote:
 > On 2020-09-12 06:56, Ken Brown via Cygwin wrote:
> For fontconfig fc-cache-1 appears to have been creating thousands (on Cygwin 64 
> millions) of small <1KB 
> /var/cache/fontconfig/%8x-%4x-%4x-%4x-%12x-le{64,32d8}.cache-7 files.
> 
> The problems could have originally been caused by an old bug:
> 
> https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/107
> 
> combined with many font additions around that time, mainly working on Cygwin 64, 
> where I use X, and manually run fontconfig postinstall script, to try to avoid 
> long setup postinstalls, whereas on Cygwin 32 I don't use X or manually run 
> postinstall scripts, just get run after setup.
> 
> I have about 200 Windows MS font files, 1000 non-MS font files, and about 800 
> Cygwin font files, from multiple distros and elsewhere, including some with full 
> BMP coverage, some with SMP coverage, some for fallback code points, others with 
> group ranges.
> 
> I rm'ed -rf /var/cache/fontconfig/ with a few thousand files on Cygwin 32 and 
> rebuilt it okay with only 65 cache files.
> 
> I tried rm -rf /var/cache/fontconfig/ on Cygwin 64 but got many permission 
> errors and killed it.

The preremove script for libfontconfig1 should remove all those cache files 
every time libfontconfig1 is updated, so you should have gotten a fresh start 
every once in a while.  Apparently something went wrong.

> I gave up waiting for ls -U to show any results on Cygwin 64 or Explorer on that 
> dir to show any file details, but cmd /c dir | less displays the base info for 
> hundreds of thousands of files, and wc reports millions.
> 
> I am still waiting for an elevated cmd to rmdir /s /q fontconfig there!
> 
> Do you know why fc-cache-1 is run rather than fc-cache and what the difference is?

They're identical.  It's just a packaging issue.  fc-cache is in the fontconfig 
package, and fc-cache-1 is in the libfontconfig1 package.  That way fc-cache-1 
is available for use in postinstall scripts for users who install libfontconfig1 
(probably because something requires it) but not fontconfig.

> What would give you useful information once I have the fontconfig cache cleared?
> Might running FC_DEBUG=65535 fc-cache-1 -fsv provide useful info?
> Or do so with strace?
> Would running file on the font files give enough info about properties to be of 
> any help?

I'm not an expert on fontconfig, so I probably can't help.

> What is the best approach to get the minimal cache files recreated?

I would expect that this would always happen as a result of running setup and 
letting the preremove/postinstall scripts do their job.  I don't know what went 
wrong in your case.

> What is the best approach to avoid thousand of cache files in future?

Again, I don't know why that happened in the first place.

Ken

  reply	other threads:[~2021-07-21 19:26 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08  6:43 Fergus Daly
2020-09-08 12:03 ` Hamish McIntyre-Bhatty
2020-09-08 14:16 ` Andrey Repin
2020-09-08 15:18   ` Fergus Daly
2020-09-08 16:14     ` Brian Inglis
2020-09-10  5:23     ` Fergus Daly
2020-09-10  5:35       ` Andrey Repin
2020-09-10 10:57         ` Fergus Daly
2020-09-10 14:40           ` Brian Inglis
2020-09-11  6:04             ` briand
2020-09-11  7:22               ` Fergus Daly
2020-09-11  8:32                 ` Hamish McIntyre-Bhatty
2020-09-11 11:31                   ` Marco Atzeri
2020-09-11 13:12                     ` Ken Brown
2020-09-11 14:41                       ` Marco Atzeri
2020-09-11 19:47                         ` Ken Brown
2020-09-11 20:30                           ` Achim Gratz
2020-09-11 21:13                             ` Ken Brown
2020-09-12  5:18                               ` Brian Inglis
2020-09-12 12:56                                 ` Ken Brown
2021-07-20 17:00                                   ` Brian Inglis
2021-07-21 19:26                                     ` Ken Brown [this message]
2021-07-23  3:37                                       ` Brian Inglis
2020-09-12  6:08                               ` ASSI
2020-09-13 16:53                                 ` Ken Brown
2020-09-16  8:42                                   ` Fergus Daly
2020-09-12 18:16                           ` Andrey Repin
2020-09-14 15:47                             ` Hamish McIntyre-Bhatty
2020-09-11 13:18                     ` Fergus Daly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e36120a8-fbc0-c603-5208-518a0ab99136@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).