-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erroneous Timeout: IOP00410037: Timeout while reading data in buffer manager #6
Comments
@glassfishrobot Commented |
@glassfishrobot Commented
|
@glassfishrobot Commented "A thread can also wake up without being notified, interrupted, or timing out, a so-called spurious wakeup. While this will rarely occur in practice, applications must guard against it by testing for the condition that should have caused the thread to be awakened, and continuing to wait if the condition is not satisfied." |
@glassfishrobot Commented
|
@glassfishrobot Commented Sporadically, the download fails with the above error message. See also the old bug GLASSFISH-2872 were Ken Cavanaugh fixed an issue by guarding against such thread wakeups. So please: Any answer from development here? |
@glassfishrobot Commented Regards |
@glassfishrobot Commented Thx |
@glassfishrobot Commented |
@glassfishrobot Commented Thanks! |
@glassfishrobot Commented |
@KTakita Commented Did the development team decide how to fix this issue? |
|
I have proposed a pull request to fix this bug. Please have a look: #41 We repeatedly see errors caused by this bug. It would be great if you could treat this with high priority. For the record, the same bug has been reported to the Oracle ORB but has never been fixed:. See https://bugs.openjdk.java.net/browse/JDK-8160235 |
* Fix erroneous timeout exceptions caused by spurious wakeups Fixes bug #6 Erroneous Timeout: IOP00410037: Timeout while reading data in buffer manager Will adapt tests in follow-up commit Signed-off-by: Andreas Hubold <[email protected]> * Adapt tests for previous commit EncodingTestBase.ORBDataFake used to provide a hook for tests to run additional code when method fragmentReadTimeout was called. This hook is used to inject code immediately before BufferManagerReadStream starts waiting on the fragmentQueue, for example to simulate Thread interruption. The previous commit changed the code to call method fragmentReadTimeout at a different time, so it cannot be used to change the actual wait in tests anymore. Add new method ORBData#waitNanos that wraps the actual wait call and override it in EncodingTestBase.ORBDataFake to inject the test behaviour. Signed-off-by: Andreas Hubold <[email protected]>
Sporadic error when transferring large byte arrays (e.g. 10 MB)
Bug is "com.sun.corba.ee.impl.encoding.BufferManagerReadStream.java"
The "underflow" method the "fragmentQueue.wait(orb.getORBData().fragmentReadTimeout())" returns unexplainable,
but it is NOT the due to the timeout, since it returnes after some milliseconds.
It looks like it get's notified without having the "fragmentQueue" properly enqueued, which I cannot explain.
So there is this "IOP00410037: Timeout while reading data in buffer manager",
but it is definitely no time out, also because it is thrown after some milliseconds, and this time out actually is 18 seconds.
This can be easily reproduced with the following very simple test.
It takes about a couple hundred tries (might take some minutes) until I get this error.
Even when client and server run on the same machine.
package de.test.client;
import javax.naming.Context;
import javax.naming.InitialContext;
import de.test.service.remote.TimeoutTestService;
public class TimeoutTestClient {
private static int tryNumber = 0;
private static boolean running = true;
public static void main(String[] args) throws Exception {
Context initialContext = new InitialContext();
TimeoutTestService timeoutTestService = (TimeoutTestService) initialContext.lookup(TimeoutTestService.class.getName());
long startTime = 0;
while (running) {
try
{ tryNumber++; startTime = System.currentTimeMillis(); timeoutTestService.getBytes(10000000); }
catch (Exception e)
{ System.out.println("Error occured at try number: " + tryNumber + " after " + (System.currentTimeMillis() - startTime) + " millis"); e.printStackTrace(); running = false; }
}
}
}
package de.test.service.remote;
import javax.ejb.Remote;
@Remote
public interface TimeoutTestService {
byte[] getBytes(int size);
}
package de.test;
import javax.ejb.Stateless;
import de.test.service.remote.TimeoutTestService;
@stateless
public class TimeoutTestServiceBean implements TimeoutTestService {
public byte[] getBytes(int size) {
byte[] bytes = new byte[size];
for (int i = 0; i < bytes.length; i++)
{ bytes[i] = 0x42; }
return bytes;
}
}
Environment
Windows 7, Glassfish 3.1, jdk1.6.0_26
Affected Versions
[current]
The text was updated successfully, but these errors were encountered: