Handling of siginfo, Java compatability with IBM jdk

Corey Minyard <[email protected]> Tue, 14 May 2002 21:44:05 -0500
Newsgroups gmane.linux.ngpt.user
Message-ID <[email protected]>
I thought I would ask a question and answer a question...

How does NGPT handle siginfo?  It seems (from looking at the code, so I 
could have missed something) that currently the information in the 
siginfo structure is wrong because the signal is resent from another 
process.  I would thing that tkill() should take a siginfo structure and 
be allowed to set the data.

This is actually related to the answer below.  I have a threads package 
I have been working on designed for reliability.  It runs in 
LinuxThreads compatability mode (which handles signals just like 
LinuxThreads) and in POSIX compliant mode (which handles signals like 
POSIX says to).  I have some Java implementations running in 
LinuxThreads compatability mode, but none work in POSIX compliant mode. 
 I suspect that it has something to do with the siginfo not being 
correct, or perhaps that the Java implementation is directly calling 
kill().  But either way, I would like the siginfo stuff to be right, and 
I think a change to tkill is necessary to do it.

The answer to the question below is that it was VERY hard to get my 1:1 
threads package to work under Java, even in LinuxThreads compliant mode. 
 The JVMs do bizzare things, and they rely on undocumented behaviour 
inside LinuxThreads, and I believe they rely on a 1:1 threads mapping. 
 (Why can't they just trust the threads package to do the right thing? 
 Why do they have to do their own things with the stack?)  This is both 
Blackdown's and IBM's JDK.  It is going to be VERY VERY hard to get NGPT 
to run the existing JDKs.  It may not even be doable.  When someone gets 
there, I can look through my logs and see the problems I ran into and 
advise, if necessary.  But IMHO, someone needs to fix the JDKs.

-Corey

bryan hunt wrote:

>Hi there,
>I was reading a couple of posts on your list in July 2001 and there was 
>discussion about compatablility with java. I am interested in moving out
>company webservers from windows to linux but have run into a lot of
>problems with the old linuxthreads. Is there any java implimentation that
>works with ngpt ? I notice that 
>cut=
>ldd /opt/java/jre/bin/exe/java
>        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x4002f000)
>        libnsl.so.1 => /lib/libnsl.so.1 (0x40044000)
>        libdl.so.2 => /lib/libdl.so.2 (0x4005a000)
>        libc.so.6 => /lib/i686/libc.so.6 (0x4005e000)
>        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>=cut
>
>There was some mention of efforts to make your library binary compatable with 
>linuxthreads. Is this the case yet ?
>
>Thanks in advance
>Bryan
>_______________________________________________
>pthreads-users mailing list
>[email protected]
>http://www-124.ibm.com/developerworks/oss/mailman/listinfo/pthreads-users
>  
>