[bind10-dev] failed unittests master be570bcaf88318286027da7da40a600cbe4223e9

Naoki Kambe kambe at jprs.co.jp
Fri Jan 11 11:53:29 UTC 2013


Hello,

From: Naoki Kambe <kambe at jprs.co.jp>
Date: Tue, 08 Jan 2013 10:16:37 +0900 (JST)
> It seemed to me to start hanging just when b10-stats-httpd_test.py was
> started.  Because it was terminated before the message "Running test:
> b10-stats-httpd_test.py" appeared on the log.

I was given a account to the build bot from Jeremy-san and
investigated this process hanging a little.  So I suspect this hanging
happens due to removing a socket file of msgq under the race condition.
Removing a socket file is done in msgq.shutdown().

When I applied the following patch, the process is almost done (not
hanging).  The patch keeps a socket file when shutting msgq down.  It
also includes keeping signal.alarm(20) even after all unit tests are
done.  So the "make check" process would be aborted by SIGALRM after
20 seconds even if the process hangs again.

However there are CONFIG_SESSION_STOPPING_FAILED (Broken pipe) errors
found instead of hanging :(. Please give me any advices.

Regards,

Naoki Kambe

diff --git a/src/bin/stats/tests/test_utils.py b/src/bin/stats/tests/test_utils.py
index 96f7046..ce25884 100644
--- a/src/bin/stats/tests/test_utils.py
+++ b/src/bin/stats/tests/test_utils.py
@@ -44,7 +44,9 @@ class SignalHandler():

     def reset(self):
         """resets the schedule in SIGALRM"""
-        signal.alarm(0)
+        # temporally disabled for a hanging python process even after
+        # all unit tests are done.
+        # signal.alarm(0)
         signal.signal(signal.SIGALRM, self.orig_handler)

     def sig_handler(self, signal, frame):
@@ -127,7 +129,10 @@ class MockMsgq:
         self.msgq.run()

     def shutdown(self):
-        self.msgq.shutdown()
+        # stop listening and close listen_socket instead of shutdown
+        # self.msgq.shutdown()
+        self.msgq.stop()
+        self.msgq.listen_socket.close()

 class MockCfgmgr:
     def __init__(self):




More information about the bind10-dev mailing list