views:

91

answers:

5

I have a java application that I run from eclipse 3.5. My OS is WinXP(SP2) and the JRE version is 6.05.

I run the application on two identical computers (or so I think) but the application behaves differently on each computer.

The computers are the same Dell Optiplex model with the same amount of memory and have the same GPU.

On the first computer, the application runs flawlessly. However, on the second one the application freezes for a couple of minutes and then returns to run normally.

The strange thing is that the CPU usage on the second computer is not high at all. It seems as though my application does not receive any CPU for no apparent reason.

Computers should be deterministic so I assume there must be some difference between the machines but I don't know where to look.

I would love some ideas on where the problem might be.

Thanks, Yoav.

A: 

Well, I would first update your JRE version as there are newer versions now.

As for both computers being identical, are they really identical? I find it difficult to believe that both have the same exact software and setup and that anything you have done to one, you have always done to the other. If this is indeed the case, you may want to try to debug your application on the second machine (the one that hangs) and find out specifically where it hangs.

It may also help us if you give more information about your application. The problem may not be your computer at all if the application is doing things like web access, network access, etc.

JasCav
Good comments, but updating the JRE is very unlikely to have any effect. I would start with debugging (assuming the same thing doesn't happen to your debugger).
Chris
A: 

So both computers have nearly identical hardware. A few other things to check

  • Do they both have Eclipse 3.5, WinXP(SP2) and JRE 6.05 installed?
  • And behave differently when run from within Eclipse (on both machines or on one run from command-line)?
  • Is this reproducible? If yes When does it happen? On startup? Or on some specific action?
  • Does the program have a GUI?
  • Is there maybe some kind of virus scanner or another comparable software installed on one of the machines which could delay the program
  • Is networking, file acccess, multithreading involved?
jitter
A: 

I can think of two non-application possibilities:

  1. Memory Paging. There's something extra happening on the slow machine, so your JVM is not getting a fair share of CPU time. A large daemon process or some such.

  2. Network access. Your app is making some kind of network call and it's glitching or timeing out. Perhaps going and fetching some XML schema, perhaps a disk acesss to a mounted drive.

I've seen all manner of weirdness when apps attempt to access hosts by name and DNS is not well. One machine has an etc/host entry the other does not. Even each machine might want to resolve itself.

djna
+3  A: 

I've found the problem.

The application that was unresponsive was run in debug mode.

Sorry to have wasted your time...

Yoav Schwartz
It always seems to be the simplest things, huh? :)
Drew
Useful answer nonetheless.
Robert Harvey
:) yeah, I guess so
Yoav Schwartz
+1  A: 

It may help you to get a Thread Dump when the app freezes. This will hopefully tell you exactly what is holding you up (i.e. waiting for IO somewhere).

Phill Sacre