jzmq icon indicating copy to clipboard operation
jzmq copied to clipboard

Runtime Error in newest version.

Open plucury opened this issue 11 years ago • 4 comments

When I try to start my java application, I got the error as follow:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00002aaab833b342, pid=24688, tid=1093589312
#
# JRE version: 6.0_45-b06
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.45-b01 mixed mode linux-     amd64 compressed oops)
# Problematic frame:
# C  [libzmq.so.3+0x27342]  zmq::socket_base_t::check_tag()+0x2
#
# An error report file with more information is saved as:
# xxxxxxxxx/hs_err_pid24688.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

And the file hs_err_pid24688.log is here: https://gist.github.com/plucury/6914247

Then I reset the git version to fdfb9c06941ae082f9703ff71466410249a951c1 and I can run my application well.

plucury avatar Oct 10 '13 07:10 plucury

Can you provide a small test case that recreates your error?

For posterity, did you update libjzmq to the latest as well?

trevorbernard avatar Oct 10 '13 10:10 trevorbernard

https://github.com/zeromq/jzmq3-x/archive/v3.0.1.zip

trevorbernard avatar Oct 10 '13 11:10 trevorbernard

@trevorbernard

I try to use the package above. But it still not work. And I compiled libzmq from the master of https://github.com/zeromq/zeromq3-x

Here is some code grep from my appliction:

public class ZMQRouter implements Runnable {

    private final static Logger logger = Logger.getLogger(ZMQRouter.class);

    @Override
    public void run() {
        ZContext ctx = new ZContext();

        // Frontend socket talks to clients over TCP
        Socket frontend = ctx.createSocket(ZMQ.ROUTER);
        frontend.bind("ipc:///tmp/redistask.ipc");

        // Backend socket talks to workers over inproc
        Socket backend = ctx.createSocket(ZMQ.DEALER);
        backend.bind("inproc://backend");

        int workerNum = ConfigService.getIntProperty(
            ConfigConsistent.ZMQ_WORKER_NUM, 16);
        for (int threadNbr = 0; threadNbr < workerNum; threadNbr++) {
            new Thread(new ZMQWorker(ctx, threadNbr)).start();
        }

        // Connect backend to frontend via a proxy
        try {
            ZMQ.proxy(frontend, backend, null);
        } catch (Throwable e) {
            logger.error("ZMQ Proxy Exception", e);
        }

        // ctx.destroy();
    }
}

Thanks for your help!

plucury avatar Oct 11 '13 02:10 plucury

I had a similar problem. What I accidantely did is I've installed jzmq with git clone/autogen/configure/make/make install but I used the much older jar file via maven (2.2.2). Now I use the jar file from the cloned src directory and it works like a charm.

JonasKunze avatar Nov 23 '13 21:11 JonasKunze