M
moongateclimber
Hello all,
I'm facing a mind-boggling problem with JNI on Linux. I will be giving
too little details for anyone to come up with a solution: fact is, the
context is really too complex. I'm mostly looking for hints rather
than a solution.
I have developed a Java class "UnixSocket" with native methods to
support using Unix-domain sockets from Java applications. The native
methods are in a shared library (.so) and they call C functions from
another shared library. The latter is part of the "platform layer" of
the product I am working on, and it is used by several other clients,
including several C processes. There's one version for True64 and one
for Linux, and both work with all of their C clients (AFAIK).
Now, the Java applications that use UnixSocket on True64 work right.
Under Linux, on the other hand, the send() method fails. This
indirectly calls OS' sendmsg(), which returns -1 with errno set no
ENOBUF (55). In fact, the C function that calls sendmsg() makes
several retries, but all fail in the same way (55).
These Java applications are multi-threaded, Java is:
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition
Classic VM (build 1.3.1-1, native threads, jit)
I should also note, that this problem seems to depend on the specific
build. We use two different make-compile machineries (as I said, the
context is complex, so I don't even know all the details), and one of
them produces a library that works, the other produces one that
doesn't work, from the same source code. I am investigating about the
actual differences between these two machineries, but I still
desperately need any hint.
Thanks in advance
MC
I'm facing a mind-boggling problem with JNI on Linux. I will be giving
too little details for anyone to come up with a solution: fact is, the
context is really too complex. I'm mostly looking for hints rather
than a solution.
I have developed a Java class "UnixSocket" with native methods to
support using Unix-domain sockets from Java applications. The native
methods are in a shared library (.so) and they call C functions from
another shared library. The latter is part of the "platform layer" of
the product I am working on, and it is used by several other clients,
including several C processes. There's one version for True64 and one
for Linux, and both work with all of their C clients (AFAIK).
Now, the Java applications that use UnixSocket on True64 work right.
Under Linux, on the other hand, the send() method fails. This
indirectly calls OS' sendmsg(), which returns -1 with errno set no
ENOBUF (55). In fact, the C function that calls sendmsg() makes
several retries, but all fail in the same way (55).
These Java applications are multi-threaded, Java is:
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition
Classic VM (build 1.3.1-1, native threads, jit)
I should also note, that this problem seems to depend on the specific
build. We use two different make-compile machineries (as I said, the
context is complex, so I don't even know all the details), and one of
them produces a library that works, the other produces one that
doesn't work, from the same source code. I am investigating about the
actual differences between these two machineries, but I still
desperately need any hint.
Thanks in advance
MC