)]}'
{"gerritlib/gerrit.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"d018776ef5b1e7f672ee0ecc6d22903a01bf2a8c","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            ret \u003d poll.poll()"},{"line_number":144,"context_line":"            for (fd, event) in ret:"},{"line_number":145,"context_line":"                if fd \u003d\u003d stdout.channel.fileno():"},{"line_number":146,"context_line":"                    if event \u0026 select.POLLIN:  # event is a bitmask"},{"line_number":147,"context_line":"                        self._read(stdout)"},{"line_number":148,"context_line":"                    else:"},{"line_number":149,"context_line":"                        raise Exception(\"event %s on ssh connection\" % event)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_e3156b3e","line":146,"updated":"2020-05-21 14:16:28.000000000","message":"The original code wasn\u0027t incorrect, it was simply \"read if there is data and no exceptional conditions\"; in IRC you mentioned that you\u0027re getting POLLPRI in addition to POLLIN.  That seems strange and it\u0027s worth trying to understand why.","commit_id":"8fa5326dbbc7f530462663b563063ccd4cc55915"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"6b7550b9a637ada5d4c5140a2824fc4cd620686f","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            ret \u003d poll.poll()"},{"line_number":144,"context_line":"            for (fd, event) in ret:"},{"line_number":145,"context_line":"                if fd \u003d\u003d stdout.channel.fileno():"},{"line_number":146,"context_line":"                    if event \u0026 select.POLLIN:  # event is a bitmask"},{"line_number":147,"context_line":"                        self._read(stdout)"},{"line_number":148,"context_line":"                    else:"},{"line_number":149,"context_line":"                        raise Exception(\"event %s on ssh connection\" % event)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_dcbe48ac","line":146,"in_reply_to":"ff570b3c_e3156b3e","updated":"2020-05-21 16:43:14.000000000","message":"What causes the POLLPRI is still a mistery but based on what I read so far it is a notification, not a fatal error.","commit_id":"8fa5326dbbc7f530462663b563063ccd4cc55915"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"d8215776daf9de9982aff21eb96ffb0c55b3c9ff","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            ret \u003d poll.poll()"},{"line_number":144,"context_line":"            for (fd, event) in ret:"},{"line_number":145,"context_line":"                if fd \u003d\u003d stdout.channel.fileno():"},{"line_number":146,"context_line":"                    if event \u0026 select.POLLPRI:"},{"line_number":147,"context_line":"                        GerritWatcher.log.warning("},{"line_number":148,"context_line":"                            \"POLLPRI event %s received, see \""},{"line_number":149,"context_line":"                            \"https://github.com/paramiko/paramiko/issues/1694\","}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_8f4ee9bf","line":146,"updated":"2020-09-18 13:51:39.000000000","message":"An exception is, quite literally, a signal that an unexpected and unhandled event has occurred. If we don\u0027t normally expect POLLPRI on most systems, then when it shows up that\u0027s an exceptional event we don\u0027t know for sure how to handle (because we don\u0027t know what caused it to be set). If there is a subset of deployments where POLLPRI appears for known reasons, then we should if possible limit our handling of it to the platforms where we expect it, lest we incorrectly ignore an unrelated condition on the platforms where it is atypical. Printing a warning in the logs and continuing could, in some cases, be worse than terminating the process so the administrator can carefully inspect the system and connection before attempting to resume operation.\n\nI do agree that equivalency in bitmask comparisons is rare (you should really only do it when you expect one and only one bit pattern match), so the switch to masking does seem like a good improvement to me.","commit_id":"2823692cfca6d00393a6017a970f5eaf6a5d0084"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2c231c6df8a35da29e3cff2219d7df08aad32580","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            ret \u003d poll.poll()"},{"line_number":144,"context_line":"            for (fd, event) in ret:"},{"line_number":145,"context_line":"                if fd \u003d\u003d stdout.channel.fileno():"},{"line_number":146,"context_line":"                    if event \u0026 select.POLLPRI:"},{"line_number":147,"context_line":"                        GerritWatcher.log.warning("},{"line_number":148,"context_line":"                            \"POLLPRI event %s received, see \""},{"line_number":149,"context_line":"                            \"https://github.com/paramiko/paramiko/issues/1694\","}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_bac26d85","line":146,"range":{"start_line":146,"start_character":38,"end_line":146,"end_character":45},"updated":"2020-08-27 22:35:45.000000000","message":"On linux this seems to mean a very specific thing for tcp connections: there is out of band data to read. Since we don\u0027t know how to read out of band data in this code base I think the old behavior of raising an exception when that happens is correct for linux.\n\nOn OSX this POLLPRI behavior seems reproduceable but I\u0027m not able to find out what it means on OSX. https://github.com/python-trio/trio/issues/61#issuecomment-546781689 implies it is not out of band though could be that the same flags are set.\n\nI think to support this properly we need to understand what OSX is telling us here then properly read the info so that the event can be reset and raised again if necessary. On linux I think we should keep the old behavior unless we add out of band data processing. Otherwise we\u0027ll just spam the logs that there is out of band data there. The old behavior of erroring if we get something we don\u0027t expect seems safer.","commit_id":"2823692cfca6d00393a6017a970f5eaf6a5d0084"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"2a07dcf1ce976dfac4a906bbbab5d278024f6013","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            ret \u003d poll.poll()"},{"line_number":144,"context_line":"            for (fd, event) in ret:"},{"line_number":145,"context_line":"                if fd \u003d\u003d stdout.channel.fileno():"},{"line_number":146,"context_line":"                    if event \u0026 select.POLLPRI:"},{"line_number":147,"context_line":"                        GerritWatcher.log.warning("},{"line_number":148,"context_line":"                            \"POLLPRI event %s received, see \""},{"line_number":149,"context_line":"                            \"https://github.com/paramiko/paramiko/issues/1694\","}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_4016bfa9","line":146,"range":{"start_line":146,"start_character":38,"end_line":146,"end_character":45},"in_reply_to":"9f560f44_bac26d85","updated":"2020-08-28 11:36:57.000000000","message":"Please show me the specification that states that a program should raise an exception if POLLPRI bit is found on the event mask.\n\nAFAIK, the `event \u003d\u003d select.POLLIN` is a serious bug that should have never happen. I did low level programming for a good number of years to learn that you likely never check bit-marks using \"\u003d\u003d\" operator, it is a recipe for failure.\n\nThere are bits that not even used and any presence of another bit would make the code choke.\n\nUnless the original intent was to make it explode on other systems, that needs to go out.\n\nI think that my original change was to replace \u003d\u003d with \u0026, but I was asked to add some debuging code, so we would better know what happened.\n\nEven POSIX/SUS specification examples do not make use of \u003d\u003d on bitmask test, see https://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html\n\nWhenever we decide to do something about POLLPRI or not, that is up to you, but fixing the incorrect \u003d\u003d is a must.\n\nI can think of a multitude of oob messages that could happen and that should not produce a HUP. The other side may say that it requires a keepalive, or that it is close to reaching its own buffer and will start to drop data. None of this indicate that you should not continue to read data when POLLIN is present.","commit_id":"2823692cfca6d00393a6017a970f5eaf6a5d0084"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"bac2d5439191169e9d18d06bd397d7a94ec3f464","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            for (fd, event) in ret:"},{"line_number":145,"context_line":"                if fd \u003d\u003d stdout.channel.fileno():"},{"line_number":146,"context_line":"                    if event \u0026 select.POLLPRI:"},{"line_number":147,"context_line":"                        GerritWatcher.log.warning("},{"line_number":148,"context_line":"                            \"POLLPRI event %s received, see \""},{"line_number":149,"context_line":"                            \"https://github.com/paramiko/paramiko/issues/1694\","},{"line_number":150,"context_line":"                            event)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_07db744e","line":147,"range":{"start_line":147,"start_character":24,"end_line":147,"end_character":37},"updated":"2020-08-25 19:39:22.000000000","message":"Nit we use self.log elsewhere (I don\u0027t think we override the logger in the class instances so shouldn\u0027t matter).","commit_id":"2823692cfca6d00393a6017a970f5eaf6a5d0084"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"8380c73ab88efbcd20963aa140cf10898fa7c9ab","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                    # event is a bitmask"},{"line_number":149,"context_line":"                    # On Darwin non-critical OOB messages can be received"},{"line_number":150,"context_line":"                    if (IS_LINUX and event \u003d\u003d select.POLLIN) or \\"},{"line_number":151,"context_line":"                            (IS_LINUX and event \u0026 select.POLLIN):"},{"line_number":152,"context_line":"                        self._read(stdout)"},{"line_number":153,"context_line":"                    else:"},{"line_number":154,"context_line":"                        raise Exception(\"event %s on ssh connection\" % event)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_e72245a4","line":151,"range":{"start_line":151,"start_character":29,"end_line":151,"end_character":37},"updated":"2020-11-02 22:32:08.000000000","message":"Was this meant to be:\n\n  (not IS_LINUX and event \u0026 select.POLLIN)\n\n?","commit_id":"29fbbb9e1dc54b0ff2627ea3d7b948e0e21af494"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"0ff3c6f2532320bf2ac475934473ff643ec2ab6a","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                    # event is a bitmask"},{"line_number":149,"context_line":"                    # On Darwin non-critical OOB messages can be received"},{"line_number":150,"context_line":"                    if (IS_LINUX and event \u003d\u003d select.POLLIN) or \\"},{"line_number":151,"context_line":"                            (IS_LINUX and event \u0026 select.POLLIN):"},{"line_number":152,"context_line":"                        self._read(stdout)"},{"line_number":153,"context_line":"                    else:"},{"line_number":154,"context_line":"                        raise Exception(\"event %s on ssh connection\" % event)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_ffd52f1d","line":151,"range":{"start_line":151,"start_character":29,"end_line":151,"end_character":37},"in_reply_to":"1f621f24_e72245a4","updated":"2020-11-12 14:03:41.000000000","message":"Fixed.","commit_id":"29fbbb9e1dc54b0ff2627ea3d7b948e0e21af494"}]}
