This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/17034] New: RMI calls to remote void methods incorrectly hang waiting for a dummy return value


RMI calls to void methods should not return a value. Although the spec doesn't
seem to explicitly say this, it does mark the ReturnValue as optional [0] - and
the only legitimate reason for omitting a return value is when the method is
void, so that must be why it is optional. Also of course not returning anything
for void does accord with the Sun implementation (and common sense).

The client-side symptom of this (test case with script attached) is that when
you do an RMI call from gij to a void method on a Sun JVM, gij hangs waiting for
a return value in:

#0  0xffffe410 in ?? ()
#1  0xbfffe7bc in ?? ()
#2  0x407bee1c in ?? () from /usr/lib/libgcj.so.5
#3  0xbfffe6d4 in ?? ()
#4  0x44e1e288 in recv () from /lib/tls/libpthread.so.0
#5  0x4041a632 in gnu::java::net::PlainSocketImpl$SocketInputStream::read
(this=0xfffffe00, buffer=0x811f008, offset=-1073748268,
    count=2048) at gnu/java/net/natPlainSocketImpl.cc:487
#6  0x40448dc7 in java.io.FilterInputStream.read(byte[], int, int)
(this=0xfffffe00, buf=0x811f000, offset=0, len=2048)
    at ../../../libjava/java/io/FilterInputStream.java:189
#7  0x40441c7e in java.io.BufferedInputStream.refill() (this=0x80bcd80) at
../../../libjava/java/io/BufferedInputStream.java:352
#8  0x40441adb in java.io.BufferedInputStream.read() (this=0x80bcd80) at
../../../libjava/java/io/BufferedInputStream.java:216
#9  0x40448d8e in java.io.FilterInputStream.read() (this=0xfffffe00) at
../../../libjava/java/io/FilterInputStream.java:155
#10 0x40444acf in java.io.DataInputStream.readByte() (this=0xfffffe00) at
../../../libjava/java/io/DataInputStream.java:157
#11 0x4044c950 in java.io.ObjectInputStream.readObject() (this=0x8114f50) at
../../../libjava/java/io/ObjectInputStream.java:140
#12 0x40545a80 in gnu.java.rmi.server.UnicastRef.invokeCommon(java.rmi.Remote,
java.lang.reflect.Method, java.lang.Object[], int, long) (
    this=0x811c860, obj=0x8093e48, method=0x0, params=0x0, opnum=-1,
hash=6815962424935952648)
    at ../../../libjava/gnu/java/rmi/server/UnicastRef.java:156
#13 0x40545b1e in gnu.java.rmi.server.UnicastRef.invoke(java.rmi.Remote,
java.lang.reflect.Method, java.lang.Object[], long) (
    this=0x811c860, obj=0x8093e48, method=0x80bce00, params=0x0,
opnum=6815962424935952648)
    at ../../../libjava/gnu/java/rmi/server/UnicastRef.java:101


[0] http://java.sun.com/j2se/1.4.2/docs/guide/rmi/spec/rmi-protocol4.html

-- 
           Summary: RMI calls to remote void methods incorrectly hang
                    waiting for a dummy return value
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: greenrd at greenrd dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17034


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]