Dr Watson error

F

fniles

I have a VB6 program that receives data using socket and save the data to a
SQL Server 2000 database.
It has Windows 2000 SP4 with all hot patches in it. It has 2 gig of RAM.
The program had been running for years with no problem, but for the last 3
days it had died exactly at 3 AM. No error on the screen, but there is Dr.
Watson error (it is in drwtsn32.log).
The error in drwtsn32.log is:
Exception number: c0000005 (access violation) --> this is on this VB
program.
I do not know how to read Dr Watson log, but the "Raw Stack Dump" contains
c:\winnt\system32\comsvcs.dll.
I searched on the internet and found that there was an Access Violation
error with comsvcs.dll, and the fix is to install the latest Windows
patches, which we already did. We also increased the memory from 1 gig RAM
to 2 gig. The program still happens.
There is no scheduled task running at 3 AM.
Does anybody know how to read Dr Watson log ?
How can I fix this problem ?
Thank you very much.
 
M

Mike Williams

. . . The program had been running for years with no problem, but for
the last 3 days it had died exactly at 3 AM. No error on the screen

What happens on the server at 3 a.m.? I would imagine that specific time is
very popular for performing automated backups, probably because that
particular time is mentioned in the "blurb" on many Microsoft web pages that
talk about task scheduling [ . . . but who wants to come in at 3 a.m. to . .
..] ;-)

Mike
 
F

fniles

Thank you.
There is no scheduled task running at 3 AM. The Automatic Windows Update was
set to:
"Download updates for me, but let me choose when to install them"
I just changed it to "Notify me but don't automatically download or install
them"
I was watching the machine at 3 AM, and there is nothing (no DOS prompt or
anything else) that just start running at 3 AM.
According to our Network administrator, there is no automatic backup of the
machine. How can I check if there is one ?

One more information: After the program died last night AT 3 AM, I manually
changed the clock to 2:59 AM to see when it hit 3 AM again if I can
duplicate the problem.
I could not duplicate the problem when the clock hit 3 AM again.

Thank you.

Mike Williams said:
. . . The program had been running for years with no problem, but for
the last 3 days it had died exactly at 3 AM. No error on the screen

What happens on the server at 3 a.m.? I would imagine that specific time
is very popular for performing automated backups, probably because that
particular time is mentioned in the "blurb" on many Microsoft web pages
that talk about task scheduling [ . . . but who wants to come in at 3 a.m.
to . . .] ;-)

Mike
 
G

Ghostrider

fniles said:
Thank you.
There is no scheduled task running at 3 AM. The Automatic Windows Update was
set to:
"Download updates for me, but let me choose when to install them"
I just changed it to "Notify me but don't automatically download or install
them"
I was watching the machine at 3 AM, and there is nothing (no DOS prompt or
anything else) that just start running at 3 AM.
According to our Network administrator, there is no automatic backup of the
machine. How can I check if there is one ?

One more information: After the program died last night AT 3 AM, I manually
changed the clock to 2:59 AM to see when it hit 3 AM again if I can
duplicate the problem.
I could not duplicate the problem when the clock hit 3 AM again.

Thank you.

Three o'clock in the morning is a very arbitrary time and the
access violation, c0000005, is not necessarily limited to an
internal operation. It could be an outside trigger, perhaps
attempting to access the server at that specific time. And
since this problem just started, do anti-virus, anti-spyware
and anti-malware sweeps. Check the firewall log for intrusion
or attempts to connect to the outside.
 
F

fniles

Thank you, I will ask the network administrator to do that.

One more information:
the program did NOT die in the previous 2 days when it did not write to the
SQL Server database at 3 am.
But today, it starts writing data again to the SQL Server database, and it
died again at 3 am. It always died after finish writing to the SQL Server
database at 3 am. It successfully wrote every record to the SQL Server
database, then it died. Every time it died, it always gave the same Access
Violation error in Dr. Watson log.
It writes successfully to the SQL Server database every minute throughout
the whole day without any problem, it only died when finished writing to SQL
Server at 3 am.

Thanks.
 
F

fniles

I found this article that talks about Access Violation error and SQL Server
(but it is with Windows 2003, and I am using Windows 2000)
http://ask.support.microsoft.com/kb/910471
Symptoms
An access violation occurs in Microsoft Distributed Transaction Coordinator
(MS DTC) when a client that is connected to an MS DTC clustered resource
tries to create an enlistment in MS DTC. For example, this problem may occur
if a computer where Microsoft SQL Server is installed loses synchronization
with an MS DTC server and then tries to enlist a transaction in MS DTC.

