libzmq
  1. libzmq
  2. LIBZMQ-569

Socket server crashes with random client data

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0.0, 4.0.1
    • Fix Version/s: 4.1.0, 4.0.2
    • Component/s: core
    • Labels:
      None
    • Environment:

      MacOSX 10.8.5, zmq 4.x (any version, including current git head), jzmq 2 or 3, java 7

      Description

      Compile any zmq 4, from download, git master, branches.
      Then jzmq 2 or 3.
      Create a simple java client similar to the first example from the book, like:

      final ZContext context = new ZContext();
      final Socket socket = context.createSocket(ZMQ.REP);
      socket.bind("tcp://*:5555");
      byte[] msg = socket.recv();

      On a different console, run telnet localhost 5555 and write some chars plus enter.

      The java code (.recv()) dies with the following line:
      Assertion failed: buffer_size == header_size (stream_engine.cpp:484

        Activity

        Hide
        Bruno D. Rodrigues added a comment -

        The patch https://github.com/zeromq/libzmq/pull/708 on zmq branch resolves this issue.

        Show
        Bruno D. Rodrigues added a comment - The patch https://github.com/zeromq/libzmq/pull/708 on zmq branch resolves this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Bruno D. Rodrigues
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: