Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Sep 2025 14:33:18 +0200
From:      Stefan Blachmann <sblachmann@gmail.com>
To:        Mark Millard <marklmi@yahoo.com>
Cc:        FreeBSD-pkgbase@freebsd.org, FreeBSD-pkg@freebsd.org,  Baptiste Daroussin <bapt@freebsd.org>
Subject:   Re: I've got a pkg 2.3.1 "pkg-static autoremove" that has grown to have over 1 GiByte of RAM resident after more than 77 minutes of cpu time
Message-ID:  <CACc-My0_hywbA91pnNfrXEa5wRA_Ue2osuxK2qZzhtF=kw_JhA@mail.gmail.com>
In-Reply-To: <7AB42872-8CF9-4730-BDDA-0BE0B6507FE9@yahoo.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Unfortunately, I have to confirm your observation, but on 14.3-RELEASE-p2
on amd64.

As pkg's curl fetcher seems buggy beyond repair, the only way to finish the
installation of a planned FreeBSD small  server farm seems to use pkg's
stdio/file methods.
To save the project and avoid migration to Linux only because of this
long-standing pkg bug  "pkg: An error occurred while fetching package: No
error", which tends to appear unpredictably and is a real FreeBSD
showstopper because when it appears first, from then on it appears always,
I just set up a poudriere server with 20 cores at 3GHz and 256GB RAM. to
make the repos available via NFS.

Poudriere ran fine for a few minutes until it stopped for a loooong time.
Maybe 20 minutes the machine's drives were quiet. No SSH output.
Then I looked at the console, and top showed 5 or 6 pkg-static processes,
each with between 99.97 and 100.x CPU load.
Unfortunately, suddenly the machine awakened again from this pkg-static
freeze, so I could not get a full ps listing with more information, or even
a truss output.


On Sun, Sep 14, 2025 at 6:39 PM Mark Millard <marklmi@yahoo.com> wrote:

