[zeromq-dev] JeroMQ 0.3.5 - Purpose of assert on line 173 Signaler.java
Telford Berkey
tberkey at synthostech.com
Wed Jul 29 05:27:05 CEST 2015
Min,
MemDBConnection implements Closeable, the sockets are closed in close().
The asserts occur before executor.shutdown(). The following is a stack trace.
23:23:18.285 [main] INFO o.s.m.TestFinchAPIThreaded - Finch API Collection Test
23:23:18.287 [main] INFO o.s.m.TestFinchAPIThreaded - Working Directory = D:\github\tberkey\MemDB\api\java
23:23:18.288 [main] INFO o.s.m.TestFinchAPIThreaded - Connecting to url: tcp://memdb-dev-1.aws.synthostech.com:5677
23:23:18.291 [pool-1-thread-1] INFO o.s.m.TestFinchAPIThreaded - pool-1-thread-1 Start
23:23:18.291 [pool-1-thread-2] INFO o.s.m.TestFinchAPIThreaded - pool-1-thread-2 Start
23:23:18.291 [pool-1-thread-3] INFO o.s.m.TestFinchAPIThreaded - pool-1-thread-3 Start
23:23:18.291 [pool-1-thread-4] INFO o.s.m.TestFinchAPIThreaded - pool-1-thread-4 Start
23:23:18.291 [pool-1-thread-5] INFO o.s.m.TestFinchAPIThreaded - pool-1-thread-5 Start
23:23:18.291 [pool-1-thread-6] INFO o.s.m.TestFinchAPIThreaded - pool-1-thread-6 Start
23:23:18.291 [pool-1-thread-7] INFO o.s.m.TestFinchAPIThreaded - pool-1-thread-7 Start
23:23:18.291 [pool-1-thread-8] INFO o.s.m.TestFinchAPIThreaded - pool-1-thread-8 Start
23:23:18.291 [pool-1-thread-9] INFO o.s.m.TestFinchAPIThreaded - pool-1-thread-9 Start
23:23:18.291 [pool-1-thread-10] INFO o.s.m.TestFinchAPIThreaded - pool-1-thread-10 Start
Exception in thread "pool-1-thread-7" 23:23:21.568 [pool-1-thread-11] INFO o.s.m.TestFinchAPIThreaded - pool-1-thread-11 Start
java.lang.AssertionError
at zmq.Signaler.recv(Signaler.java:173)
at zmq.Mailbox.recv(Mailbox.java:101)
at zmq.SocketBase.processCommands(SocketBase.java:864)
at zmq.SocketBase.send(SocketBase.java:627)
at org.zeromq.ZMQ$Socket.send(ZMQ.java:1302)
at org.zeromq.ZFrame.send(ZFrame.java:150)
at org.zeromq.ZFrame.sendAndKeep(ZFrame.java:165)
at org.zeromq.ZMsg.send(ZMsg.java:210)
at org.zeromq.ZMsg.send(ZMsg.java:182)
at org.synthostech.memdb.MemdbMap.send(MemdbMap.java:973)
at org.synthostech.memdb.MemDbConnection.<init>(MemDbConnection.java:88)
at org.synthostech.memdb.MemDbConnection.getMemDbConnection(MemDbConnection.java:64)
at org.synthostech.memdb.TestFinchAPIThreaded$Worker$1.initialValue(TestFinchAPIThreaded.java:38)
at org.synthostech.memdb.TestFinchAPIThreaded$Worker$1.initialValue(TestFinchAPIThreaded.java:36)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
at java.lang.ThreadLocal.get(ThreadLocal.java:170)
at org.synthostech.memdb.TestFinchAPIThreaded$Worker.processCommand(TestFinchAPIThreaded.java:86)
at org.synthostech.memdb.TestFinchAPIThreaded$Worker.run(TestFinchAPIThreaded.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Telford Berkey
Software Architect
tberkey at synthostech.com
Synthos Technologies, A Division of Qbase, LLC
3800 Pentagon Blvd., Suite 110
Beavercreek, OH 45431
office: +937-521-4200
www.synthostechnologies.com
-----Original Message-----
From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Dongmin Yu
Sent: Tuesday, July 28, 2015 8:11 PM
To: ZeroMQ development list <zeromq-dev at lists.zeromq.org>
Subject: Re: [zeromq-dev] JeroMQ 0.3.5 - Purpose of assert on line 173 Signaler.java
I was not able to reproduce the problem as I can compile without MemDBConnection class.
I have a quick question. Do you have any stack traces around the assert? Did the assert occurs before or after of executor.shutdown? And what explicitly closes the zeromq sockets?
Thanks
Min
> On Jul 28, 2015, at 2:04 PM, Telford Berkey <tberkey at synthostech.com> wrote:
>
> Test case is at, http://pastebin.com/kP7ZDuEJ
>
> MemDBConnection contains both ZContext and Socket as private attributes. MemDBConnection is a ThreadLocal in the worker, therefore each thread should get its own unique copy.
>
> private ZContext m_context;
> private Socket m_routerSocket;
>
> I've experimented with making the Socket a ThreadLocal, but this didn't change the behavior.
>
> When the assert trips, nbytes is always equal to zero.
>
> Telford Berkey
> Software Architect
> tberkey at synthostech.com
>
>
>
> Synthos Technologies, A Division of Qbase, LLC
> 3800 Pentagon Blvd., Suite 110
> Beavercreek, OH 45431
>
> office: +937-521-4200
>
> www.synthostechnologies.com
>
> -----Original Message-----
> From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Dongmin Yu
> Sent: Tuesday, July 28, 2015 3:44 PM
> To: ZeroMQ development list <zeromq-dev at lists.zeromq.org>
> Subject: Re: [zeromq-dev] JeroMQ 0.3.5 - Purpose of assert on line 173 Signaler.java
>
> That could happens if you share zeromq socket between threads or Thread.interrupt is used.
>
> Could you upload your test case?
>
> Thanks
> Min
>
>> On Jul 28, 2015, at 12:32 PM, Telford Berkey <tberkey at synthostech.com> wrote:
>>
>> While running load tests with JeroMQ 0.3.5, I’ve periodically received an assertion error for line 173 in Signaler.java.
>>
>> Other than the assert, there isn’t any error handling related to the number of bytes not being equal to 1. If asserts are disabled for this class, everything runs correctly and messages are received fine.
>>
>> …
>> assert nbytes == 1;
>> …
>>
>> Are there any issues with disabling asserts for Signaler.java? If not, what is the purpose of line 173?
>>
>> Regards.
>>
>> Telford Berkey
>> Software Architect
>> tberkey at synthostech.com
>>
>> <image001.jpg>
>>
>> Synthos Technologies, A Division of Qbase, LLC
>> 3800 Pentagon Blvd., Suite 110
>> Beavercreek, OH 45431
>>
>> office: +937-521-4200
>>
>> www.synthostechnologies.com
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list