[zeromq-dev] memory leak in PUB/SUB sockets

2010-10-01 Thread Daniel Sentenac
Hello, I am currently evaluating zeromq in PUB/SUB configuration for a video distribution system. The server runs on Linux (Scientific Linux 2.6.23.9-i386-1.12-00 #3 SMP Wed Jun 24 10:34:37 CEST 2009 i686 athlon i386 GNU/Linux). The server is written in C and basically does : /* Initialise 0MQ

[zeromq-dev] memory leak in PUB/SUB sockets

2010-10-04 Thread Daniel Sentenac
Hi Gonzalo, In answer to the Java bindings issue. I encountered the same problem as already mentioned in a precedent thread. I compiled the bindings without problems following README instructions. If I try the example in /perf: java -Djava.library.path=/virgoDev/zmq/v2r0p9/lib -classpath /virgoD

[zeromq-dev] memory leak in PUB/SUB sockets

2010-10-05 Thread Daniel Sentenac
Hi All, Has anybody anything to say about the test case I posted ? Any problem to get it ? thanks, Daniel ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev

[zeromq-dev] memory leak in PUB/SUB sockets

2010-10-05 Thread Daniel Sentenac
I repost the test case: /* The server part */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include #include #include #include #include int main (int argc, char *argv []) { const char *bind_to; int message_size; void *ctx; void *s; int rc;

[zeromq-dev] memory leak in PUB/SUB sockets

2010-10-07 Thread Daniel Sentenac
Hi, I have been digging in the code to understand the mechanism of allocation/deallocation of the messages in PUB/SUB mode, and I have found a the way to cure the memory leak. In pub.cpp: // Push the message to all destinations. for (pipes_t::size_type i = 0; i != active;) { if (!wri

Re: [zeromq-dev] memory leak in PUB/SUB sockets

2010-10-01 Thread Martin Sustrik
Hi Daniel, Can you produce the minimal test case that exhibits the behaviour? I'll have a look at it then. Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] memory leak in PUB/SUB sockets

2010-10-01 Thread Sven Koebnick
that reminds me of my recently reported problem, that poll returns wrong codes.I thought, that it's been completely my fault, because I accidentially called poll() twice on a socket before recv()ing, BUT:the second call to poll() should still tell me, that data is availably, which does not happen (

Re: [zeromq-dev] memory leak in PUB/SUB sockets

2010-10-01 Thread Martin Sustrik
Sven, > that reminds me of my recently reported problem, that poll returns wrong > codes. > I thought, that it's been completely my fault, because I accidentially > called poll() twice on a socket before recv()ing, BUT: > the second call to poll() should still tell me, that data is availably, > wh

Re: [zeromq-dev] memory leak in PUB/SUB sockets

2010-10-01 Thread Daniel Sentenac
Hello, Please find enclosed two files resulting from a modified version of the original remote_th and local_th from zeromq-2.0.9 and recompiled in the same environment. We want to evidence here a problem where the sender has difficulties to manage the queue when receiver is slower to acknowle

Re: [zeromq-dev] memory leak in PUB/SUB sockets

2010-10-01 Thread gonzalo diethelm
> The receiver clients run on a Linux similar platform. The client is > written in Java with my own bindings since I couldn't make work the ones > provided with in jzmq release (problem at run time to locate the > function libraries, already reported in other mails, and according to me > is not sol

Re: [zeromq-dev] memory leak in PUB/SUB sockets

2010-10-04 Thread gonzalo diethelm
> In answer to the Java bindings issue. I encountered the same problem as > already mentioned in a precedent thread. > I compiled the bindings without problems following README instructions. > If I try the example in /perf: > java -Djava.library.path=/virgoDev/zmq/v2r0p9/lib -classpath > /virgoDev/

Re: [zeromq-dev] memory leak in PUB/SUB sockets

2010-10-04 Thread Daniel Sentenac
gonzalo diethelm wrote: >> In answer to the Java bindings issue. I encountered the same problem >> > as > >> already mentioned in a precedent thread. >> I compiled the bindings without problems following README >> > instructions. > >> If I try the example in /perf: >> java -Djava.li

Re: [zeromq-dev] memory leak in PUB/SUB sockets

2010-10-04 Thread gonzalo diethelm
> > Wouldn't this point to the fact that you are not finding the shared > > library (native code) that underlies the Java binding? Where are both > > your libzmq.so and libjzmq.so libraries located? Are both those > > locations in your LD_LIBRARY_PATH or in any place that can be found by > > the dy

Re: [zeromq-dev] memory leak in PUB/SUB sockets

2010-10-04 Thread Daniel Sentenac
gonzalo diethelm wrote: >> In answer to the Java bindings issue. I encountered the same problem >> > as > >> already mentioned in a precedent thread. >> I compiled the bindings without problems following README >> > instructions. > >> If I try the example in /perf: >> java -Djava.li

Re: [zeromq-dev] memory leak in PUB/SUB sockets

2010-10-04 Thread gonzalo diethelm
> Well, does this apply to you? This is rather weird, I compile & use the > Java binding on a daily basis (on Windows XP) and I have seen people on > this list using it from other platforms, and they don't report having > this problem. Are you in any way modifying the Java binding prior to its > >

Re: [zeromq-dev] memory leak in PUB/SUB sockets

2010-10-07 Thread Martin Sustrik
Hi Daniel, Good spot! Please to submit the patch as described here: http://www.zeromq.org/docs:contributing Thanks! Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev