[ARVADOS] updated: ed8f444ed60b46ec4b4d4f428896615661506201

Git user git at public.curoverse.com
Thu Sep 8 14:42:16 EDT 2016


Summary of changes:
 build/run-build-docker-jobs-image.sh    | 2 +-
 services/fuse/tests/integration_test.py | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

  discards  8746e8c12b33f56cabbcab138c6077eb351be533 (commit)
  discards  1a8526e424e1491b9f262fab7910aeca3b223d59 (commit)
  discards  67a83b5152b72548f0e55b137f6c789f4b6b086f (commit)
       via  ed8f444ed60b46ec4b4d4f428896615661506201 (commit)
       via  afeb0aefe3fed9cbc218df4e94ee7a16f9bd8e2f (commit)
       via  87b23153b3205e3e2bf61aab6a9aaced6fa6d037 (commit)
       via  4418adf838ac2b3d9a09d03cb87f911b323ba6d3 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (8746e8c12b33f56cabbcab138c6077eb351be533)
            \
             N -- N -- N (ed8f444ed60b46ec4b4d4f428896615661506201)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit ed8f444ed60b46ec4b4d4f428896615661506201
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Sep 8 14:26:58 2016 -0400

    9986: Kill test suite when danger of deadlock is detected.

diff --git a/services/fuse/tests/integration_test.py b/services/fuse/tests/integration_test.py
index d0e3102..c705934 100644
--- a/services/fuse/tests/integration_test.py
+++ b/services/fuse/tests/integration_test.py
@@ -76,7 +76,12 @@ class IntegrationTest(unittest.TestCase):
                         arvados_fuse.command.ArgumentParser().parse_args(
                             argv + ['--foreground',
                                     '--unmount-timeout=0.1',
-                                    self.mnt])):
+                                    self.mnt])) as m:
                     return func(self, *args, **kwargs)
+                if m.llfuse_thread.is_alive():
+                    self.logger.warning("IntegrationTest.mount:"
+                                        " llfuse thread still alive after umount"
+                                        " -- killing test suite to avoid deadlock")
+                    os.kill(os.getpid(), signal.SIGKILL)
             return wrapper
         return decorator

commit afeb0aefe3fed9cbc218df4e94ee7a16f9bd8e2f
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Sep 8 09:34:31 2016 -0400

    9986: Share one multiprocessing pool with all IntegrationTests.

diff --git a/services/fuse/tests/integration_test.py b/services/fuse/tests/integration_test.py
index 5a45bfc..d0e3102 100644
--- a/services/fuse/tests/integration_test.py
+++ b/services/fuse/tests/integration_test.py
@@ -1,14 +1,28 @@
 import arvados
 import arvados_fuse
 import arvados_fuse.command
+import atexit
 import functools
 import inspect
 import multiprocessing
 import os
+import run_test_server
+import signal
 import sys
 import tempfile
 import unittest
-import run_test_server
+
+_pool = None
+
+
+ at atexit.register
+def _pool_cleanup():
+    global _pool
+    if _pool is None:
+        return
+    _pool.close()
+    _pool.join()
+
 
 def wrap_static_test_method(modName, clsName, funcName, args, kwargs):
     class Test(unittest.TestCase):
@@ -24,17 +38,15 @@ class IntegrationTest(unittest.TestCase):
         If called by method 'foobar', the static method '_foobar' of
         the same class will be called in the other process.
         """
+        global _pool
+        if _pool is None:
+            _pool = multiprocessing.Pool(1, maxtasksperchild=1)
         modName = inspect.getmodule(self).__name__
         clsName = self.__class__.__name__
         funcName = inspect.currentframe().f_back.f_code.co_name
-        pool = multiprocessing.Pool(1)
-        try:
-            pool.apply(
-                wrap_static_test_method,
-                (modName, clsName, '_'+funcName, args, kwargs))
-        finally:
-            pool.terminate()
-            pool.join()
+        _pool.apply(
+            wrap_static_test_method,
+            (modName, clsName, '_'+funcName, args, kwargs))
 
     @classmethod
     def setUpClass(cls):

commit 87b23153b3205e3e2bf61aab6a9aaced6fa6d037
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Sep 8 08:56:18 2016 -0400

    9986: Send SIGKILL if llfuse thread does not join.

diff --git a/services/fuse/tests/mount_test_base.py b/services/fuse/tests/mount_test_base.py
index 12395d7..5e0e4c7 100644
--- a/services/fuse/tests/mount_test_base.py
+++ b/services/fuse/tests/mount_test_base.py
@@ -1,18 +1,19 @@
 import arvados
-import arvados.safeapi
 import arvados_fuse as fuse
+import arvados.safeapi
 import llfuse
+import logging
+import multiprocessing
 import os
+import run_test_server
 import shutil
+import signal
 import subprocess
 import sys
 import tempfile
 import threading
 import time
 import unittest
-import logging
-import multiprocessing
-import run_test_server
 
 logger = logging.getLogger('arvados.arv-mount')
 
@@ -64,23 +65,27 @@ class MountTestBase(unittest.TestCase):
         return self.operations.inodes[llfuse.ROOT_INODE]
 
     def tearDown(self):
-        self.pool.terminate()
-        self.pool.join()
-        del self.pool
-
         if self.llfuse_thread:
             subprocess.call(["fusermount", "-u", "-z", self.mounttmp])
             self.llfuse_thread.join(timeout=1)
             if self.llfuse_thread.is_alive():
                 logger.warning("MountTestBase.tearDown():"
                                " llfuse thread still alive 1s after umount"
-                               " -- abandoning and exiting anyway")
+                               " -- waiting another 10s")
+                self.llfuse_thread.join(timeout=10)
+            if self.llfuse_thread.is_alive():
+                logger.warning("MountTestBase.tearDown():"
+                               " llfuse thread still alive 10s after umount"
+                               " -- exiting with SIGKILL")
+                os.kill(os.getpid(), signal.SIGKILL)
 
         os.rmdir(self.mounttmp)
         if self.keeptmp:
             shutil.rmtree(self.keeptmp)
             os.environ.pop('KEEP_LOCAL_STORE')
         run_test_server.reset()
+        self.pool.close()
+        self.pool.join()
 
     def assertDirContents(self, subdir, expect_content):
         path = self.mounttmp

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list