Uploaded image for project: 'libzmq'
  1. libzmq
  2. LIBZMQ-279

RuntimeError when calling zmq.Context on a computer with a firewall

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.7, 2.1.10
    • Fix Version/s: None
    • Component/s: core
    • Labels:
    • Environment:

      Windows with a firewall

      Description

      Hi,

      I use pyzmq in one of my program and some users reported a RunTimeError when launching the software.
      After investigation, I found that if I install COMODO firewall on the computer with the maximum security set, just by calling zmq.Context(), I have a crash.
      Here is the trace:

      Assertion failed: Permission denied (......\src\signaler.cpp:219)
      This application has requested the Runtime to terminate it in an unusual way.
      Please contact the application's support team for more information

      Is there a way to avoid this ? I have done the test on pyzmq-2.1.10.win32-py2.7 and pyzmq-2.1.7.

      Of course, I reported the problem on the pyzmq bugtracker (https://github.com/zeromq/pyzmq/issues/152) and they asked me to put it her. I also asked for my users to disable their firewall (for test purpose), it worked for some of them but not for everybody.

      Thanks in advance.

        Gliffy Diagrams

          Attachments

            Activity

            {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: darkpotpot; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Julien POTIRON created issue -
            Hide
            {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: sustrik; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Martin Sustrik added a comment -

            This problem is caused by emulating socketpair via TCP. It uses randomly chosen port to accomplish the task, which in turn is blocked by the firewall.

            The problem could be solved by fixing the port used for sockepair emulation and configuring the firewall so that local connections on given port are allowed.

            Patch attached to this issue should fix 0MQ to use fixed port, namely port 5905:

            https://zeromq.jira.com/browse/LIBZMQ-265

            Show
            {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: sustrik; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Martin Sustrik added a comment - This problem is caused by emulating socketpair via TCP. It uses randomly chosen port to accomplish the task, which in turn is blocked by the firewall. The problem could be solved by fixing the port used for sockepair emulation and configuring the firewall so that local connections on given port are allowed. Patch attached to this issue should fix 0MQ to use fixed port, namely port 5905: https://zeromq.jira.com/browse/LIBZMQ-265
            Hide
            {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: darkpotpot; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Julien POTIRON added a comment -

            Oh, thanks for the quick answer. I'll look at it.

            Show
            {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: darkpotpot; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Julien POTIRON added a comment - Oh, thanks for the quick answer. I'll look at it.
            Hide
            {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: pieterh; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Pieter Hintjens added a comment -

            Julien, have you tried the patch and does it work?

            Show
            {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: pieterh; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Pieter Hintjens added a comment - Julien, have you tried the patch and does it work?
            Hide
            {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: hurtonm; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Martin Hurton added a comment -

            I think this was fixed by 81da391e7e6ee12a2607289a1aae16c400e7025e.

            Show
            {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: hurtonm; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Martin Hurton added a comment - I think this was fixed by 81da391e7e6ee12a2607289a1aae16c400e7025e.
            {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: hurtonm; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Martin Hurton made changes -
            Field Original Value New Value
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: pieterh; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Pieter Hintjens made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            Assignee Martin Sustrik [ sustrik ]

              People

              • Assignee:
                {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: ; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Unassigned
                Reporter:
                {annotationCollection: [{}], annotations: [{}], collectionInheritableAnnotations: [{}], declaredAnnotations: [{}], description: Annotated value: darkpotpot; Annotations: [@com.atlassian.velocity.htmlsafe.HtmlSafe()]} Julien POTIRON
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: