NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/50369: bozohttpd's lua state isn't closed, garbage collectors aren't called



>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
>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.



Home | Main Index | Thread Index | Old Index