diff mbox series

server/process: Disable the flush() call in server logging

Message ID 20230914162807.198231-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit afbc169e1490a86d6250969f780062c426eb4682
Headers show
Series server/process: Disable the flush() call in server logging | expand

Commit Message

Richard Purdie Sept. 14, 2023, 4:28 p.m. UTC
We've been chasing bitbake timeouts for a while and it was unclear where things
were blocking on IO. It appears the flush() call in server logging can cause
pauses up to minutes long on systems with slow (spinning) disks that are heavily
loaded with IO.

Since the flush() was added to aid debugging of other timing issues, we shouldn't
need it now and it can be disabled. Leave a comment as a reminder of the pain this
can cause.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/server/process.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 40cb99bc97..94e93bc3a6 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -43,7 +43,8 @@  def currenttime():
 
 def serverlog(msg):
     print(str(os.getpid()) + " " +  currenttime() + " " + msg)
-    sys.stdout.flush()
+    #Seems a flush here triggers filesytem sync like behaviour and long hangs in the server
+    #sys.stdout.flush()
 
 #
 # When we have lockfile issues, try and find infomation about which process is