[zeromq-dev] JeroMQ 0.3.5 - Purpose of assert on line 173 Signaler.java

Telford Berkey tberkey at synthostech.com
Tue Jul 28 23:04:50 CEST 2015


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


More information about the zeromq-dev mailing list