[ofa-general] Problem in client/server code with JNI

Zafar Gilani zafargilani at gmail.com
Fri May 22 08:04:01 PDT 2009


I am using IB Verbs and RDMA CM to implement a communication device over
InfiniBand fabric. I have executed client/server code (most part from Roland
Dreier, CISCO) and it works absolutely fine. The server listens for
requests, client sends two integers to the server and server returns their
sum.

When I try to call the same thing via JNI, the code gets stuck at method
"ibv_alloc_pd()" (line 170) in the client code (nativeclient.c). I have
checked the rdma_cm_id "cm_id", the ibv_context "cm_id->verbs" and the
protection domain "ibv_pd" but I am unable to resolve the error.

JVM actually crashes stating that error exists at frame: "ibv_alloc_pd" and
that crash happened in native code. Though this is understandable, but the
error is not, since the same code works when executed directly with c
compiler but gives trouble with JNI.

Compilers:
   java version "1.6.0_07"
   Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
   Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)

   gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)

Environment:
   Red Hat 4.12
   2 Intel(R) Xeon(TM) 5060 CPU dual-core hyperthreading 3.20GHz

   OFED version 1.4

Compressed file (jni.tar) that contains all the files (.java, .h, .c and
.log) is available at
[http://hpc.niit.edu.pk/~zafar/work/ib/jni.tar<http://hpc.niit.edu.pk/%7Ezafar/work/ib/jni.tar>]
for better understanding. I was hoping that someone could may be give me
some pointers/suggestions in the right direction.

Any help will be greatly appreciated.

P.S.: Structure of the code:
nativeclient.c [native code for client]
nativeserver.c [native code for server]
RdmaOpsServer.java [Server code calling native server code]
RdmaOpsClient.java [Client code calling native client code]

Thanks,
-- 
Syed Zafar ul Hussan Gilani | BIT-7
Research Student | CHPSC
MSP 2008-09
NUST SEECS | http://hpc.niit.edu.pk/~zafar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20090522/3641f741/attachment.html>


More information about the general mailing list