[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
>Synopsis: bozohttpd's lua state isn't closed, garbage collectors aren't called
>Arrival-Date: Mon Oct 26 12:15:00 +0000 2015
>Originator: Jan Danielsson
La Cosa Nostra Ltd
NetBSD nb7.farrah 7.0 NetBSD 7.0 (VBOX) #0: Fri Oct 9 19:10:06 CEST 2015 email@example.com:/home/jan/sysbuild/obj.amd64/usr/src/sys/arch/amd64/compile/VBOX amd64
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.
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.
Add lua_close(L) after the Lua context is no longer needed for the request.
Main Index |
Thread Index |