> [Some prior testing was also seeing such for pkg, not just pkg-static .]
>
> The context here is a armv7 chroot on an aarch64 system,
> in case that turns out to matter.
>
> # pkg-static -v
> 2.3.1
>
>
> For reference:
>
> load: 1.44  cmd: pkg-static 57217 [running] 4856.83r 4619.81u 2.24s 99%
> 1056180k
>
> ..PID   JID USERNAME    PRI NICE     SIZE       RES STATE    C   TIME
>  CPU COMMAND
> 57217     0 root        141    0   1096Mi    1038Mi CPU3     3  78:07
> 100.00% pkg-static autoremove
>
> The boot system:
>
> # uname -apKU
> FreeBSD aarch64-main-pbase 16.0-CURRENT FreeBSD 16.0-CURRENT
> main-n280292-3c60ea77649d GENERIC-NODEBUG arm64 aarch64 1600000 1600000
>
> Inside the chroot:
>
> # uname -apKU
> FreeBSD aarch64-main-pbase 16.0-CURRENT FreeBSD 16.0-CURRENT
> main-n280292-3c60ea77649d GENERIC-NODEBUG arm armv7 1600000 1600000
>
> # truss -p 57217
> freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926179328 (0x37346000)
> freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926199808 (0x3734b000)
> freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926220288 (0x37350000)
> freebsd32_mmap(0x0,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926224384 (0x37351000)
> freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926236672 (0x37354000)
> freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926240768 (0x37355000)
> freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926244864 (0x37356000)
> freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926265344 (0x3735b000)
> freebsd32_mmap(0x0,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926285824 (0x37360000)
> freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926298112 (0x37363000)
> freebsd32_mmap(0x0,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926318592 (0x37368000)
> freebsd32_mmap(0x0,28672,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926330880 (0x3736b000)
> freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926359552 (0x37372000)
> freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0)
> = 926380032 (0x37377000)
> . . .
>
> No other activity reported by truss, other than freebsd32_mmap use,
> at least for what i looked at.
>
>
> ===
> Mark Millard
> marklmi at yahoo.com
>
>
>

[-- Attachment #2 --]
<div dir="ltr"><div>Unfortunately, I have to confirm your observation, but on 14.3-RELEASE-p2 on amd64.</div><div><br></div><div>As
 pkg&#39;s curl fetcher seems buggy beyond repair, the only way to finish 
the installation of a planned FreeBSD small  server farm seems to use 
pkg&#39;s stdio/file methods.</div><div></div><div>To save the project and 
avoid migration to Linux only because of this long-standing pkg bug  
&quot;pkg: An error occurred while fetching package: No error&quot;, which tends 
to appear unpredictably and is a real FreeBSD showstopper because when 
it appears first, from then on it appears always, I just set up a 
poudriere server with 20 cores at 3GHz and 256GB RAM. to make the repos 
available via NFS.</div><div><br></div><div>Poudriere ran fine for a few minutes until it stopped for a loooong time.</div><div>Maybe 20 minutes the machine&#39;s drives were quiet. No SSH output.</div><div>Then I looked at the console, and top showed 5 or 6 pkg-static processes, each with between 99.97 and 100.x CPU load.</div><div>Unfortunately,
 suddenly the machine awakened again from this pkg-static freeze, so I 
could not get a full ps listing with more information, or even a truss 
output.</div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Sep 14, 2025 at 6:39 PM Mark Millard &lt;<a href="mailto:marklmi@yahoo.com">marklmi@yahoo.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[Some prior testing was also seeing such for pkg, not just pkg-static .]<br>
<br>
The context here is a armv7 chroot on an aarch64 system,<br>
in case that turns out to matter.<br>
<br>
# pkg-static -v<br>
2.3.1<br>
<br>
<br>
For reference:<br>
<br>
load: 1.44  cmd: pkg-static 57217 [running] 4856.83r 4619.81u 2.24s 99% 1056180k<br>
<br>
..PID   JID USERNAME    PRI NICE     SIZE       RES STATE    C   TIME     CPU COMMAND<br>
57217     0 root        141    0   1096Mi    1038Mi CPU3     3  78:07 100.00% pkg-static autoremove<br>
<br>
The boot system:<br>
<br>
# uname -apKU<br>
FreeBSD aarch64-main-pbase 16.0-CURRENT FreeBSD 16.0-CURRENT main-n280292-3c60ea77649d GENERIC-NODEBUG arm64 aarch64 1600000 1600000<br>
<br>
Inside the chroot:<br>
<br>
# uname -apKU<br>
FreeBSD aarch64-main-pbase 16.0-CURRENT FreeBSD 16.0-CURRENT main-n280292-3c60ea77649d GENERIC-NODEBUG arm armv7 1600000 1600000<br>
<br>
# truss -p 57217<br>
freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926179328 (0x37346000)<br>
freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926199808 (0x3734b000)<br>
freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926220288 (0x37350000)<br>
freebsd32_mmap(0x0,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926224384 (0x37351000)<br>
freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926236672 (0x37354000)<br>
freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926240768 (0x37355000)<br>
freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926244864 (0x37356000)<br>
freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926265344 (0x3735b000)<br>
freebsd32_mmap(0x0,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926285824 (0x37360000)<br>
freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926298112 (0x37363000)<br>
freebsd32_mmap(0x0,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926318592 (0x37368000)<br>
freebsd32_mmap(0x0,28672,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926330880 (0x3736b000)<br>
freebsd32_mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926359552 (0x37372000)<br>
freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 926380032 (0x37377000)<br>
. . .<br>
<br>
No other activity reported by truss, other than freebsd32_mmap use,<br>
at least for what i looked at.<br>
<br>
<br>
===<br>
Mark Millard<br>
marklmi at <a href="http://yahoo.com" rel="noreferrer" target="_blank">yahoo.com</a><br>
<br>
<br>
</blockquote></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACc-My0_hywbA91pnNfrXEa5wRA_Ue2osuxK2qZzhtF=kw_JhA>