You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jocelyn Paine <po...@ifs.org.uk> on 2002/09/01 08:59:45 UTC

Tomcat 4.0.4 under Windows NT crashes: "memory cannot be read"

I'm using Tomcat for Java and JSP in a large server-side application under
NT4. Most of it works fine, but in a few parts of the application, Tomcat
crashes:  
  Application Error. The instruction at "<memory address>"
  referenced memory at "<memory address>". The memory cannot be read.

This error is semi-repeatable. It only shows up in some parts of the
application, but not every time, even though I take exactly the same path
through the application after starting Tomcat. It never happens
immediately after starting the app., but only when I reach one particular
part: but as I've said, it doesn't always happen, even with identical
inputs. Perhaps it shows up one time in 5.

The Java code itself is OK: it has run fine on the same machine under New
Atlanta's ServletExec servlet engine, and under various flavours of Linux
using the JRun servlet engine. On one ISP, it has run for a year and a
half without any crashes.

The crash also happens - same version of Tomcat - on a colleague's Windows
XP machine, and shows the same semi-repeatability. Lest anybody suggest
it's an out-of-memory error, this machine has at least 128 MB (don't know
exactly) against my 64MB. The part of the application that sometimes
crashes is not generating any large objects.

Any developers lurking here? I'd like to use Tomcat, but dare not if it is
going to fail with this kind of random error. What puzzles me is this
semi-repeatability - why, if the fault is only provoked in specific parts
of the application, does it not happen every time? I've not found any
other reports of such crashes in the mail archives.

My system: Tomcat 4.0.4 is running stand-alone on Windows NT 4 (service
pack 3); starting it by invoking Tomcat's startup.bat from a DOS window.
My Java is Sun's "Classic VM (build JDK-1.2-V, native threads)". Machine
is a 64 MB Dell Latitude.

My colleague's system is a new Sony Vaio running Windows XP, same version
of Tomcat, also a Sun JVM but probably a slightly newer one. Tomcat
running as a service.

This probably isn't relevant, but on both systems, the web browser is also
running on the same machine, using loopback to connect to the server.

I've not been able to get any info about the error from Tomcat's logs, or
from the DOS window in which I started it.

Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0.4 under Windows NT crashes: "memory cannot be read"

Posted by Randall R Schulz <rr...@cris.com>.
Jocelyn,

That's not a Tomcat problem.

The diagnostic you're seeing is indicative of a problem in the JVM or a 
native library or of some flaw external to the whole Tomcat / JVM complex 
(hardware or driver, e.g.). Short of a bug in the bytecode interpreter, the 
JIT translator or other code running as native instructions within the 
JVM's address space, this cannot happen.

Thus the problem is by definition not Tomcat, since Tomcat is 100% Java. 
Even if only Tomcat triggers the symptom, it cannot be a problem in the 
Tomcat code. Such a bug would produce misbehavior (non-compliant with the 
pertinent specs) and / or an inappropriate or unhandled Java exception, 
possibly even abortive shutdown of Tomcat as a whole, but not a low-level 
fault such as you've reported.

You should consider driver bugs (network driver, e.g.) or bugs in the 
platform's native (JNI) libraries or corrupted files containing code that 
is activated when you run Tomcat.

You should also consider hardware problems. Run a RAM diagnostic at the 
very least (check out MemTest86--it's good and mature. Get the latest 
release, especially if you have a P4-based system).

Good luck.

Randall Schulz
Mountain View, CA USA


At 23:59 2002-08-31, Jocelyn Paine wrote:
>I'm using Tomcat for Java and JSP in a large server-side application under
>NT4. Most of it works fine, but in a few parts of the application, Tomcat
>crashes:
>   Application Error. The instruction at "<memory address>"
>   referenced memory at "<memory address>". The memory cannot be read.
>
>...
>
>Jocelyn Paine


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0.4 under Windows NT crashes: "memory cannot be read"

Posted by Jocelyn Paine <po...@ifs.org.uk>.
Randall,

I installed the 1.3.1 JSDK in place of 1.2, and this error _seems_ to have
gone away. Since it wasn't 100% repeatable, I can't be sure, and will have
to test it on my colleague's machine (which always tended to manifest the
fault more often), but I may be lucky.

You suggested I install JSDK 1.3.1 or 1.4.0: I wasn't able to install the
latter, because InstallShield crashed "Interface not found" when it
started the install proper, after unpacking its files. Surely Sun can't
have left such an obvious bug, but perhaps they don't support NT 4 any
more?

In answer to your question, I'd been running Tomcat stand-alone, not glued
to Apache.

