users@glassfish.java.net

Re: I have found that this is a JVM bug

From: <glassfish_at_javadesktop.org>
Date: Wed, 24 Sep 2008 05:39:14 PDT

That it fine to suspect that. But it is not the case. Here is the original method that I was having problems with:

[i] private long SEQ_PLUS(
            long x,
            long y) {
        long z = (x + y) % 0x100000000L;
        return z;
    }
[/i]

When called with 16838L and 1L, this would return 16838L periodically but it should be returning 16839L. About every fourth restart of Glassfish, this would happen. Only on Solaris/Sparc. This code was invoked for each RDP message that my adapter received during its connection handshake. Once it was running and returned the wrong value, it continued to return the wrong value forever until a restart.

Changing the method to look like:

[i] private long SEQ_PLUS(
            long x,
            long y) {
        long w = (x + y);
        long z = w % 0x100000000L;
        
        return z;
    }
[/i]

It worked consistently over night with repeated restarts of Glassfish every hour.

Brett
[Message sent by forum member 'bbergquist' (bbergquist)]

http://forums.java.net/jive/thread.jspa?messageID=301269