NetBSD Problem Report #50369

From www@NetBSD.org  Mon Oct 26 12:12:13 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B4ADBA65C8
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 26 Oct 2015 12:12:13 +0000 (UTC)
Message-Id: <20151026121212.B243AA65E6@mollari.NetBSD.org>
Date: Mon, 26 Oct 2015 12:12:12 +0000 (UTC)
From: jan.m.danielsson@gmail.com
Reply-To: jan.m.danielsson@gmail.com
To: gnats-bugs@NetBSD.org
Subject: bozohttpd's lua state isn't closed, garbage collectors aren't called
X-Send-Pr-Version: www-1.0

>Number:         50369
>Category:       misc
>Synopsis:       bozohttpd's lua state isn't closed, garbage collectors aren't called
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 26 12:15:00 +0000 2015
>Last-Modified:  Tue Jul 14 19:41:07 +0000 2020
>Originator:     Jan Danielsson
>Release:        netbsd-7
>Organization:
La Cosa Nostra Ltd
>Environment:
NetBSD nb7.farrah 7.0 NetBSD 7.0 (VBOX) #0: Fri Oct  9 19:10:06 CEST 2015  jan@nb7.farrah:/home/jan/sysbuild/obj.amd64/usr/src/sys/arch/amd64/compile/VBOX amd64

>Description:
After processing a request to a Lua handler it doesn't appear that the Lua state is closed properly. This causes objects which need to be cleaned up by the garbage collector never to be cleaned up.
>How-To-Repeat:
Create a Lua table/object which creates a local domain socket, and which has a garbage collector which closes the socket and removes the corresponding file in the file system.

Instantiate that object in a Lua handler in bozohttpd; make a few connections which cause the objects to be created, and notice all the socket files remain in the file system since their garbage collectors where never called.
>Fix:
Add lua_close(L) after the Lua context is no longer needed for the request.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: misc-bug-people->mbalmer
Responsible-Changed-By: mbalmer@NetBSD.org
Responsible-Changed-When: Sun, 27 Mar 2016 09:52:22 +0000
Responsible-Changed-Why:
Mine.


Responsible-Changed-From-To: mbalmer->misc-bug-people
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Tue, 14 Jul 2020 19:41:07 +0000
Responsible-Changed-Why:
Reset to role account.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.