)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"aab695abe35a60f10beedf38f149f75bfb8df0dc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"8e41f34d_8ea074a6","updated":"2022-04-20 18:54:55.000000000","message":"neat, looks like something isn\u0027t working right on py3\n\nhttps://gist.github.com/clayg/1e2e4cb8f9fd35032fb56358f93754ec","commit_id":"e1b42ce6ebecd4e52ff5ab314154d44ad7581990"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4d6fc54645272bb82fe80f4dd538106b51335d48","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"d71ae43f_d06030b9","updated":"2022-05-02 21:38:37.000000000","message":"ERROR: Cannot install lxml\u003e\u003d3.4.1 because these package versions have conflicting dependencies.\n\ngoing to wait for Al to chime in on the pyeclib lock - Tim says we should just abandon all locking","commit_id":"476986654eb3248b25303ab4c2d9fda1bdeee75d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cea7d10497595a828520a4ded30ca0f9a80c03ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"947565ef_52b09bc6","updated":"2022-07-27 21:38:14.000000000","message":"I say we squash this and merge the parent - anything is better than the import side effect","commit_id":"476986654eb3248b25303ab4c2d9fda1bdeee75d"}],"swift/common/utils.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e766ea903dbc3bb713ae46a90cc1df315dbb5ae1","unresolved":true,"context_lines":[{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"# setup notice level logging"},{"line_number":102,"context_line":"NOTICE \u003d 25"},{"line_number":103,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"},{"line_number":104,"context_line":"SysLogHandler.priority_map[\u0027NOTICE\u0027] \u003d \u0027notice\u0027"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"# These are lazily pulled from libc elsewhere"}],"source_content_type":"text/x-python","patch_set":1,"id":"fcd1ed62_85f68cf8","line":103,"updated":"2022-04-22 09:40:18.000000000","message":"here\u0027s why we DO NOT want to go reloading logging when we call eventlet_monkey_patch - we\u0027d lose the NOTICE level that was installed here!!\n\nNote how test_wsgi tests failed in version 1 of this patchset: \n\n  File \"/Users/acoles/0dev/openstack/swift/test/debug_logger.py\", line 66, in _handle\n    self.lines_dict[record.levelname.lower()].append(line)\nKeyError: \u0027level 25\u0027\n\nbecause the logging module had been reloaded by a call to run_wsgi-\u003eeventlet_monkey_patch in a previous test.\n\nBUT those failures were not reported to gerrit because the tox job retries the tests *individually*. In real life, the logging module would have been reloaded and the NOTICE level would not be found :(","commit_id":"e1b42ce6ebecd4e52ff5ab314154d44ad7581990"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"77c10bdfa4a62fb7c3d36f55f7166ade8c30fe2c","unresolved":false,"context_lines":[{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"# setup notice level logging"},{"line_number":102,"context_line":"NOTICE \u003d 25"},{"line_number":103,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"},{"line_number":104,"context_line":"SysLogHandler.priority_map[\u0027NOTICE\u0027] \u003d \u0027notice\u0027"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"# These are lazily pulled from libc elsewhere"}],"source_content_type":"text/x-python","patch_set":1,"id":"58558fea_e0bd832c","line":103,"in_reply_to":"2550f8a9_6adc9c88","updated":"2022-05-02 19:43:30.000000000","message":"Ack","commit_id":"e1b42ce6ebecd4e52ff5ab314154d44ad7581990"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a8ad62769055212713e9e4e8adf620af1bb1b7e5","unresolved":true,"context_lines":[{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"# setup notice level logging"},{"line_number":102,"context_line":"NOTICE \u003d 25"},{"line_number":103,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"},{"line_number":104,"context_line":"SysLogHandler.priority_map[\u0027NOTICE\u0027] \u003d \u0027notice\u0027"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"# These are lazily pulled from libc elsewhere"}],"source_content_type":"text/x-python","patch_set":1,"id":"2550f8a9_6adc9c88","line":103,"in_reply_to":"fcd1ed62_85f68cf8","updated":"2022-04-22 09:50:02.000000000","message":"I wonder if it might be good to group all out patching of logging into a helper function to (a) make it more explicit and (b) gather all the patching in one place, now that the _lock patching has moved into eventlet_monkey_patch()","commit_id":"e1b42ce6ebecd4e52ff5ab314154d44ad7581990"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"aab695abe35a60f10beedf38f149f75bfb8df0dc","unresolved":true,"context_lines":[{"line_number":541,"context_line":"    eventlet.patcher.monkey_patch(all\u003dFalse, socket\u003dTrue, select\u003dTrue,"},{"line_number":542,"context_line":"                                  thread\u003dTrue)"},{"line_number":543,"context_line":"    if six.PY3:"},{"line_number":544,"context_line":"        importlib.reload(logging)"},{"line_number":545,"context_line":"    # Trying to log threads while monkey-patched can lead to deadlocks; see"},{"line_number":546,"context_line":"    # https://bugs.launchpad.net/swift/+bug/1895739"},{"line_number":547,"context_line":"    logging.logThreads \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"753133ca_c13aad06","line":544,"updated":"2022-04-20 18:54:55.000000000","message":"even if this isn\u0027t strictly *required* on py2 - it\u0027s less cruft to do it always if possible (we\u0027re going to deprecate py2 soon)","commit_id":"e1b42ce6ebecd4e52ff5ab314154d44ad7581990"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"77c10bdfa4a62fb7c3d36f55f7166ade8c30fe2c","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    eventlet.patcher.monkey_patch(all\u003dFalse, socket\u003dTrue, select\u003dTrue,"},{"line_number":542,"context_line":"                                  thread\u003dTrue)"},{"line_number":543,"context_line":"    if six.PY3:"},{"line_number":544,"context_line":"        importlib.reload(logging)"},{"line_number":545,"context_line":"    # Trying to log threads while monkey-patched can lead to deadlocks; see"},{"line_number":546,"context_line":"    # https://bugs.launchpad.net/swift/+bug/1895739"},{"line_number":547,"context_line":"    logging.logThreads \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"efde787c_88e22f07","line":544,"in_reply_to":"6cae38e3_15630b73","updated":"2022-05-02 19:43:30.000000000","message":"Ack","commit_id":"e1b42ce6ebecd4e52ff5ab314154d44ad7581990"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"044e60ece057876b466085d05251161dd5bee203","unresolved":true,"context_lines":[{"line_number":541,"context_line":"    eventlet.patcher.monkey_patch(all\u003dFalse, socket\u003dTrue, select\u003dTrue,"},{"line_number":542,"context_line":"                                  thread\u003dTrue)"},{"line_number":543,"context_line":"    if six.PY3:"},{"line_number":544,"context_line":"        importlib.reload(logging)"},{"line_number":545,"context_line":"    # Trying to log threads while monkey-patched can lead to deadlocks; see"},{"line_number":546,"context_line":"    # https://bugs.launchpad.net/swift/+bug/1895739"},{"line_number":547,"context_line":"    logging.logThreads \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"6cae38e3_15630b73","line":544,"in_reply_to":"753133ca_c13aad06","updated":"2022-04-21 11:53:02.000000000","message":"reload changed from builtin to importlib from py2 to py3, so some cruft is needed, but I found a six.moves helper","commit_id":"e1b42ce6ebecd4e52ff5ab314154d44ad7581990"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f67b9018ba524dfda452f8b806a466e560f46dec","unresolved":true,"context_lines":[{"line_number":540,"context_line":"    #         if thread is monkey-patched."},{"line_number":541,"context_line":"    eventlet.patcher.monkey_patch(all\u003dFalse, socket\u003dTrue, select\u003dTrue,"},{"line_number":542,"context_line":"                                  thread\u003dTrue)"},{"line_number":543,"context_line":"    reload_module(logging)"},{"line_number":544,"context_line":"    # Trying to log threads while monkey-patched can lead to deadlocks; see"},{"line_number":545,"context_line":"    # https://bugs.launchpad.net/swift/+bug/1895739"},{"line_number":546,"context_line":"    logging.logThreads \u003d 0"}],"source_content_type":"text/x-python","patch_set":2,"id":"618fefd2_535615c4","line":543,"updated":"2022-04-21 12:15:48.000000000","message":"we could just patch logging._lock but reloading saves messing with private members","commit_id":"0dbe7d73db1f4924696906118c185c63e2b1618a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"77c10bdfa4a62fb7c3d36f55f7166ade8c30fe2c","unresolved":false,"context_lines":[{"line_number":540,"context_line":"    #         if thread is monkey-patched."},{"line_number":541,"context_line":"    eventlet.patcher.monkey_patch(all\u003dFalse, socket\u003dTrue, select\u003dTrue,"},{"line_number":542,"context_line":"                                  thread\u003dTrue)"},{"line_number":543,"context_line":"    reload_module(logging)"},{"line_number":544,"context_line":"    # Trying to log threads while monkey-patched can lead to deadlocks; see"},{"line_number":545,"context_line":"    # https://bugs.launchpad.net/swift/+bug/1895739"},{"line_number":546,"context_line":"    logging.logThreads \u003d 0"}],"source_content_type":"text/x-python","patch_set":2,"id":"b2387d62_0d5c4af5","line":543,"in_reply_to":"140f04b6_641551e6","updated":"2022-05-02 19:43:30.000000000","message":"Ack","commit_id":"0dbe7d73db1f4924696906118c185c63e2b1618a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3bd95e898b39c3604b8bb0c599452334aa113429","unresolved":true,"context_lines":[{"line_number":540,"context_line":"    #         if thread is monkey-patched."},{"line_number":541,"context_line":"    eventlet.patcher.monkey_patch(all\u003dFalse, socket\u003dTrue, select\u003dTrue,"},{"line_number":542,"context_line":"                                  thread\u003dTrue)"},{"line_number":543,"context_line":"    reload_module(logging)"},{"line_number":544,"context_line":"    # Trying to log threads while monkey-patched can lead to deadlocks; see"},{"line_number":545,"context_line":"    # https://bugs.launchpad.net/swift/+bug/1895739"},{"line_number":546,"context_line":"    logging.logThreads \u003d 0"}],"source_content_type":"text/x-python","patch_set":2,"id":"140f04b6_641551e6","line":543,"in_reply_to":"618fefd2_535615c4","updated":"2022-04-21 17:44:48.000000000","message":"I *think* the reload may be causing some of the test errors, I see some locally from test_wsgi, so I may flip back to the targeted patching of logging._lock","commit_id":"0dbe7d73db1f4924696906118c185c63e2b1618a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c3c8566ea1bd51e7e6c032def5368d4296e3083d","unresolved":true,"context_lines":[{"line_number":529,"context_line":""},{"line_number":530,"context_line":"def logging_monkey_patch():"},{"line_number":531,"context_line":"    # explicitly patch the logging lock"},{"line_number":532,"context_line":"    logging._lock \u003d logging.threading.RLock()"},{"line_number":533,"context_line":"    # setup notice level logging"},{"line_number":534,"context_line":"    logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"},{"line_number":535,"context_line":"    SysLogHandler.priority_map[\u0027NOTICE\u0027] \u003d \u0027notice\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"6a1e5bd0_0a812f31","line":532,"updated":"2022-07-27 19:58:43.000000000","message":"How comfortable are we with delaying this? It seems like we\u0027re widening the window in which some code may get a hold of a reference to the non-green lock... do we have any feel for how sideways things will go if there\u0027s code with a stale lock reference?","commit_id":"476986654eb3248b25303ab4c2d9fda1bdeee75d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a4c372b954d0c01c20494c1e34864a136adba9fc","unresolved":true,"context_lines":[{"line_number":529,"context_line":""},{"line_number":530,"context_line":"def logging_monkey_patch():"},{"line_number":531,"context_line":"    # explicitly patch the logging lock"},{"line_number":532,"context_line":"    logging._lock \u003d logging.threading.RLock()"},{"line_number":533,"context_line":"    # setup notice level logging"},{"line_number":534,"context_line":"    logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"},{"line_number":535,"context_line":"    SysLogHandler.priority_map[\u0027NOTICE\u0027] \u003d \u0027notice\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"4799cc51_d3070a7b","line":532,"updated":"2022-05-02 19:52:29.000000000","message":"I think we could make an argument to perform the same treatment on:\n\n    pyeclib.ec_iface.syslog_handler.lock","commit_id":"476986654eb3248b25303ab4c2d9fda1bdeee75d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cea7d10497595a828520a4ded30ca0f9a80c03ce","unresolved":true,"context_lines":[{"line_number":529,"context_line":""},{"line_number":530,"context_line":"def logging_monkey_patch():"},{"line_number":531,"context_line":"    # explicitly patch the logging lock"},{"line_number":532,"context_line":"    logging._lock \u003d logging.threading.RLock()"},{"line_number":533,"context_line":"    # setup notice level logging"},{"line_number":534,"context_line":"    logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"},{"line_number":535,"context_line":"    SysLogHandler.priority_map[\u0027NOTICE\u0027] \u003d \u0027notice\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"63d8aff0_cd36f772","line":532,"in_reply_to":"6a1e5bd0_0a812f31","updated":"2022-07-27 21:38:14.000000000","message":"i\u0027ve said before that I understand logging._lock as being entirely used by the logging module to control concurrent access to the global logging state (configured loggers and handlers) so that it\u0027s threadsave to call methods like \"removeHandler\"\n\nI\u0027m not worried AT ALL about this lock because we setup logging very simply and early, before we start any (green|tpool|os)threads, and then we don\u0027t reconfigure anything again.\n\nIf py3 leaves the os thread reentrent lock in place two greenthreads trying to reconfigure logging could in theory manage to trigger a race condition that corrupts thread state (all greenthreads are \"allowed\" to have the reentrent lock because they\u0027re on the same os thread) - but only if the logging module itself ALSO managed to tramponline while iterating the list of handlers or whatever.  So... I\u0027m not worried AT ALL about this lock.","commit_id":"476986654eb3248b25303ab4c2d9fda1bdeee75d"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"aab695abe35a60f10beedf38f149f75bfb8df0dc","unresolved":true,"context_lines":[{"line_number":1056,"context_line":"                       logging_lock_before)"},{"line_number":1057,"context_line":"        self.assertIsInstance(my_lock_before, type(threading.RLock()))"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"        utils.eventlet_monkey_patch()"},{"line_number":1060,"context_line":""},{"line_number":1061,"context_line":"        logging_lock_after \u003d logging._lock"},{"line_number":1062,"context_line":"        my_lock_after \u003d threading.RLock()"}],"source_content_type":"text/x-python","patch_set":1,"id":"2d685766_8e2eddc7","line":1059,"updated":"2022-04-20 18:54:55.000000000","message":"i don\u0027t think this is entirely isolated - maybe consider using a subprocess in a clean/sandbox environment?","commit_id":"e1b42ce6ebecd4e52ff5ab314154d44ad7581990"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"044e60ece057876b466085d05251161dd5bee203","unresolved":false,"context_lines":[{"line_number":1056,"context_line":"                       logging_lock_before)"},{"line_number":1057,"context_line":"        self.assertIsInstance(my_lock_before, type(threading.RLock()))"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"        utils.eventlet_monkey_patch()"},{"line_number":1060,"context_line":""},{"line_number":1061,"context_line":"        logging_lock_after \u003d logging._lock"},{"line_number":1062,"context_line":"        my_lock_after \u003d threading.RLock()"}],"source_content_type":"text/x-python","patch_set":1,"id":"e16ce869_1af6a6bd","line":1059,"in_reply_to":"2d685766_8e2eddc7","updated":"2022-04-21 11:53:02.000000000","message":"Done","commit_id":"e1b42ce6ebecd4e52ff5ab314154d44ad7581990"}]}
