Re: [zeromq-dev] solaris 10 Spart jzmq autogen.sh error
OpenPGM doesn't fair to well as Autoconf 2.59 misses all the C99 bits, presumably why you are recommended to copy the macros in-tree. Preparing with a newer version gets to a certain point and other problems arise. -- Steve-o ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] solaris 10 Spart jzmq autogen.sh error
On 16 March 2011 11:01, Steven McCoy wrote: > On 16 March 2011 03:42, Mikko Koppanen wrote: > >> I got autotools installed from pkg-get and autogen.sh seems to >> succeed. Using the default shell on Solaris 10: >> >> > Tried the Sun build on the companion CD and it fails, version 2.59 > > After lowering the Autoconf version check to 2.59 it still required manual running instead of autogen.sh: PATH=/opt/sfw/bin/:$PATH autoreconf --install --force --verbose -I config PATH=/opt/sfw/bin/:$PATH aclocal PATH=/opt/sunstudio12.1/bin:/usr/ccs/bin:/opt/sfw/bin:$PATH ./configure PATH=/opt/sunstudio12.1/bin:/usr/ccs/bin:/opt/sfw/bin:$PATH make Test results: PASS: test_pair_inproc PASS: test_pair_tcp PASS: test_reqrep_inproc PASS: test_reqrep_tcp PASS: test_hwm Too many open files sock != -1 (tcp_listener.cpp:322) bash: line 5: 21448 Abort (core dumped) ${dir}$tst FAIL: test_shutdown_stress PASS: test_pair_ipc PASS: test_reqrep_ipc 1 of 8 tests failed Please report to zeromq-dev@lists.zeromq.org The default file descriptor limit is 256, raising to 1024 passed. -- Steve-o ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] solaris 10 Spart jzmq autogen.sh error
On 16 March 2011 03:42, Mikko Koppanen wrote: > I got autotools installed from pkg-get and autogen.sh seems to > succeed. Using the default shell on Solaris 10: > > Tried the Sun build on the companion CD and it fails, version 2.59 steve-o@ryoko:/tmp/zeromq2$ *PATH=/opt/sfw/bin/:$PATH ./autogen.sh* autoreconf: Entering directory `.' autoreconf: configure.in: not using Gettext autoreconf: running: aclocal --force -I config /usr/share/aclocal/vorbis.m4:9: warning: underquoted definition of XIPH_PATH_VORBIS run info '(automake)Extending aclocal' or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal /usr/share/aclocal/vorbis-old.m4:9: warning: underquoted definition of AM_PATH_VORBIS /usr/share/aclocal/pkg.m4:5: warning: underquoted definition of PKG_CHECK_MODULES /usr/share/aclocal/ogg.m4:8: warning: underquoted definition of XIPH_PATH_OGG /usr/share/aclocal/ogg-old.m4:8: warning: underquoted definition of AM_PATH_OGG /usr/share/aclocal/esd.m4:10: warning: underquoted definition of AM_PATH_ESD /usr/share/aclocal/esd.m4:175: warning: underquoted definition of AM_ESD_SUPPORTS_MULTIPLE_RECORD /usr/share/aclocal/audiofile.m4:12: warning: underquoted definition of AM_PATH_AUDIOFILE /usr/sfw/share/aclocal/gtk.m4:7: warning: underquoted definition of AM_PATH_GTK /usr/sfw/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB /usr/sfw/share/aclocal/gimpprint.m4:8: warning: underquoted definition of AM_PATH_GIMPPRINT configure.in:3: error: Autoconf version 2.61 or higher is required configure.in:3: the top level autom4te: /usr/sfw/bin/gm4 failed with exit status: 63 aclocal: autom4te failed with exit status: 63 autoreconf: aclocal failed with exit status: 63 autogen.sh: error: autoreconf exited with status 0 -- Steve-o ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] JZMQ: Problems building on win32 (MS Visual Studio)
I got it sorted, the output directory needs to be set for VS2010 per this article: http://www.mansysadmin.com/2011/03/using-zeromq-framework-with-visual-studio-2010-tutorial/ Cheers, Michael On Tue, 2011-03-15 at 15:38 -0700, Michael Kogan wrote: > I beleive that it will be used when creating the file - but you should be > creating a dll and shipping 2 dlls. Still you need to configure libpath in > visual studio to point to the directory with the libzmq.lib > On Mar 15, 2011, at 3:02 PM, Michael Compton wrote: > > > But the jzmq was specifically looking for libzmq.lib. > > > > On Tue, 2011-03-15 at 14:47 -0700, Michael Kogan wrote: > >> You need to produce a dll for the library to be used with JNI. > >> Also, make sure that the dlls produced by compiling zeromq are in your > >> linker's path. > >> > >> > >> On Mar 15, 2011, at 2:42 PM, Michael Compton wrote: > >> > >>> On Tue, 2011-03-15 at 21:23 +0100, C. Huntz wrote: > Le 15/03/2011 21:00, Michael Compton a écrit : > > Hi, > > > > I am having problems building jzmq on Win32. > > > > I built libzmq to output a lib file (libzmq.lib), but when I try > > building jmzq I get around 20 errors of unresolved external symbols for > > what seems like all the functions in libzmq. > > > > Any suggestions? > > > > Cheers, > > Michael > > > > ___ > > zeromq-dev mailing list > > zeromq-dev@lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > Hi, > I use MS visual Xpress 2008 to do the same stuff without any issue, 2 > weeks ago. > May it comes from your MSV version, > Christophe > > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >>> > >>> Hi Christpohe > >>> > >>> Do you also change the build from a dll to a lib in the project > >>> properties. > >>> > >>> I am using Visual Studio 2010 Ultimate edition (perks of the job). It's > >>> feasible that is the problem. > >>> > >>> Cheers, > >>> Michael > >>> > >>> ___ > >>> zeromq-dev mailing list > >>> zeromq-dev@lists.zeromq.org > >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> > >> ___ > >> zeromq-dev mailing list > >> zeromq-dev@lists.zeromq.org > >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > > ___ > > zeromq-dev mailing list > > zeromq-dev@lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] operator void* on socket_t
Hi On IRC this evening some example code was posted up. which contained zmq::socket_t subscriber(context, ZMQ_SUB); . some time later free (subscriber); It's obviously going to be bad if this ever executes, but the main point is this only compiles because of the operator void * on the socket class. The sooner this can be replaced with a 'handle' method the better. Jon ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] [PATCH] XREP sockets, identity message and HWM
Hi Found an issue with the identities and XREP sockets with HWM set. If the pipe is full the socket state needs to be reset before the xsend method is called again. There's also a test program which asserted prior to this patch. On another note, I am not sure the HWM is being honoured correctly at the moment, but that would require confirmation from Martin S. I expected the main thread to block at message 5, as that is the HWM. Thoughts? Jon #include #include #include extern "C" { struct args { zmq::context_t * ctx; const char * name; }; void * worker (void * arg) { zmq::context_t* ctx = ((args*)arg)->ctx; const char* name = ((args*)arg)->name; zmq::socket_t s (*ctx, ZMQ_XREQ); s.setsockopt(ZMQ_IDENTITY,name, strlen(name)); s.connect("tcp://127.0.0.1:"); std::cout << "sleeping" << std::endl; ::sleep(20); std::cout << "starting" << std::endl; while (true) { zmq::message_t m; s.recv(&m); std::cout << " got message sz = " << m.size() << std::endl; } ::sleep(86400); return arg; } } int main(int argc , char* argv[]) { const char * n = "XYZ"; zmq::context_t ctx(1); struct args a = { &ctx, n }; zmq::socket_t s (ctx, ZMQ_XREP); uint64_t hwm = 5; size_t sz = sizeof(uint64_t); s.setsockopt(ZMQ_HWM,&hwm,sz); s.bind("tcp://127.0.0.1:"); pthread_t ptid; int ok = pthread_create(&ptid, NULL, worker, &a); std::cout << "wait" << std::endl; ::sleep(5); std::cout << "start sending" << std::endl; for (int i = 0 ; i <= (hwm *2) ; ++i) { zmq::message_t address(3); char * data = (char*)address.data(); strncpy(data,a.name,3); zmq::message_t blank; zmq::message_t payload(10); bool sent; std::cout << " i = " << i << std::endl; sent = s.send(address, ZMQ_SNDMORE); std:: cout << " address sent = " << sent << std::endl; sent = s.send(blank, ZMQ_SNDMORE); std:: cout << " blank sent = " << sent << std::endl; sent = s.send(payload,0); std:: cout << " payload sent = " << sent << std::endl; std::cout << std::endl; } // do nothing ::sleep(86400); } >From c9c5c0dffa32e2c4cb75c8ff369e8889b610808e Mon Sep 17 00:00:00 2001 From: Jon Dyte Date: Tue, 15 Mar 2011 23:08:12 + Subject: [PATCH] reset socket state when identity message cannot be written to xrep Signed-off-by: Jon Dyte --- src/xrep.cpp |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/xrep.cpp b/src/xrep.cpp index 5406a0b..039908b 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -186,6 +186,8 @@ int zmq::xrep_t::xsend (zmq_msg_t *msg_, int flags_) if (!current_out->check_write (&empty)) { rc = zmq_msg_close (&empty); zmq_assert (rc == 0); +more_out = false; +current_out = NULL; it->second.active = false; errno = EAGAIN; return -1; -- 1.6.3.3 ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] JZMQ: Problems building on win32 (MS Visual Studio)
I beleive that it will be used when creating the file - but you should be creating a dll and shipping 2 dlls. Still you need to configure libpath in visual studio to point to the directory with the libzmq.lib On Mar 15, 2011, at 3:02 PM, Michael Compton wrote: > But the jzmq was specifically looking for libzmq.lib. > > On Tue, 2011-03-15 at 14:47 -0700, Michael Kogan wrote: >> You need to produce a dll for the library to be used with JNI. >> Also, make sure that the dlls produced by compiling zeromq are in your >> linker's path. >> >> >> On Mar 15, 2011, at 2:42 PM, Michael Compton wrote: >> >>> On Tue, 2011-03-15 at 21:23 +0100, C. Huntz wrote: Le 15/03/2011 21:00, Michael Compton a écrit : > Hi, > > I am having problems building jzmq on Win32. > > I built libzmq to output a lib file (libzmq.lib), but when I try > building jmzq I get around 20 errors of unresolved external symbols for > what seems like all the functions in libzmq. > > Any suggestions? > > Cheers, > Michael > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > Hi, I use MS visual Xpress 2008 to do the same stuff without any issue, 2 weeks ago. May it comes from your MSV version, Christophe ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >>> Hi Christpohe >>> >>> Do you also change the build from a dll to a lib in the project >>> properties. >>> >>> I am using Visual Studio 2010 Ultimate edition (perks of the job). It's >>> feasible that is the problem. >>> >>> Cheers, >>> Michael >>> >>> ___ >>> zeromq-dev mailing list >>> zeromq-dev@lists.zeromq.org >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> ___ >> zeromq-dev mailing list >> zeromq-dev@lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] JZMQ: Problems building on win32 (MS Visual Studio)
But the jzmq was specifically looking for libzmq.lib. On Tue, 2011-03-15 at 14:47 -0700, Michael Kogan wrote: > You need to produce a dll for the library to be used with JNI. > Also, make sure that the dlls produced by compiling zeromq are in your > linker's path. > > > On Mar 15, 2011, at 2:42 PM, Michael Compton wrote: > > > On Tue, 2011-03-15 at 21:23 +0100, C. Huntz wrote: > >> Le 15/03/2011 21:00, Michael Compton a écrit : > >>> Hi, > >>> > >>> I am having problems building jzmq on Win32. > >>> > >>> I built libzmq to output a lib file (libzmq.lib), but when I try > >>> building jmzq I get around 20 errors of unresolved external symbols for > >>> what seems like all the functions in libzmq. > >>> > >>> Any suggestions? > >>> > >>> Cheers, > >>> Michael > >>> > >>> ___ > >>> zeromq-dev mailing list > >>> zeromq-dev@lists.zeromq.org > >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >>> > >> Hi, > >> I use MS visual Xpress 2008 to do the same stuff without any issue, 2 > >> weeks ago. > >> May it comes from your MSV version, > >> Christophe > >> > >> > >> ___ > >> zeromq-dev mailing list > >> zeromq-dev@lists.zeromq.org > >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > Hi Christpohe > > > > Do you also change the build from a dll to a lib in the project > > properties. > > > > I am using Visual Studio 2010 Ultimate edition (perks of the job). It's > > feasible that is the problem. > > > > Cheers, > > Michael > > > > ___ > > zeromq-dev mailing list > > zeromq-dev@lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] JZMQ: Problems building on win32 (MS Visual Studio)
You need to produce a dll for the library to be used with JNI. Also, make sure that the dlls produced by compiling zeromq are in your linker's path. On Mar 15, 2011, at 2:42 PM, Michael Compton wrote: > On Tue, 2011-03-15 at 21:23 +0100, C. Huntz wrote: >> Le 15/03/2011 21:00, Michael Compton a écrit : >>> Hi, >>> >>> I am having problems building jzmq on Win32. >>> >>> I built libzmq to output a lib file (libzmq.lib), but when I try >>> building jmzq I get around 20 errors of unresolved external symbols for >>> what seems like all the functions in libzmq. >>> >>> Any suggestions? >>> >>> Cheers, >>> Michael >>> >>> ___ >>> zeromq-dev mailing list >>> zeromq-dev@lists.zeromq.org >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >> Hi, >> I use MS visual Xpress 2008 to do the same stuff without any issue, 2 >> weeks ago. >> May it comes from your MSV version, >> Christophe >> >> >> ___ >> zeromq-dev mailing list >> zeromq-dev@lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > Hi Christpohe > > Do you also change the build from a dll to a lib in the project > properties. > > I am using Visual Studio 2010 Ultimate edition (perks of the job). It's > feasible that is the problem. > > Cheers, > Michael > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] JZMQ: Problems building on win32 (MS Visual Studio)
On Tue, 2011-03-15 at 21:23 +0100, C. Huntz wrote: > Le 15/03/2011 21:00, Michael Compton a écrit : > > Hi, > > > > I am having problems building jzmq on Win32. > > > > I built libzmq to output a lib file (libzmq.lib), but when I try > > building jmzq I get around 20 errors of unresolved external symbols for > > what seems like all the functions in libzmq. > > > > Any suggestions? > > > > Cheers, > > Michael > > > > ___ > > zeromq-dev mailing list > > zeromq-dev@lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > Hi, > I use MS visual Xpress 2008 to do the same stuff without any issue, 2 > weeks ago. > May it comes from your MSV version, > Christophe > > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev Hi Christpohe Do you also change the build from a dll to a lib in the project properties. I am using Visual Studio 2010 Ultimate edition (perks of the job). It's feasible that is the problem. Cheers, Michael ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] JZMQ: Problems building on win32 (MS Visual Studio)
Le 15/03/2011 21:00, Michael Compton a écrit : > Hi, > > I am having problems building jzmq on Win32. > > I built libzmq to output a lib file (libzmq.lib), but when I try > building jmzq I get around 20 errors of unresolved external symbols for > what seems like all the functions in libzmq. > > Any suggestions? > > Cheers, > Michael > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > Hi, I use MS visual Xpress 2008 to do the same stuff without any issue, 2 weeks ago. May it comes from your MSV version, Christophe ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] JZMQ: Problems building on win32 (MS Visual Studio)
Hi, I am having problems building jzmq on Win32. I built libzmq to output a lib file (libzmq.lib), but when I try building jmzq I get around 20 errors of unresolved external symbols for what seems like all the functions in libzmq. Any suggestions? Cheers, Michael ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Interruptted System Calls, EINTR, and more about POSIX signals than I ever wanted to know
On Tue, 2011-03-15 at 13:28 +0100, Martin Lucina wrote: > michael.comp...@littleedge.co.uk said: > > Hi all, > > > > Sorry for the long subject name, I'm going to try and keep this short > > because it gives me a headache, hehe. > > > > This is some what connected to the following from the mailing list: > > http://lists.zeromq.org/pipermail/zeromq-dev/2010-September/005822.html > > That's an accurate summary of the problems involved. > > > While developing the clrzmq2 and using it on POSIX platforms with MONO, > > I have came across some bothersome behaviour with blocking syscalls and > > signals. Quite frequently the blocking calls, such as Recv and Poll, > > would return -1 with ERRNO 4 (Interrupted System Call). > > > > The likely culprit for these signals is the Mono GC, though it has > > handlers there to catch them. According to what I have learnt, blocking > > syscalls will first return -1 when there is a signal and then the > > handler will be invoked. > > Why would GC have anything to do with interrupting blocking system calls? The GC uses signals in its operation, these cause the system calls to return, I doubled checked this by running with no GC, there was no EINTR. > > > "When a system call is slow and a signal arrives while it was blocked, > > waiting for something, the call is aborted and returns -EINTR, so that > > the library function will return -1 and set errno to EINTR. Just before > > the system call returns, the user program's signal handler is called." > > > > Source 4.5 here: http://www.win.tue.nl/~aeb/linux/lk/lk-4.html > > > > But the story also gets even more interesting, there is an SA_RESTART > > flag which handlers can set so that the syscall will be continued after > > the signal is handled, which incidentally the Mono GC sets, the problem > > is that the SA_RESTART does not restart all syscall and is at best a > > hint; it is also undocumented which syscalls it will restart. > > SA_RESTART is a non-portable mess, as you write yourself it cannot be > relied upon. > > > So now I am left with the dilemma of what to do with these interruptions > > to syscalls, do I try to handle it in the clrzmq2 binding by attempting > > the call again, or do I let it bubble up to the user for them to deal > > with. > > I would advise against any kind of auto-retry mechanism in clrzmq2; if you > don't bubble up the EINTR to the user you will lose any ability to > interrupt blocking zmq calls. This will result in the "Ctrl-C is not > working" scenario which we had with zmq 2.0 where we did precisely this > (ignored EINTR from syscalls). > My solution, thanks to a suggestion from Pieter, is to catch SIGINT and SIGTERM and exit the program. If I don't do this clrzmq2 will be a pain for users with Mono on POSIX platforms, they will be forced to deal with this exception all the time; the GC making it way too common of an occurrence. > -mato > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev Cheers, Michael ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] solaris 10 Spart jzmq autogen.sh error
On Tue, Mar 15, 2011 at 9:27 AM, Steven McCoy wrote: > On 15 March 2011 01:02, wrote: >> >> Hi, >> >> I tried several times to run autogen.sh on Solaris 10/spart but after long >> running got error message saying 'File name too long'. >> anyone succeeded in running autogen.sh on Solaris? > > Usually bash would help for long names and parameters, which versions of > autoconf, automake, libtool are you using? Do Sun ship versions on their > companion disk? Hi, I got autotools installed from pkg-get and autogen.sh seems to succeed. Using the default shell on Solaris 10: https://build.zero.mq/job/jzmq-master_ZeroMQ2_GCC-solaris10/3/console -- Mikko Koppanen ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [PATCH] ZMQ_NOT_LIBRARY option: when use ZMQ source code in other projects not as a library.
Martin Sustrik asked me to review this patch so here goes... > Having experience with Win32, I think I know what Ion wants with his patch: > the > ability to compile and use 0MQ as a DLL or a static library: Yes, that appears to be the point of this patch. Ion, your patch has a few problems: 1) The define to toggle a static build is not meaningful. Rather than ZMQ_NOT_LIBRARY, use something like ZMQ_STATIC (or even ZMQ_STATIC_WIN32 since ZMQ_STATIC seems a bit too generic identifier). 2) Why are you turning off extern "C" for the API declarations when ZMQ_STATIC is selected? This is almost certainly a bad thing since you do not want C++ linkage for the API functions. 3) You should also provide a patch to integrate ZMQ_STATIC as an option into the MSVC build somehow if this is possible. -mato ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Poll about linger and termination behaviour!
sust...@250bpm.com said: > There is no obvious solution for the problem. Rather, the intent is to > cause as little pain as possible. Thus, please, let us know which > behaviour is preferable for you. Vote for either "infinite" default or > zero default. The solution that gets more votes will make it into next > version of 2.1 I'm surprised that a change like this is being debated as part of the next release in the 2.1.x series. It seems that the policy of strict API stability has changed. Anyway, I vote for keeping the current state (infinite) since it creates no surprises in the simple case: 1) init context 2) open socket 3) send message 4) close socket 5) terminate context -mato ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Interruptted System Calls, EINTR, and more about POSIX signals than I ever wanted to know
michael.comp...@littleedge.co.uk said: > Hi all, > > Sorry for the long subject name, I'm going to try and keep this short > because it gives me a headache, hehe. > > This is some what connected to the following from the mailing list: > http://lists.zeromq.org/pipermail/zeromq-dev/2010-September/005822.html That's an accurate summary of the problems involved. > While developing the clrzmq2 and using it on POSIX platforms with MONO, > I have came across some bothersome behaviour with blocking syscalls and > signals. Quite frequently the blocking calls, such as Recv and Poll, > would return -1 with ERRNO 4 (Interrupted System Call). > > The likely culprit for these signals is the Mono GC, though it has > handlers there to catch them. According to what I have learnt, blocking > syscalls will first return -1 when there is a signal and then the > handler will be invoked. Why would GC have anything to do with interrupting blocking system calls? > "When a system call is slow and a signal arrives while it was blocked, > waiting for something, the call is aborted and returns -EINTR, so that > the library function will return -1 and set errno to EINTR. Just before > the system call returns, the user program's signal handler is called." > > Source 4.5 here: http://www.win.tue.nl/~aeb/linux/lk/lk-4.html > > But the story also gets even more interesting, there is an SA_RESTART > flag which handlers can set so that the syscall will be continued after > the signal is handled, which incidentally the Mono GC sets, the problem > is that the SA_RESTART does not restart all syscall and is at best a > hint; it is also undocumented which syscalls it will restart. SA_RESTART is a non-portable mess, as you write yourself it cannot be relied upon. > So now I am left with the dilemma of what to do with these interruptions > to syscalls, do I try to handle it in the clrzmq2 binding by attempting > the call again, or do I let it bubble up to the user for them to deal > with. I would advise against any kind of auto-retry mechanism in clrzmq2; if you don't bubble up the EINTR to the user you will lose any ability to interrupt blocking zmq calls. This will result in the "Ctrl-C is not working" scenario which we had with zmq 2.0 where we did precisely this (ignored EINTR from syscalls). -mato ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] "Broadcast" messages for PUSH-PULL sockets?
Hi, > no cleverness. > just pump no-ops; eventually all of them will see them. > it may take a second or two, but thats okay. > if you have a huge dynamic range (potentially a large number of workers), > then when in no-op mode, the workers might sleep 1s on getting a no-op. > this slow down + load balancing will ensure everyone sees it eventually. My 2 cents: I am using a pub/sub socket on both sides in order to coordinate the workers/masters. Currently I am only publishing shutdown related stuff there but I will use them for stuff like heartbeats in the future. Daniel ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [PATCH] add zmq::version to C++ API
On 03/15/2011 11:20 AM, Hoelzlwimmer Andreas wrote: > Passing those parameters by reference gives you additional safety for the > call. > Additionally, in C++ lessons given to me, parameters by reference, especially > for basic data types such as integers, were a sign for in/out parameters The problem is that reference is visible only in the prototype of the function, not with actual usage: int i; fx (i); // is this a reference or pass-by-value? Thus, 0MQ C++ API uses pointers instead. See how send and recv work: void send (message_t &msg); void recv (message_t *msg); And in actual usage: zmq::message_t msg; s.send (msg); and: zmq::message_t msg; s.recv (&msg); Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [PATCH] add zmq::version to C++ API
Passing those parameters by reference gives you additional safety for the call. Additionally, in C++ lessons given to me, parameters by reference, especially for basic data types such as integers, were a sign for in/out parameters Andreas -Original Message- From: zeromq-dev-boun...@lists.zeromq.org [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf Of Martin Sustrik Sent: Dienstag, 15. März 2011 11:08 To: ZeroMQ development list Subject: Re: [zeromq-dev] [PATCH] add zmq::version to C++ API On 03/15/2011 10:39 AM, Pieter Hintjens wrote: > Please find attached patch. Thanks. Is there any reason why the arguments are passed by references rather then by pointers? It makes the fact that they are actually out parameters not obvious: int major, minor, patch; zmq::version (major, minor, patch); vs. int major, minor, patch; zmq::version (&major, &minor, &patch); Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] [PATCH] add zmq::version to C++ API
On 03/15/2011 10:39 AM, Pieter Hintjens wrote: > Please find attached patch. Thanks. Is there any reason why the arguments are passed by references rather then by pointers? It makes the fact that they are actually out parameters not obvious: int major, minor, patch; zmq::version (major, minor, patch); vs. int major, minor, patch; zmq::version (&major, &minor, &patch); Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Upcoming stable 2.1 release - devices
On Mon, Mar 14, 2011 at 9:56 PM, MinRK wrote: > Re: API-freezing > > With 0MQ's unconventional versioning, there are multiple x.y.z > versions before the first stable release (in this case 2.1.3). I > would not expect > the API-freeze statement to apply to pre-release versions. For > instance, 2.1.1 introduced new socket types (XPUB/XSUB) and 3 socket > options that were not in 2.1.0, and I think that's fine, because those > were not stable releases. Makes sense, thanks for the perspective. -Pieter ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] "Broadcast" messages for PUSH-PULL sockets?
On Mon, Mar 14, 2011 at 4:25 PM, Ian Barber wrote: > I'm sure Pieter will reply with a reference to one of the chapter 4 patterns > (which I haven't full read through yet!), which I suspect would apply. I'm going to cover this (advanced pipeline) in Chapter 6, probably. Andrew's model of sending no-ops down the line is elegant. -Pieter ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Compiling zeromq-2.1.2 on Mac OS 10.6.6
See the Tuning page at: http://www.zeromq.org/docs:tuning-zeromq It covers how to configure OS X for 0MQ. On Tue, Mar 15, 2011 at 10:30 AM, Martin Sustrik wrote: > Hi Peter, > >> make check-TESTS >> PASS: test_pair_inproc >> PASS: test_pair_tcp >> PASS: test_reqrep_inproc >> PASS: test_reqrep_tcp >> PASS: test_hwm >> Assertion failed: nbytes == sizeof (command_t) (mailbox.cpp:194) >> /bin/sh: line 1: 48361 Abort trap ${dir}$tst >> FAIL: test_shutdown_stress >> PASS: test_pair_ipc >> PASS: test_reqrep_ipc >> >> 1 of 8 tests failed > > Yes. See the related discussions on the mailing list. Immediate solution > is to extend your socketpair buffers. > > Martin > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] [PATCH] add zmq::version to C++ API
Please find attached patch. 0001-Added-zmq-version-method-to-C-API.patch Description: Binary data ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] IPC on Windows (again)
Hi Marcelo, > In ZeroMQ, this might work by having a process (zpmd?) is responsible > for binding to dynamic port numbers for use by the ipc transport, and > which hands the port over to the server process — when it turns up — via > a call to WSADuplicateSocket(). Any ZMQ process trying to use ipc will > first check to see that zpmd is running; if it isn't, the ZMQ library > will fire it up before trying to communicate with it. Zpmd and the ZMQ > library would communicate either via a known port or a named pipe. If you want to simulate IPC on top of IPC you don't need a port mapping deamon. All you have to do is to store the generated port number into the file indicated by ipc:// connection string. Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Compiling zeromq-2.1.2 on Mac OS 10.6.6
Hi Peter, > make check-TESTS > PASS: test_pair_inproc > PASS: test_pair_tcp > PASS: test_reqrep_inproc > PASS: test_reqrep_tcp > PASS: test_hwm > Assertion failed: nbytes == sizeof (command_t) (mailbox.cpp:194) > /bin/sh: line 1: 48361 Abort trap ${dir}$tst > FAIL: test_shutdown_stress > PASS: test_pair_ipc > PASS: test_reqrep_ipc > > 1 of 8 tests failed Yes. See the related discussions on the mailing list. Immediate solution is to extend your socketpair buffers. Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] solaris 10 Spart jzmq autogen.sh error
On 15 March 2011 01:02, wrote: > Hi, > > I tried several times to run autogen.sh on Solaris 10/spart but after long > running got error message saying 'File name too long'. > anyone succeeded in running autogen.sh on Solaris? > > Usually bash would help for long names and parameters, which versions of autoconf, automake, libtool are you using? Do Sun ship versions on their companion disk? -- Steve-o ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] ZMQ used in linux
On 03/15/2011 08:09 AM, 蔡海伟 wrote: > as a socket server,I bind a address > eg: > context_t ctx(1); > socket_t socket(ctx,ZMQ_PUB); > socket.bind("tcp://*:192.168.10.12); > > when a client connected,How can I get the client IP from the server socket? You can't. Btw, your connection string in zmq_bind in invalid. Please, use mailing list to discuss issues. Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] Compiling zeromq-2.1.2 on Mac OS 10.6.6
make check-TESTS PASS: test_pair_inproc PASS: test_pair_tcp PASS: test_reqrep_inproc PASS: test_reqrep_tcp PASS: test_hwm Assertion failed: nbytes == sizeof (command_t) (mailbox.cpp:194) /bin/sh: line 1: 48361 Abort trap ${dir}$tst FAIL: test_shutdown_stress PASS: test_pair_ipc PASS: test_reqrep_ipc 1 of 8 tests failed PGP.sig Description: This is a digitally signed message part ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] solaris 10 Spart jzmq autogen.sh error
Hi, I tried several times to run autogen.sh on Solaris 10/spart but after long running got error message saying 'File name too long'. anyone succeeded in running autogen.sh on Solaris? thanks Sun Lee RBS Global Banking & Markets RBS Americas HQ, 600 Washington Boulevard, Stamford, CT, 06901, USA Office: +1 203 897 4201 This message (including any attachments) is confidential and/or privileged. It is to be used by the intended recipients only. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are inherently insecure and susceptible to change. The Royal Bank of Scotland Group, plc ("RBS") and its subsidiaries, and affiliates and subsidiary undertakings, including but not limited to, RBS plc New York and Connecticut Branches, RBS Securities Inc., The Royal Bank of Scotland N.V. New York and Chicago Branches (formerly named ABN AMRO Bank N.V.), Citizens Financial Group, Inc. and RBS Citizens, N.A., shall not be liable for the improper or incomplete transmission of the information contained in this communication or Attachment nor for any delay in its receipt or damage to your system. RBS does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference. For the protection of RBS and its clients and customers, and in compliance with regulatory requirements, the contents of both incoming and outgoing e-mail communications, which could include proprietary information and non-public personal information (‘NPPI’), may be reviewed. RBS and its subsidiaries and affiliates do not guarantee the accuracy of any email or attachment, that an email will be received or that RBS or its affiliates and subsidiaries will respond to an email. RBS makes no representations that any information contained in this message (including any attachments) are appropriate for use in all locations or that transactions, securities, products, instruments or services discussed herein are available or appropriate for sale or use in all jurisdictions, or by all investors or counterparties. Those who utilize this information do so on their own initiative and are responsible for compliance with applicable local laws or regulations. ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev