From 022deeb0effb92280cb86da962d8bd5e94d44947 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 14 Sep 2023 17:26:07 +0100 Subject: bitbake: server/process: Disable the flush() call in server logging 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. (Bitbake rev: afbc169e1490a86d6250969f780062c426eb4682) Signed-off-by: Richard Purdie --- bitbake/lib/bb/server/process.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 993ae66279..5654f60f9e 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/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 -- cgit v1.2.3-54-g00ecf