# HG changeset patch # User Kim Alvefur # Date 1575741910 -3600 # Node ID 479e96e554c8036aea9442c35877324536edd5ca # Parent 913276ba0c4780db79b661e31e518042a0ffb0bd net.server_epoll: Add debug logging for delayed reading In :onreadable, if there is still buffered incoming data after reading from the socket (as indicated by the :dirty method, usually because LuaSocket has an 8k buffer that's full but it read a smaller amount), another attempt to read is scheduled via this :pausefor method. This is also called from some other places where it would be pointless to read because there shouldn't be any data. In the delayed read case, this should report that the socket is "dirty". If it reports that the socket is "clean" then the question is where the buffer contents went? If this doesn't get logged after the scheduled time (0.000001s by default) then this would suggests a problem with timer or scheduling. diff -r 913276ba0c47 -r 479e96e554c8 net/server_epoll.lua --- a/net/server_epoll.lua Sat Dec 07 17:39:29 2019 +0100 +++ b/net/server_epoll.lua Sat Dec 07 19:05:10 2019 +0100 @@ -660,6 +660,7 @@ self._pausefor = addtimer(t, function () self._pausefor = nil; self:set(true); + self:debug("Resuming after pause, connection is %s", not self.conn and "missing" or self.conn:dirty() and "dirty" or "clean"); if self.conn and self.conn:dirty() then self:onreadable(); end