IRC Log


Wednesday April 14, 2010

[Time] NameMessage
[17:35] jomofo When I try to build libzmq from master I get this error (Linux x86) : make[1]: *** No rule to make target `local_lat.c', needed by `local_lat.o'. Stop.
[17:37] jomofo Guessing it's a makefile issue, but don't have enough experience with automake to solve on my own. Any hints? Thanks
[18:16] mikko jomofo: lemme test
[18:16] mikko sec
[18:19] mikko builds fine here from clean git clone
[18:20] jomofo I will try a fresh clone
[18:25] jomofo mikko: it builds now, thanks. I guess maybe I didn't clean before I pulled and some remnant was causing that?
[18:26] mikko no harm in make clean && ./autogen.sh after pull
[18:26] mikko and ./configure && make
[18:28] jomofo mikko: I went through those steps several times after I pulled before I decided to come here. Maybe clean was not wiping something?
[18:29] mikko make distclean might wipe more
[18:29] mikko or just fail
[18:29] mikko not sure
[18:29] mikko but make clean doesnt remove auto* artifacts
[18:31] jomofo That makes sense. I still have the old working copy so I'll play around and see if I can discover more about the black box I'm playing with... Thanks for the idea of starting over though
[18:33] jomofo make distclean did the trick in the old working copy
[19:00] sustrik jomofo: the files in question were renamed
[19:01] sustrik automake has problem couping with it
[19:01] sustrik in any case, fresh copy solves it
[19:07] sophacles sustrik: a few days back you mentioned to me using *_thr for some throughput testing using very large numbers for message sizes. its strange when I do that remote_thr quits fairly soon and local_thr doesn't ever finish.
[19:07] sophacles any thoughts as to why?
[19:08] sustrik there's sleep(10) hardcoded in the sender
[19:08] sustrik it transmission takes more than that, the sender quits in the middle of the transmission
[19:08] sustrik ugly, i know
[19:11] sophacles ahhh ok. ill dig into the code then. thanks for the pointer
[19:13] sustrik to sanitize the throughput test, P2P sockets should be used instead of PUB/SUB
[19:13] sophacles is there a better way to determine if all messages have been sent? (e.g a zmq_wait() or zmq_join())?
[19:14] sustrik P2P being bi-directional would allow for "the end" message to be passed back to the sender
[19:14] sustrik that's it, i think
[19:15] sustrik just change to socket type to P2P, after the receiver receives all messages make it send a dummy message
[19:15] sustrik the sender should send all messages and wait for the dummy message from receiver
[19:16] sustrik the problem is that there are ~10 instances of perf tests for various languages
[19:16] sustrik lot of work to fix all of it
[19:17] sophacles OK thanks. ill do that. sounds simple enough. sanity check on my approach: a simple blocking read place of zmq_sleep is the magic mechanism correct?
[19:17] sustrik ack
[19:28] jomofo sustrik: troubleshooting an error with JNI and came across this: http://forums.sun.com/thread.jspa?threadID=5379144
[19:29] jomofo sustrik: thought it was kinda funny when I noticed it was your thread
[19:31] sustrik :)
[19:32] sustrik i am not sure what the problem is now - gonzalo diethelm introduced the latest changes
[19:32] sustrik he probably got something wrong
[19:33] jomofo I will keep digging, I was just hoping someone on the list could tell me if I was doing something silly
[19:35] sustrik jomofo: any chance the old version of jzmq is being loaded?
[19:38] jomofo sustrik: I don't believe so, but I've done crazier things. I will wipe /usr/local/lib, verify it breaks my test, then build again
[19:39] sustrik the code looks more or less correct:
[19:39] sustrik JNIEXPORT void JNICALL Java_org_zeromq_ZMQ_00024Context_construct (JNIEnv *env,
[19:39] sustrik jobject obj,
[19:39] sustrik jint app_threads,
[19:39] sustrik jint io_threads,
[19:39] sustrik jint flags)
[19:40] sustrik I am not sure what the 00024 thing means...
[19:40] jomofo I think that must be somehow escaping the '$' you usually see with inner classes
[19:41] sustrik 0x24 = $ ?
[19:41] sustrik lemme see
[19:41] jomofo yup
[19:41] sustrik bingo
[19:42] jomofo But I don't know what's making that translation or if it's possibly broken at runtime?
[19:42] sustrik shrug
[19:43] sustrik can you check the prototype of the function in your JNI-generated header file?
[19:44] sustrik is it the same?
[19:44] sustrik org_zeromq_ZMQ_Context.h
[19:44] jomofo JNIEXPORT void JNICALL Java_org_zeromq_ZMQ_00024Context_construct
[19:44] jomofo (JNIEnv *, jobject, jint, jint, jint);
[19:46] sustrik hm
[19:46] sustrik let me try here
[19:49] sustrik yuck, i cannot even build it
[19:49] sustrik /usr/bin/ld: /usr/local/lib/libzmq.a(libzmq_la-zmq.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
[19:49] sustrik /usr/local/lib/libzmq.a: could not read symbols: Bad value
[19:51] sophacles so with p2p sockets, do i bind/connect or...? (wierd segfaulting issues)
[19:51] jomofo sustrik: eek, I don't get that ... I can build it on Ubuntu 9.04 32-bit and 64-bit
[19:52] jomofo Does this mean anything to you? http://stackoverflow.com/1147890/relocation-r-x86-64-32-against-a-local-symbol-error
[19:53] sustrik page not found
[19:54] jomofo doh, copy/paste error http://stackoverflow.com/questions/1147890/relocation-r-x86-64-32-against-a-local-symbol-error
[19:58] sustrik my fault, i had libzmq compiled with --disable-shared on my system
[19:58] sustrik now it builds ok
[20:06] sophacles ok, better phrasing/more info: when i change the perf example to use P2P sockets, in local_thr, the first call to zmq_recv in the for loop segfaults. it is very odd, as i haven't changed anything other than changing the socket type and droping the setsockopt for subscription.
[20:08] sustrik :(
[20:08] sustrik P2P are experimental
[20:08] sustrik there must be some bug there...
[20:08] sustrik any chance of getting the backtrace?
[20:09] sustrik jomofo: it seems to work on my box
[20:10] sophacles I can do that, how do you want the trace?
[20:11] sustrik just run it under gdb
[20:11] sustrik when it breaks
[20:11] sustrik bt
[20:16] jomofo sustrik: if you don't mind, what distro/version/arch is your box running? It is similarly broken on both of my boxes. I verified only one copy of libjzmq, but maybe I should try again in a clean VM
[20:17] sustrik Linux istvan 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux
[20:17] sophacles sustrik: http://paste.pocoo.org/show/201908/ has my version of local_thr and the gdb output. if you want any other info let me know
[20:20] sustrik sophacles: created new issue for that (no. 18)
[20:20] sustrik as for now you'll have to do with manually tweaking the sleep(10) thing :(
[20:23] sophacles before anyone spends too much effort on that issue, it is linked against 2.0.6, which is hte current debian packaged version in Adrian's repo. If relevant work has been done since then i can build the latest git repo and try that
[21:43] sophacles sustrik: i forgot to mention, thanks for the tip about remote_thr/local_thr w/ big message sizes, they fill the pipe w/out maxin the cpu :)
[22:07] jomofo sustrik: do you use Sun JDK or OpenJDK or ... ? I don't think it matters much, but don't want to introduce more variables than I have to
[22:07] jomofo P.S. I kept saying Ubuntu 9.04 earlier, but it is 9.10 which looks like what you're running