NetBSD Problem Report #38082

From martin@duskware.de  Fri Feb 22 10:58:20 2008
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 35F0563B8BD
	for <gnats-bugs@gnats.netbsd.org>; Fri, 22 Feb 2008 10:58:20 +0000 (UTC)
Message-Id: <20080222105212.A9B7D63B853@narn.NetBSD.org>
Date: Fri, 22 Feb 2008 10:52:12 +0000 (UTC)
From: cheusov@tut.by
Reply-To: cheusov@tut.by
To: netbsd-bugs-owner@NetBSD.org
Subject: pkg_info -X eats LOTS of memory
X-Send-Pr-Version: www-1.0

>Number:         38082
>Category:       pkg
>Synopsis:       pkg_info -X eats LOTS of memory
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    joerg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 22 11:00:00 +0000 2008
>Closed-Date:    Fri Feb 22 15:54:30 +0000 2008
>Last-Modified:  Fri Feb 22 15:55:01 +0000 2008
>Originator:     Aleksey Cheusov
>Release:        linux
>Organization:
home
>Environment:
linux
>Description:
While running pkg_chk -ab, pkg_info run from inside it
eats TONS of memory.

top line:
 25938 root      17   0 1960m 649m  568 R  7.0 64.2   0:24.61 pkg_info                     

That is 2 gigabytes!

pkg_install-20080208
pkg_chk-1.89

This version of pkg_chk runs pkg_info -X and pass to it LIST of packages.
This is probably a problem. Memory is not freed.

Binary packages are in .tbz format.

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-By: reed@narn.netbsd.org
Responsible-Changed-When: Fri, 22 Feb 2008 14:48:06 +0000
Responsible-Changed-Why:
Assign to pkg_install and libarchive maintainer.


State-Changed-From-To: open->closed
State-Changed-By: joerg@narn.netbsd.org
State-Changed-When: Fri, 22 Feb 2008 15:54:30 +0000
State-Changed-Why:
Fixed in pkg_install-20080222. Thanks for the PR.


From: Joerg Sonnenberger <joerg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/38082 CVS commit: pkgsrc/pkgtools/pkg_install/files
Date: Fri, 22 Feb 2008 15:53:52 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	joerg
 Date:		Fri Feb 22 15:53:52 UTC 2008

 Modified Files:
 	pkgsrc/pkgtools/pkg_install/files/info: perform.c
 	pkgsrc/pkgtools/pkg_install/files/lib: version.h

 Log Message:
 pkg_install-20080222:
 Free libarchive's side of the package before closing the file descriptor.
 This stops leaking up to 1MB / package when using bzip2 and addresses
 PR 38082. Check that at least +COMMENTS, +CONTENTS and +DESC can be
 extracted, otherwise skip the entry. This stops pkg_info -X from dumping
 core on non-package files.


 To generate a diff of this commit:
 cvs rdiff -r1.42 -r1.43 pkgsrc/pkgtools/pkg_install/files/info/perform.c
 cvs rdiff -r1.92 -r1.93 pkgsrc/pkgtools/pkg_install/files/lib/version.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.