On Sun, 29 Jan 2023 at 16:41, Richard Purdie <[email protected]> wrote: > unfs tests leave nfs server running > =================================== > > After the unfs NFS test runs, we seem to leave an unfs server hanging > around after the builds are long gone. These build up on the > autobuilder workers.
I'm going slightly mad. The trouble occurs in stop() method in meta/lib/oeqa/utils/qemurunner.py. The method sends SIGTERM to runqemu proces, then runs Popen.poll() in a loop until it is not None [1] (internally this poll() thing seems to be using waitpid()). Runqemu needs to do significant processing in SIGTERM handler (bringing down the nfs server cleanly), so it takes a few seconds. On the other hand, poll() returns -15 earlier than SIGTERM hander completes (!) and then SIGTERM handler itself seems to be interrupted in the middle of it, leaving dangling nfsd processes behind. The 'slightly mad' part is that assuming Popen.poll()/waitpid() do not wait for the signal handler to complete, how to ensure that the child process had truly exited before proceeding in the parent? Am I completely wrong about what's happening and how to use these things correctly, and sending me to a beginner's Unix class is in order? I'd like to write a simple replicator showing incorrect behavior, but not today. [1] https://docs.python.org/3/library/subprocess.html#subprocess.Popen.poll Alex
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#176501): https://lists.openembedded.org/g/openembedded-core/message/176501 Mute This Topic: https://lists.openembedded.org/mt/96607332/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
