In descriptor_close(), we should probably call lua_closethread() on the lua_State corresponding to the thread as we wind up everything else.
descriptor_close()
lua_closethread()
lua_State