* [PATCH 1/2] hashserv: Ensure we don't accumulate sockets in TIME_WAIT state
@ 2019-08-16 9:04 Richard Purdie
2019-08-16 9:04 ` [PATCH 2/2] runqueue: Ensure target_tids is filtered Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2019-08-16 9:04 UTC (permalink / raw)
To: bitbake-devel
This can cause a huge backlog of closing sockets on the server and
in our case we don't really want/need the protection TCP is trying to
give us so work around it.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
lib/hashserv/__init__.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/hashserv/__init__.py b/lib/hashserv/__init__.py
index 55966e748a..eb03c32213 100644
--- a/lib/hashserv/__init__.py
+++ b/lib/hashserv/__init__.py
@@ -14,6 +14,8 @@ import socketserver
import queue
import threading
import signal
+import socket
+import struct
from datetime import datetime
logger = logging.getLogger('hashserv')
@@ -157,6 +159,10 @@ class ThreadedHTTPServer(HTTPServer):
self.server_close()
os._exit(0)
+ def server_bind(self):
+ HTTPServer.server_bind(self)
+ self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', 1, 0))
+
def process_request_thread(self):
while not self.quit:
try:
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] runqueue: Ensure target_tids is filtered
2019-08-16 9:04 [PATCH 1/2] hashserv: Ensure we don't accumulate sockets in TIME_WAIT state Richard Purdie
@ 2019-08-16 9:04 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2019-08-16 9:04 UTC (permalink / raw)
To: bitbake-devel
bitbake <target> --runonly=fetch
failed as the target_tids list included entries which were no longer targeted
task ids. Fix this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
lib/bb/runqueue.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 4e64ddfdad..7fa074f679 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -1736,6 +1736,7 @@ class RunQueueExecute:
# We can't skip specified target tasks which aren't setscene tasks
self.cantskip = set(self.rqdata.target_tids)
self.cantskip.difference_update(self.rqdata.runq_setscene_tids)
+ self.cantskip.intersection_update(self.rqdata.runtaskentries)
schedulers = self.get_schedulers()
for scheduler in schedulers:
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-16 9:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 9:04 [PATCH 1/2] hashserv: Ensure we don't accumulate sockets in TIME_WAIT state Richard Purdie
2019-08-16 9:04 ` [PATCH 2/2] runqueue: Ensure target_tids is filtered Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.