Cause
This problem occurs because of two race conditions in the MS DTC code. In
one race condition, the transaction manager (TM) tries to create a trace
before an interface pointer to perform that trace exists. A second race
condition exists when the MS DTC proxy sends TMDown notifications to
enlistments and resource managers.

Could that problem related to my problem, even though for different Windows
version ? What does it mean by "Microsoft SQL Server is installed loses
synchronization with an MS DTC server and then tries to enlist a transaction
in MS DTC" ?

Thanks.
 
P

PeterD

Thank you, I will ask the network administrator to do that.

One more information:
the program did NOT die in the previous 2 days when it did not write to the
SQL Server database at 3 am.
But today, it starts writing data again to the SQL Server database, and it
died again at 3 am. It always died after finish writing to the SQL Server
database at 3 am. It successfully wrote every record to the SQL Server
database, then it died. Every time it died, it always gave the same Access
Violation error in Dr. Watson log.
It writes successfully to the SQL Server database every minute throughout
the whole day without any problem, it only died when finished writing to SQL
Server at 3 am.

Thanks.

3 AM? Huh... <g> What is special about 3 AM? (Other than I'm sleeping
at that time!)

Check to see if there is a backup process that starts at that time, or
some other regularlly scheduled process that is interfering with your
application...
 
F

fniles

No backup process or scheduled task at 3 AM.
I want to clear it up a little bit: At 3 AM, the program starts writing
records to SQL Server at 3 AM, and it finishes writing around 03:00:15,
somtimes 03:00:18, etc. AFter it finishes writing, then it dies.
If it does not write the database, it does not die. And it writes
successfully to the SQL Server database every minute throughout
the whole day without any problem, it only died when finished writing to SQL
Server at 3 am.
 
M

Mike Williams

I want to clear it up a little bit: At 3 AM, the program starts writing
records to SQL Server at 3 AM, and it finishes writing
around 03:00:15, somtimes 03:00:18, etc. AFter it finishes
writing, then it dies. If it does not write the database, it does not die.
And it writes successfully to the SQL Server database
every minute throughout the whole day without any problem,
it only died when finished writing to SQL Server at 3 am.

Have you got an Integer (instead of a Long) somewhere that is counting
seconds, or something similar? What happens if you add code to "skip" the 3
a.m. write? Do the following writes then work okay? What happens if you
temporarily change the frequency to two minutes instead of one?

Mike
 
F

fniles

Have you got an Integer (instead of a Long) somewhere that is counting
seconds, or something similar?
The program has a timer with 10 miliseconds interval.When the timer is hit,
the following codes are executed:

Public objConn As New ADODB.Connection
:
dTime = CDate(now)
If DatePart("s", DateAdd("n", -1, dTime)) = "0" then
'write to the database
:
strSequenceNum60Min = ....
For InsertIndex = 0 To ArraySize
sSymbol = TickArray(InsertIndex, TICKARRAY_SYMBOL)
sSql = "exec InsertTickData60Min @SequenceNumber='" &
strSequenceNum60Min & "'@CommodityCode='" & sSymbol &
"',@ClosePrice=" & Val(strClose60Min) & _
",@Volume=" & Val(strVol60Min) & ",@DateTime='" & DateAdd("n", -60,
dTime) & "'"
objConn.Execute sSql

This is the stored Procedure
CREATE Procedure InsertTickData60Min
(
@SequenceNumber varChar(13),
@CommodityCode varChar(10),
@ClosePrice float(8),
@Volume int,
@DateTime datetime
)
as Begin
Declare @error int

---- insert the record into 60 min tick data
if (select count(SequenceNumber) from TickData60Min where SequenceNumber =
@SequenceNumber and symbol = (rtrim(@CommodityCode) + @MonthYear)) = 0
begin
Insert Into TickData60Min
(
SequenceNumber,
CommodityCode,
ClosePrice,
Volume,
[Date]
)
Values
(
@SequenceNumber,
@CommodityCode,
@ClosePrice,
@Volume,
@DateTime
)
end
Select @error = @@error

return @error
end
GO

What happens if you add code to "skip" the 3 a.m. write? Do the following
writes then work okay?
I have a checkbox to "Skip recording data", next time at 3 am, I will check
on this box and see if the program dies, and see if the following writes are
ok.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top