Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jun 2020 20:34:24 -0700
From:      Donald Wilde <dwilde1@gmail.com>
To:        "Greg 'groggy' Lehey" <grog@freebsd.org>
Cc:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: swap space issues
Message-ID:  <CAEC73938Wjb5MHvLW36PdoAy_nso-tSN51AhUYydC6qxY99pog@mail.gmail.com>
In-Reply-To: <20200625025248.GB10210@eureka.lemis.com>
References:  <CAEC7391qs%2BA-jMpR1RyvR-BmnLyiksXHkQUjsGeePuEZJfMciw@mail.gmail.com> <20200625000410.GA10210@eureka.lemis.com> <CAEC7390VDxbYSY%2B4_fEaYxwdSPzbFWUVTdHw=vbAgq%2Bnmv09Vw@mail.gmail.com> <20200625025248.GB10210@eureka.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000e88f4e05a8e044e5
Content-Type: text/plain; charset="UTF-8"

On 6/24/20, Greg 'groggy' Lehey <grog@freebsd.org> wrote:
> On Wednesday, 24 June 2020 at 18:51:04 -0700, Donald Wilde wrote:
>> On 6/24/20, Greg 'groggy' Lehey <grog@freebsd.org> wrote:
>>> On Wednesday, 24 June 2020 at  9:36:23 -0700, Donald Wilde wrote:
>>>> All,
>>>>
>>>> I recently upgraded my 12-STABLE system to the latest, and now my
>>>> swap subsystems aren't working. I deliberately set up a 40GB
>>>> partition for swap, and when I do 'top -t' I am only seeing 7906M
>>>> total.
>>>
>>> That looks suspiciously like the difference from 32 GB.  Could it be
>>> numeric overflow?  And if so, where?  What does pstat -s say?
>>
>> Well, hi Greg! LTNT2!
>
> Indeed.
>
>> pstat -shm:
>>
>> /dev/ada0s1b  65536 (1M blocks), Used: 1.5G, Avail: 63G, Capacity: 2%
>
> Now that's really puzzling.  Why does it say 64 G when you said 40 G,
> and the error from top tends to confirm it?  How big is the partition
> (gpart output)?

Attached 'gpart list' output

Reduced kern.maxswzone to 9999999. Is it decimal or unlabeled hex?

'top' now shows 4597M total swap.

>
>>>> When using synth, it shows swap usage of < 2%, but then it gives the
>>>> 'out of swap' complaint and tosses all my users out into neverland.
>>>
>>> Unless this also causes kernel messages to that effect, this, too,
>>> could be an issue with synth.
>>
>> I believe the messages about 'out of swap' were from the kernel as
>> it died, not synth. As I say, it killed all my active users, both
>> root and non-root.

Okay, I've now got data on that. It crashed again. :-\

First, the kernel killed init-spawned PIDs up into the 12000s: 'out of
swap space'.

Next, I get the following 5 times, boldface (this is console, not a GUI):

swblk zone ok
swap blk zone exhausted, increase kern.maxswzone

Back to normal font, the kernel killed four cron-job PIDs, 'out of swap space'

At this point, if I hit a <cr>, I get a login prompt.

>
> Hmm.
>
>> Why does _top_ show the 7906M number? I suspect that it's deeper
>> than just synth.
>
> If top counts swap in a form that overflows at 32 GB, 40 GB could show
> up as 8 GB.
>
>> What else can I share to help diagnose this?
>
> Background, maybe?  You say that you upgraded your system.  Did you
> change the swap size when you did?  What were swap and RAM sizes
> before and after?

Meant that I upgraded from 12.1-RELEASE to 12-STABLE. When I
configured the -RELEASE install, I manually messed with the MBR disk
partitions. This is nominally a half-TB HDD which showed up as a total
of 446 G available (IIRC, gpart should show it's actual size). I did
auto partitioning, looked at the sizes, and manually set my partitions
to give me 40G of swap instead of the auto-generated size of 4G.

This is an old Dell i3 laptop. It's really generic, picked
specifically as something I could use for Ubuntu or FreeBSD. Dell
SERVICE TAG is 5K8W162, but it's a generic i3 with 4G of RAM.

I'm developing a multi-server application for my cousin, so I'm using
this as a mule to work my way through some of the issues involved in
that project, from FreeBSD itself through NGINX and Lua, etc.
>
> FWIW, I've had a very large number of issues with -STABLE in recent
> months, though not this one.  I should send a separate message.
>
I guess I've been fortunate, then. Most of my issues have been with
re-learning FreeBSD. :D
-- 
Don Wilde
****************************************************
* What is the Internet of Things but a system *
* of systems including humans?                     *
****************************************************

--000000000000e88f4e05a8e044e5
Content-Type: text/plain; charset="US-ASCII"; name="gpart_list.txt"
Content-Disposition: attachment; filename="gpart_list.txt"
Content-Transfer-Encoding: base64
X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0MDk2CiAgIFN0cmlw
ZW9mZnNldDogMAogICBNb2RlOiByMXcxZTEKICAgcmF3dHlwZTogNwogICBsZW5ndGg6IDQyOTQ5
NjcyOTYwMAogICBvZmZzZXQ6IDAKICAgdHlwZTogZnJlZWJzZC11ZnMKICAgaW5kZXg6IDEKICAg
ZW5kOiA4Mzg4NjA3OTkKICAgc3RhcnQ6IDAKMi4gTmFtZTogYWRhMHMxYgogICBNZWRpYXNpemU6
IDcwNjExMDk5NjQ4ICg2NkcpCiAgIFNlY3RvcnNpemU6IDUxMgogICBTdHJpcGVzaXplOiA0MDk2
CiAgIFN0cmlwZW9mZnNldDogMAogICBNb2RlOiByMXcxZTAKICAgcmF3dHlwZTogMQogICBsZW5n
dGg6IDcwNjExMDk5NjQ4CiAgIG9mZnNldDogNDI5NDk2NzI5NjAwCiAgIHR5cGU6IGZyZWVic2Qt
c3dhcAogICBpbmRleDogMgogICBlbmQ6IDk3Njc3MzEwMwogICBzdGFydDogODM4ODYwODAwCkNv
bnN1bWVyczoKMS4gTmFtZTogYWRhMHMxCiAgIE1lZGlhc2l6ZTogNTAwMTA3ODI5MjQ4ICg0NjZH
KQogICBTZWN0b3JzaXplOiA1MTIKICAgU3RyaXBlc2l6ZTogNDA5NgogICBTdHJpcGVvZmZzZXQ6
IDAKICAgTW9kZTogcjJ3MmUzCgo=
--000000000000e88f4e05a8e044e5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAEC73938Wjb5MHvLW36PdoAy_nso-tSN51AhUYydC6qxY99pog>