Bug #15149 Receive EXCEPTION_ACCESS_VIOLATION from HotSpot VM
Submitted: 22 Nov 2005 20:03 Modified: 5 Dec 2005 15:01
Reporter: Tom Ritter Email Updates:
Status: Won't fix Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:5.0 OS:Windows (Windows XP Pro)
Assigned to: CPU Architecture:Any

[22 Nov 2005 20:03] Tom Ritter
Description:
When calling a stored procedure in a Java program, I get the following:

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100359c0, pid=1588, tid=5692
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode)
# Problematic frame:
# C  0x100359c0
#
# An error report file with more information is saved as hs_err_pid1588.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

Connector is:  mysql-connector-java-3.1.11-bin.jar

Check for the attached error report and java source code.

This happens after I insert a couple thousand rows into a table, and then I want to run a stored procedure to process the rows just inserted to update another table.

I'm not sure if this is a bug in Java or in your connector.

How to repeat:
Most times if failes and sometimes it doesn't.  It seems it's related to the amoun of data that's retireved from the SELECT * from Occupancy from the TSM servers.

If I comment out the "CollectOccupancy()" method call in main(), it works OK, or if I collect smaller amounts of data, it works OK.

Suggested fix:
I have no idea.
[22 Nov 2005 20:05] Tom Ritter
The error report from java

Attachment: hs_err_pid1588.log (application/octet-stream, text), 9.80 KiB.

[22 Nov 2005 20:06] Tom Ritter
CollectTsmData.java  -  The main method.

Attachment: CollectTsmData.class (application/java, text), 574 bytes.

[22 Nov 2005 20:07] Tom Ritter
The class adding rows to a table and running the stored procedure.

Attachment: UpdateTsmDataDB.java (text/plain), 4.44 KiB.

[22 Nov 2005 20:07] Tom Ritter
Class to get TSM server ODCB connections

Attachment: TsmServers.java (text/plain), 2.85 KiB.

[22 Nov 2005 20:09] Mark Matthews
Usually if the JVM itself crashes, it's a bug with the JVM (or your OS).

There's no native code in the JDBC driver, so the worst thing that should happen is you get an exception thrown.
[23 Nov 2005 12:33] Vasily Kishkin
Could you please say me what Occupancy is table ? What is definition of the table ?
[23 Nov 2005 13:38] Tom Ritter
SQL that defines The MySql DB and the storted procedure that updates the Trend Table.

Attachment: TsmData.txt (text/plain), 9.87 KiB.

[23 Nov 2005 13:48] Tom Ritter
I've attached a file that defines the MySql DB and the stored procedure that runs.

TSM is Tivoli Storage Manager from IBM.  It is a backup/archive/spacemanagement system for PC's, Servers, etc.  Data from a backup "node" is stored on a TSM server.  The TSM server maintains a proprietary database which includes an "Occupancy" table.  This table includes a rows for each file system backup on each node that includes the amount of backup data stored on the server.

My DB application collects this Occupancy data (into the occupancy table in my MySQL DB) and then runs the a stored procedure to update a table called "Occupancy Trend" from the occupancy data just collected from the TSM servers.  This is so we can track changes in data backed up by backup client.  These changes are usually increases in the amount of data backed up and so, we can use this data to determine who's using all of our backup tapes.

I hope this helps.  Let me know if you need any more information.
[23 Nov 2005 14:06] Tom Ritter
This is the CORRECT "CollectTsmData.java" file.

Attachment: CollectTsmData.java (text/plain), 229 bytes.

[23 Nov 2005 14:07] Tom Ritter
After reviewing the files that I attached, I realized that I attached the compiled version (The .class file) for CollectTsmData.  Sorry about that.
[3 Dec 2005 10:43] Vasily Kishkin
Thanks for your test case. I was able to reproduce the bug on Windows 2003.
[5 Dec 2005 15:01] Mark Matthews
What version of the VM is this? Unfortunately, we can't do much to fix this, as it seems to be a bug with your particular version of VM. We use no native code, so if the VM crashes, it's either a VM bug, or an OS bug (or related to over allocation of memory, which you could workaround, but the VM still shouldn't crash).

We might be able to come up with workarounds, but I suggest filing a bug over at http://java.sun.com/ against the hotspot VM itself.