NetBSD Problem Report #54711

From root@iux.galis.org  Sat Nov 23 04:45:09 2019
Return-Path: <root@iux.galis.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 477C27A142
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 23 Nov 2019 04:45:09 +0000 (UTC)
Message-Id: <20191123032616.A0E272CC3D@iux.galis.org>
Date: Fri, 22 Nov 2019 19:26:16 -0800 (PST)
From: george@galis.org
Reply-To: george@galis.org
To: gnats-bugs@NetBSD.org
Subject: rrdtool creates many fontconfig cache files per graph, everytime
X-Send-Pr-Version: 3.95

>Number:         54711
>Category:       pkg
>Synopsis:       rrdtool creates many fontconfig cache files per graph, everytime
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 23 04:50:00 +0000 2019
>Originator:     Charlie Root
>Release:        NetBSD 8.1 rrdtool-1.7.2nb1
>Organization:
>Environment:
System: NetBSD adam 8.1 NetBSD 8.1 (GENERIC) #0: Fri May 31 08:43:59 UTC 2019 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64

# rrdtool-1.7.2nb1     Data analysis tool generating graphical representations
via pkgin
http://nyftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.1/All


>Description:

generating png files with rrdtool is creating a large number of files in
/var/cache/fontconfig

for example generatig 63 png files from 26 rrd files creates 387 cache files, everytime

here is an example

find /var/cache/fontconfig -type f -delete
while :; do date ; sh ./rrd-cpu.sh graph && find /var/cache/fontconfig/ -type f | wc -l ; done
Mon Nov 18 18:53:23 PST 2019
     135
Mon Nov 18 18:54:05 PST 2019
     261
Mon Nov 18 18:54:32 PST 2019
     387
Mon Nov 18 18:55:05 PST 2019
     513

here is a profile of the files from earlier runs

ls -rlt /var/cache/fontconfig/ | tail
-rw-r--r--  1 root  wheel     120 Nov 18 12:22 61c70df2-a25b-492c-9b80-9d67761f798d-le64.cache-7
-rw-r--r--  1 root  wheel     112 Nov 18 12:22 e963db64-e054-4fea-b092-5f336e90f619-le64.cache-7
-rw-r--r--  1 root  wheel     112 Nov 18 12:22 117a02cd-a912-4dc7-a021-ef5c9fafb93f-le64.cache-7
-rw-r--r--  1 root  wheel     128 Nov 18 12:22 cbfba55f-def5-4d3a-a9a7-820f89cf0640-le64.cache-7
-rw-r--r--  1 root  wheel     112 Nov 18 12:22 6bfa36f5-3be0-41da-bae6-72af2577a2da-le64.cache-7
-rw-r--r--  1 root  wheel     112 Nov 18 12:22 147efc89-10bd-4aad-89fe-65330ab6612a-le64.cache-7
-rw-r--r--  1 root  wheel     120 Nov 18 12:22 88251eeb-3309-405b-a733-c73a60d381c8-le64.cache-7
-rw-r--r--  1 root  wheel     112 Nov 18 12:22 f36df330-09e9-4d50-a345-e8c53b24b77f-le64.cache-7
-rw-r--r--  1 root  wheel     112 Nov 18 12:22 4d4f4b4e-5ba2-43f1-9c48-7549711da197-le64.cache-7
-rw-r--r--  1 root  wheel     128 Nov 18 12:22 d53d9530-3727-4b2a-98f0-2b275d7f5733-le64.cache-7

 file /var/cache/fontconfig/d53d9530-3727-4b2a-98f0-2b275d7f5733-le64.cache-7
/var/cache/fontconfig/d53d9530-3727-4b2a-98f0-2b275d7f5733-le64.cache-7: data

 strings /var/cache/fontconfig/4d4f4b4e-5ba2-43f1-9c48-7549711da197-le64.cache-7
/usr/X11R7/lib/X11/fonts/util

I have a 700K ktrace file from an "rrdtool graph ..." command
it indicates the cache file creations, but no obvious problem.
Shall I attach it somewhere?


>How-To-Repeat:

after NB 8.1 pkgin install of rrdtool 
these scripts were used to generate the rrd tables, update db and graph...
https://github.com/georgalis/pub/tree/706187e6f706775a7813b62e688480ee89676cb9/sub/metric
edit rr= and htrr= parameters,
then run "sh rrd-cpu.sh gen | sh"
set "sh rrd-cpu.sh db" in crontab, every minute
"sh rrd-cpu.sh graph" to render the plots, and a bunch of
/var/cache/fontconfig files.



>Fix:

not sure, it looks like a fontconfig hash is not being consistant when it should

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.