From owner-freebsd-ports-bugs@freebsd.org Wed Sep 11 22:54:49 2019 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D061FE2716 for ; Wed, 11 Sep 2019 22:54:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 46THKP5CFlz4W56 for ; Wed, 11 Sep 2019 22:54:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id B1EF2E2715; Wed, 11 Sep 2019 22:54:49 +0000 (UTC) Delivered-To: ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1BC5E2714 for ; Wed, 11 Sep 2019 22:54:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46THKP4LXvz4W55 for ; Wed, 11 Sep 2019 22:54:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A03FDA08 for ; Wed, 11 Sep 2019 22:54:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BMsnLu019288 for ; Wed, 11 Sep 2019 22:54:49 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x8BMsnCq019287 for ports-bugs@FreeBSD.org; Wed, 11 Sep 2019 22:54:49 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 240517] [PATCH] devel/glib20: syscall flood on every time*() function call Date: Wed, 11 Sep 2019 22:54:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: rozhuk.im@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gnome@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 22:54:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240517 Bug ID: 240517 Summary: [PATCH] devel/glib20: syscall flood on every time*() function call Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: gnome@FreeBSD.org Reporter: rozhuk.im@gmail.com Flags: maintainer-feedback?(gnome@FreeBSD.org) Assignee: gnome@FreeBSD.org Created attachment 207400 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D207400&action= =3Dedit tzcache patch truss show that GTK app do many times: ... 27100: openat(AT_FDCWD,"/etc/localtime",O_RDONLY,00) =3D 114 (0x72) 27100: fstat(114,{ mode=3D-r--r--r-- ,inode=3D1845941,size=3D1518,blksize= =3D32768 }) =3D 0 (0x0) 27100: mmap(0x0,1518,PROT_READ,MAP_PRIVATE,114,0x0) =3D 34458873856 (0x805e= 8b000) 27100: close(114) =3D 0 (0x0) 27100: munmap(0x805e8b000,1518) =3D 0 (0x0) ... I found article: https://blog.packagecloud.io/eng/2017/02/21/set-environment-variable-save-t= housands-of-system-calls/ and try to set: env TZ=3D":/etc/localtime" truss -fD geany or env TZ=3D"Europe/Moscow" truss -fD geany without success. I discovered that glib time zone cache is does not work properly: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D GDateTime * g_date_time_new_from_unix_local (gint64 t) { GDateTime *datetime; GTimeZone *local; local =3D g_time_zone_new_local (); datetime =3D g_date_time_new_from_unix (local, t); g_time_zone_unref (local); return datetime; } GTimeZone * g_time_zone_new_local (void) { return g_time_zone_new (getenv ("TZ")); } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D g_time_zone_new() load and add time zone to cache if arg is not NULL. g_time_zone_unref() - remove time zone from cache. As you can see time zone in most cases removed from cache after short time. Patch add_ref() for time zone "getenv ("TZ")" and "UTC", all other calls g_time_zone_new() leave without changes. After apply patch and set TZ=3D":/etc/localtime" / TZ=3D"Europe/Moscow" no = more syscall flood happen. --=20 You are receiving this mail because: You are the assignee for the bug.=