IRC Log

Wednesday October 19, 2011

[Time] NameMessage
[00:02] streamer the conversation initiates from one side. Would that be the dealer end in your setup?
[00:04] streamer I have [router A] and [router B] on the right end, how would dealer send the message to the right one? I think I really need a [router - router] in the middle for that reason. but that's what's causing me the difficulty.
[00:08] streamer minrk: any thoughts?
[00:09] minrk yes, dealer should be the first to communicate
[00:09] minrk ah, if you have multiple endpoints, then you really do want ROUTER-ROUTER
[00:10] minrk but you can't use a QUEUE
[00:10] streamer ok, then what do i use instead?
[00:10] minrk you have to use a queue that swaps the first two message parts in order to fix the identity prefix
[00:10] minrk otherwise identical to the existing queue
[00:11] streamer i could do that with custom PollIn handlers, right?
[00:11] minrk sure
[00:11] minrk just look for the source of zmq_device
[00:11] minrk and edit it to always recv the first *two* message parts, and forward them out of order
[00:12] minrk The MonitoredQueue device in pyzmq does exactly this
[00:12] streamer cool, I'll look up both of those.
[00:12] minrk (in addition to also sending every message over a side socket for monitoring, hence the name)
[00:13] streamer should only the backend pollIn do that swap, or both ends?
[00:15] streamer I see that you're one of the authors of MonitoredQueue. thanks for the tip!
[02:38] perduto hi, guys. is there something like zmq_device in zmq 2.1.10 in zmq3.0? zdevices devices project? now it's available?
[02:51] espeed Will someone please look at this and tell me why the worker recv() socket is blocking on the first iteration "inside the worker loop" https://gist.github.com/1297366
[03:10] cremes perduto: you should look at the code for creating a device; it's so short and simple that reproducing them
[03:11] cremes on your own should be very easy
[03:11] cremes espeed: i don't know python as well as i should, but that "device" looks like it *should* be binding on 6000 and 6001
[03:11] cremes so i don't know what "connect_out" does
[03:12] cremes is that part of some library or did you write that yourself? if you wrote it yourself, it is likely wrong :)
[03:12] espeed the ProcessDevice is part of the library
[03:14] espeed I've tried binding having the device bind on both in and out -- it still blocks
[03:14] cremes espeed: it could be that a QUEUE device is the wrong kind of PUSH/PULL
[03:15] cremes is there a STREAMER device available? that's the one that is matched up with push/pull
[03:15] espeed yes there is
[03:15] cremes try it
[03:15] espeed ahhh that worked!
[03:16] cremes (we really need the lib to err out when incompatible sockets connect to each other)
[03:16] cremes good!
[03:16] espeed thank you
[03:16] cremes you are welcome
[03:16] cremes pls read the guide if you haven't done so yet
[03:16] perduto thank you, i'll try.
[03:16] cremes many of these things which seem like voodoo are much more clear after the 3rd reading :)
[03:17] espeed ok, I'll go through it again :)
[03:59] benoitc is there a downloadable version of the zeromq manual somewhere ?
[04:44] espeed The 4th bullet on http://zguide.zeromq.org/ has links to PDFs for a few languages
[05:51] benoitc ok thanks
[10:30] mikko good morning
[11:19] taotetek morning mikko
[14:53] mikko sustrik_: there?
[14:58] sustrik mikko: hi
[14:59] mikko sustrik_: the -DZMQ_FORCE_POLL is actually terrible hack
[14:59] mikko looked at it briefly
[15:00] mikko all the supported polling systems still get built in
[15:00] sustrik yes
[15:00] mikko https://gist.github.com/95838c3fa479406ede61
[15:00] sustrik that have been solved in either 3.0 or 4.0
[15:00] mikko sustrik_: not in 3.0
[15:01] sustrik i can have a look at which commit it was
[15:01] sustrik wait a sec
[15:01] mikko this requires a code change / build change
[15:01] mikko i did some polling system changes on 3.0 and 4.0
[15:01] mikko but it doesnt solve this problem
[15:01] sustrik yes, we may try to backport the patch to 3.0
[15:01] sustrik mmnt
[15:02] mikko is this solved in 4.0?
[15:02] sustrik yes
[15:02] mikko what is the change?
[15:03] mikko because it looks like a build system change
[15:03] mikko and small change to poller.hpp (i assume)
[15:05] sustrik https://github.com/zeromq/libzmq/commit/f716b571baf59c1b622c7666bb8bf2905126a3d4
[15:06] mikko where does ZMQ_USE_* get defined?
[15:06] sustrik poller.hpp
[15:07] mikko cool, so it works nicely with --with-poller stuff as well
[15:07] sustrik yes, that was the idea
[15:08] mikko i wonder if it would make sense to take that further and build only the .cpp that are selected?
[15:08] mikko rather than empty objects
[15:08] sustrik it requires some build kung-fu
[15:08] sustrik not something i can do :)
[15:08] mikko i can look at making a patch
[15:09] mikko i'll ask pieter to merge f716b571baf59c1b622c7666bb8bf2905126a3d4 to 3.0
[15:09] sustrik ok
[15:09] mikko pieterh: can you merge f716b571baf59c1b622c7666bb8bf2905126a3d4 ?
[15:09] mikko :)
[15:09] mikko to 3.0
[15:09] sustrik heh
[15:09] mikko i assume the powerpc build the guy is doing tries to bind the symbols early
[15:09] mikko rather than lazy
[15:09] mikko that would cause issues
[15:10] sustrik no idea
[15:10] sustrik what i though was he simply has an old SDK
[15:10] sustrik i mean really old SDK
[15:10] sustrik predating the introduction of epoll to linux
[15:13] mikko sustrik_: i think we should still cater for that
[15:13] mikko if we can in a simple fashion
[15:14] sustrik it's 2.x, right?
[15:14] sustrik backporting your patch would help
[15:15] sustrik the one that chooses the mechanism depending on presence of the functions
[15:16] mikko yes, but still builds epoll symbols
[15:16] mikko needs f716b571baf59c1b622c7666bb8bf2905126a3d4 as well
[15:17] sustrik i see
[15:17] mikko actually, f716b571baf59c1b622c7666bb8bf2905126a3d4 is enough
[15:17] mikko the --with-poller is just sugar
[15:18] sustrik sure
[15:27] pieterh mikko: hi
[15:29] pieterh mikko: would you like also to have maintainer access to 3.0?
[15:29] pieterh I don't want to become a bottleneck
[15:30] mikko pieterh: i think i do have that
[15:30] mikko pieterh: i can merge if you want
[15:30] pieterh I think it would be good
[15:30] pieterh I do a git fetch --no-tags libzmq
[15:31] pieterh (libzmq is set up as a remote)
[15:31] pieterh then git cherry-pick whatever
[15:31] pieterh then, update the NEWS accordingly
[15:31] pieterh trying to always have a Jira issue number for every fix
[15:31] mikko jira issue for 3.0 as well?
[15:31] pieterh and when it's on a stable version, trying to have a test case and sign off from some real user
[15:31] pieterh mikko: if it's a bug fix, yes
[15:32] pieterh since people need to be able to read the discussion
[15:32] pieterh it depends on how the change happened
[15:32] mikko pieterh: cool, i'll get on to it when i get home
[15:32] pieterh if it was provoked by outside discussion, an issue is always better
[15:33] pieterh if it came spontaneously, an issue is just overhead
[16:04] rays any idea why this test fails? https://github.com/smira/txZMQ/pull/3
[16:23] mikko rays: not yet
[16:24] mikko rays: are the messages that get lost sent just before closing?
[17:09] nadiime Have code that works on Windows, but fails on Linux, zmq 2.1.7 -- pull socket isn't receiving msgs, anyone encounter this ever?
[17:10] nadiime using VS10 on Windows, g++ (forget version) on Linux, both 64-bit
[17:11] cremes nadiime: no
[17:11] cremes you have a bug
[17:11] michelp nadiime, i would be great if you could pastebin a small complete example that reproduces the problem
[17:13] nadiime i'm aware I have a bug, but obviously the Windows vs. Linux thing may help me debug it, I was hoping someone had an idea
[17:13] nadiime if I can reduce it, I will
[17:14] michelp nadiime, using tcpdump or something similar are you seeing the data arrive at the pull end of the connection?
[17:14] nadiime inproc
[17:15] michelp ah hmm
[17:15] nadiime this is multi-threaded, am trying to send a worker thread a "die" msg and it's not getting it
[17:16] nadiime am trying to reduce now, will post sample if i get it down
[17:16] michelp nadiime, did you read the section of the guide about using PAIR for thread coordination?
[17:17] nadiime unfortunately this has to be push/pull
[17:17] nadiime the pull thread has a number of push connectors
[17:17] michelp "You can use PUSH for the sender and PULL for the receiver. This looks simple and will work, but remember that PUSH will load-balance messages to all available receivers. If you by accident start two receivers (e.g. you already have one running and you start a second), you'll "lose" half of your signals. PAIR has the advantage of refusing more than one connection, the pair is exclusive."
[17:17] michelp maybe you have the two accidental receiver problem?
[17:17] nadiime i have only connected the pull socket to the push
[17:18] nadiime nope
[17:18] nadiime in my "shutdown" function i create the push socket on the fly
[17:18] nadiime and it only connects to that one pull socket
[17:18] nadiime i know about the load balancing -- it's a feature i use :)
[17:19] michelp hmm well if you can reduce at this point that would probably be best for debugging it
[17:19] nadiime yep
[17:19] nadiime i was just hoping it was an obvious Windows vs. Linux thing since this code has been working for months with no problems on Windows
[17:38] cremes nadiime: make sure to doublecheck the return codes from your bind/connect calls
[17:38] cremes with inproc i sometimes have issues where the socket that did a bind on an inproc endpoint
[17:39] cremes isn't ready to receive any connections for several hundred milliseconds
[17:40] nadiime i do check them, but lemme see if i am not checking them carefully enough ;)
[17:41] nadiime yeah both bind/connect are returning 0
[17:43] cremes ok
[17:44] nadiime i must be walking on some piece of memory in my bigger app because i can't seem to reduce the problem, sigh
[17:46] mikko nadiime: valgrind?
[17:47] nadiime yah may need to, i've been staring at this for a couple hours now
[19:19] fruminator all, may I interject?
[19:24] fruminator actually, emailed to list instead
[19:30] p0lt hey, does anyone know the bare minimum package versions needed to compile czmq? I've gotten autoconf v2.61 but I'm not sure if I need to upgrade any other packages. Reason why I ask is I'm attempting to put together an rpm of the package, but am running into compiling problems during the rpmbuild process, but not an interactive build process one would manually do by typing ./configure; make; make check; make install
[20:31] przemek hi all!, I'm trying to build jzmq in Visual Studio and I am getting the following error: jzmq\src\util.hpp(23): fatal error C1083: Cannot open include file: 'jni.h': No such file or directory
[20:33] przemek it is true that the file doesn't exist anywhere; I searched my computer for it
[20:34] mikko przemek_: jni is in jdk
[20:34] mikko i think
[20:36] przemek hm
[20:36] przemek javac is in the Path
[20:36] mikko przemek_: but your jdk includes are probably not in the project include path
[20:37] przemek on in Visual Studio
[20:37] przemek let me check
[20:37] mikko yes
[20:37] mikko if you don't have jni.h you most likely dont have jdk
[20:40] przemek ya ok that was it
[20:40] przemek getting a different error now
[20:40] przemek 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Users\operator\Desktop\Source\jzmq\builds\msvc\Debug\jzmq.dll) does not match the Linker's OutputFile property value (C:\Users\operator\Desktop\Source\jzmq\lib\jzmq.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the
[20:40] przemek value specified in %(Link.OutputFile).
[20:40] przemek 1>LINK : fatal error LNK1104: cannot open file 'libzmq.lib'
[20:40] przemek 1>
[20:40] przemek 1>Build FAILED.
[20:44] przemek so basically it doesn't create the libzmq.lib
[20:44] przemek and then it fails cause it tries to link to it
[20:52] przemek I trying to build it as 64 bit, not sure if that has something to do with it
[21:04] nadiime i don't remember the java build -- is there a separate project for libzmq in your solution?
[21:04] przemek well i have to downlaod jzmq
[21:05] przemek and open a msvc project found in build
[21:05] przemek then i have to do some includes
[21:05] przemek as outlined here
[21:05] przemek http://www.zeromq.org/bindings:java
[21:06] przemek and i'm using vs2010 to build
[21:10] przemek is there some sort of convention for adding bindings to zeromq
[21:11] przemek like should I put my jzmq folder somewhere inside zeromq?
[21:11] przemek and then build it?
[21:11] przemek or it doesn't matter...
[21:34] nadiime did you build libzmq separately?
[21:34] nadiime i forget if you have to build it separately or it builds as part of the jzmq process
[21:35] nadiime if you built it separately then presumably the linker is not finding libzmq.lib, which means it's not in your path
[21:35] nadiime so the easiest thing to do is put it in your path
[21:35] nadiime but under linker->input, you can specify the full path to the lib
[21:36] nadiime so it would look like C:\temp\libzmq.lib under Linker->input, for example
[22:24] mikko przemek_: are you building on 2010?
[22:24] przemek yes
[22:24] mikko przemek_: the project doesn't convert properly
[22:24] mikko you need to add the import library location manually
[22:25] mikko on the libzmq project
[22:25] mikko right click libzmq properties
[22:25] mikko Linker
[22:26] mikko Advanced
[22:26] mikko Import library
[22:26] mikko specify ../../../lib/libzmq.lib
[22:27] mikko not sure why that setting does upgrade properly
[22:35] przemek Generating Code...
[22:35] przemek 1>LINK : fatal error LNK1104: cannot open file 'libzmq.lib'
[22:35] przemek 1>
[22:35] przemek 1>Build FAILED.
[22:36] mikko what fails to build
[22:36] mikko jzmq or libzmq?
[22:39] przemek no
[22:40] mikko przemek_: please choose one window to talk in
[22:41] mikko this gets confusing
[22:41] przemek lol sry
[22:41] mikko so rebuild libzmq
[22:41] mikko so that you can get the libzmq.lib built
[22:46] przemek is the jzmq folder supposed to be inside the zeromq folder
[22:46] przemek because right now there are apart
[22:46] przemek and i'm wondering if that's causing the problme
[22:47] przemek i've rebuilt zeromq
[22:47] przemek it did create the file that is missing
[22:47] przemek but when I build jzmq i get teh same error
[22:48] mikko look at the jzmq project
[22:48] przemek ya
[22:48] mikko have you got Linker -> General -> Additional Library Directories set?
[22:51] przemek i thought i was supposed to set the library under Configuration Properties -> VC++ Directories -> Library Directories?
[22:52] przemek and I did just add that as you directed and I still get the error
[22:53] mikko did you add the directory that contains the .lib and .dll files?
[22:56] przemek ok awesome that worked
[22:56] przemek tks for your help!
[22:56] mikko what did you have there before?
[22:57] przemek well i followed instructions at http://www.zeromq.org/bindings:java
[22:57] przemek so in Linker -> General -> Additional Library Directories i had nothing
[22:57] przemek i had to add the dir to .dll & to the .lib file
[22:58] mikko yes, thats where the linker looks for the files
[22:58] przemek so the dir I added from the instructions on website went under Configuration Properties->VC++ Directories->Include Directories
[22:58] mikko that should work as well
[22:59] mikko as long as the path is to lib-folder
[22:59] przemek and Configuration Properties->VC++ Directories->Library Directories
[22:59] mikko rather than the zeromq main folder
[22:59] przemek ok
[22:59] mikko Library files: <zeromq>\lib
[22:59] przemek so I was missing the path to the .lib file in my library
[22:59] mikko thats what the site says as well
[22:59] przemek the lib dir does not contain the .lib file
[22:59] przemek only the .dll
[22:59] mikko there is a problem with the visual studio project conversions
[23:00] mikko they don't cleanly upgrade for some reason
[23:00] przemek ya
[23:00] przemek so the .lib file ends up in zeromq\builds\msvc\Debug
[23:00] mikko probably need to look into that or add msvc10 build files separately
[23:00] przemek and not
[23:00] przemek zeromq\lib
[23:00] przemek ok well i really appreciate your help
[23:02] przemek ok i gotta go teach, yey
[23:02] przemek again tks for your help!
[23:03] mikko no problem