Finally, with reference to a comment in your earlier mail, is Tomcat
indeed 100% Java? I.e. it doesn't include any native code? If so, I wonder
what it was provoking to crash the 1.2 JVM (assuming that is indeed what
happened) - nothing I've run has ever managed that before, not even the
same application under a different server. (Since the fault appeared on
two different machines, with different hardware configurations and Windows
versions, I'd been assuming it was unlikely to be hardware or drivers.)

Anyway, thanks for the advice. My colleague's machine is in France until
next week, but when I can get at it, I'll post again if upgrading his JVM
doesn't fix the problem.

Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091 


On Sun, 1 Sep 2002, Randall R Schulz wrote:

> Jocelyn,
> 
> I didn't read enough or carefully enough.
> 
> 
> You really ought to get a more up-to-date version of the JRE or SDK. I 
> recommend 1.4.0_01 or 1.3.1, but using 1.2 at this point is not a good idea.
> 
> 
> By the way, how do you (or your colleague) you get Tomcat to run as a 
> service? Via Apache?
> 
> Are you certain that it's the Tomcat process that's crashing? Your 
> diagnostic didn't include the application name that is (I believe) in the 
> window title of the alert whose contents you reported. Is it "java.exe" or 
> something else?
> 
> 
> Randall Schulz
> Mountain View, CA USA
> 
> 
> At 23:59 2002-08-31, you wrote:
> >....
> >
> >My system: Tomcat 4.0.4 is running stand-alone on Windows NT 4 (service
> >pack 3); starting it by invoking Tomcat's startup.bat from a DOS window.
> >My Java is Sun's "Classic VM (build JDK-1.2-V, native threads)". Machine
> >is a 64 MB Dell Latitude.
> >
> >My colleague's system is a new Sony Vaio running Windows XP, same version
> >of Tomcat, also a Sun JVM but probably a slightly newer one. Tomcat
> >running as a service...
> >
> >Jocelyn Paine
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0.4 under Windows NT crashes: "memory cannot be read"

Posted by Jocelyn Paine <po...@ifs.org.uk>.
I reported that this error happened on two different machines: my Dell
laptop running NT 4, and a colleague's Sony Vaio running XP. I've now got
hold of his machine and seen the symptoms there. They're somewhat
different from on my NT system. When I run the bit of the application that
provokes the fault, a window pops up:

  JavaService

  JavaService has encountered a problem and needs to close. We are sorry
  for the inconvenience.

  If you were in the middle of something, the information you were working
  on may have been lost.

  Please tell Microsoft about this problem.

  <etc>

                                         [Send Error Report] [Don't Send]

I don't know XP well enough to know under which circumstances it uses this
pop-up.

If I then press either of the buttons, it stops Tomcat. However, if I just
ignore the pop-up, I can carry on interacting with the application. Tomcat
remains running, and if I exercise the same part of the application again
(without restarting anything or rebooting), it usually runs normally.

Randall Schulz suggested that I upgrade Java. I've checked the Java system
on this machine, and it is already 1.4.0.01, so about as recent as we can
get.

So - any ideas? I could try some hardware diagnostics, but with the fault
occurring (in different ways) on two very different machines and systems,
I don't believe they can both have hardware problems.

Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091 


On Sun, 1 Sep 2002, Randall R Schulz wrote:

> Jocelyn,
> 
> I didn't read enough or carefully enough.
> 
> 
> You really ought to get a more up-to-date version of the JRE or SDK. I 
> recommend 1.4.0_01 or 1.3.1, but using 1.2 at this point is not a good idea.
> 
> 
> By the way, how do you (or your colleague) you get Tomcat to run as a 
> service? Via Apache?
> 
> Are you certain that it's the Tomcat process that's crashing? Your 
> diagnostic didn't include the application name that is (I believe) in the 
> window title of the alert whose contents you reported. Is it "java.exe" or 
> something else?
> 
> 
> Randall Schulz
> Mountain View, CA USA
> 
> 
> At 23:59 2002-08-31, you wrote:
> >....
> >
> >My system: Tomcat 4.0.4 is running stand-alone on Windows NT 4 (service
> >pack 3); starting it by invoking Tomcat's startup.bat from a DOS window.
> >My Java is Sun's "Classic VM (build JDK-1.2-V, native threads)". Machine
> >is a 64 MB Dell Latitude.
> >
> >My colleague's system is a new Sony Vaio running Windows XP, same version
> >of Tomcat, also a Sun JVM but probably a slightly newer one. Tomcat
> >running as a service...
> >
> >Jocelyn Paine
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0.4 under Windows NT crashes: "memory cannot be read"

Posted by Randall R Schulz <rr...@cris.com>.
Jocelyn,

I didn't read enough or carefully enough.


You really ought to get a more up-to-date version of the JRE or SDK. I 
recommend 1.4.0_01 or 1.3.1, but using 1.2 at this point is not a good idea.


By the way, how do you (or your colleague) you get Tomcat to run as a 
service? Via Apache?

Are you certain that it's the Tomcat process that's crashing? Your 
diagnostic didn't include the application name that is (I believe) in the 
window title of the alert whose contents you reported. Is it "java.exe" or 
something else?


Randall Schulz
Mountain View, CA USA


At 23:59 2002-08-31, you wrote:
>....
>
>My system: Tomcat 4.0.4 is running stand-alone on Windows NT 4 (service
>pack 3); starting it by invoking Tomcat's startup.bat from a DOS window.
>My Java is Sun's "Classic VM (build JDK-1.2-V, native threads)". Machine
>is a 64 MB Dell Latitude.
>
>My colleague's system is a new Sony Vaio running Windows XP, same version
>of Tomcat, also a Sun JVM but probably a slightly newer one. Tomcat
>running as a service...
>
>Jocelyn Paine


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>