Bug 275767 - sysutils/iocage import function causes out of swap memory condition
Summary: sysutils/iocage import function causes out of swap memory condition
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Michael Gmelin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-14 17:02 UTC by James B. Byrne
Modified: 2023-12-14 18:37 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (grembo)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James B. Byrne 2023-12-14 17:02:17 UTC
FreeBSD 13.2-RELEASE-p5
py39-iocage 1.2_10

When importing a jail previously exported by iocage the import process is killed because of an out of swap space condition:

Dec 13 12:20:11 vhost03 kernel: swap_pager: out of swap space
Dec 13 12:20:11 vhost03 kernel: swp_pager_getswapspace(16): failed
Dec 13 12:20:13 vhost03 kernel: pid 26142 (python3.9), jid 0, uid 0, was killed: failed to reclaim memory
Dec 13 16:00:20 vhost03 kernel: swap_pager: out of swap space
Dec 13 16:00:20 vhost03 kernel: swp_pager_getswapspace(24): failed
Dec 13 16:00:23 vhost03 kernel: pid 29796 (python3.9), jid 0, uid 0, was killed: failed to reclaim memory
Dec 13 16:00:24 vhost03 kernel: pid 10070 (sshd), jid 0, uid 0, was killed: failed to reclaim memory
Dec 13 16:00:24 vhost03 kernel: swap_pager: out of swap space
Dec 13 16:00:24 vhost03 kernel: swp_pager_getswapspace(20): failed
Dec 13 16:00:25 vhost03 kernel: swp_pager_getswapspace(17): failed

In 2020 this problem was apparently fixed in https://github.com/iocage/iocage/pull/1218/commits/2a1685bcaba96917c79a7e4a909dac5c6926826a in master but never made into the release copy.

The upstream project appears to have been abandoned by the authors.  I do not know if this fix can be added to iocage for FreeBSD but if it can then I would appreciate this.
Comment 1 Mina Galić freebsd_triage 2023-12-14 17:35:37 UTC
maybe we should ask upstream, which is semi active again, for a fresh release
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-12-14 18:02:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=88044b46147f7a42406e9a1aad04b717fa36b2fa

commit 88044b46147f7a42406e9a1aad04b717fa36b2fa
Author:     Michael Gmelin <grembo@FreeBSD.org>
AuthorDate: 2023-12-14 17:55:20 +0000
Commit:     Michael Gmelin <grembo@FreeBSD.org>
CommitDate: 2023-12-14 17:55:20 +0000

    sysutils/iocage: Use streaming reads on image import

    This avoids out of memory conditions when importing a jail.

    PR:             275767
    Reported by:    James B. Byrne <byrnejb@harte-lyne.ca>

 sysutils/iocage/Makefile | 5 +++--
 sysutils/iocage/distinfo | 4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)
Comment 3 Michael Gmelin freebsd_committer freebsd_triage 2023-12-14 18:37:23 UTC
Thanks for reporting.