473,395 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

.Net Service - Random Code Execution (.Net Bug?)

I have a .Net service (VB - 1.1 SP1) deployed in our environment that
is experiencing an odd issue. The service does a series of file &
registry based checks, logs to the event log and uploads the results to
an Oracle database. However, a few clients (a couple hundred or so out
of tens of thousands) are experiencing a rather odd issue.

The service is configure to fire it's checks every 48 hours (using a
timer), or whenever the service starts, whichever is sooner. Some
clients essentially "freak out" and execute the main block of code
several times per second for a period of time, resulting in hundreds of
thousands of records being added to the database in a 48 hour span of
time (instead of a couple). The event logs that are generated by the
service when this happens indicate that blocks of code are being
executed at random. Sometimes the same block is executed multiple
times. Here's what I've been able to ascertain:

- When the service encounters one of these "episodes", it lasts
anywhere from a couple hours to a couple days, but usually less than 48
hours, when it inexplicably stops and resumes normal functionality.

- Thousands of events are generated in the event log. This causes the
event log to wrap making it difficult for me investigate the source of
the problem. On the one machine where the event log had not wrapped,
there is nothing obvious either before the problem started or after it
stopped.

- Restarting the service does not seem to fix the issue. The problem
will persist until it stops of it's own accord.

- The issue is not tied to a specific build or make of machine.

- Based on the database records, a normal scan fires then terminates. A
few seconds elapse, and it enters this "loop".

- I could not reproduce the problem in test. The debugger ran normally.

I apologize, but I am not at liberty to post source code; I will do my
best to outline the flow of the program should any such questions
arise. Also, I am in the process of upgrading to .Net 2.0, but this
will take time.

Thank you very much. Any help is greatly appreciated.

Jan 2 '07 #1
1 1352
Celldss wrote:
I have a .Net service (VB - 1.1 SP1) deployed in our environment that
is experiencing an odd issue. The service does a series of file &
registry based checks, logs to the event log and uploads the results to
an Oracle database. However, a few clients (a couple hundred or so out
of tens of thousands) are experiencing a rather odd issue.

The service is configure to fire it's checks every 48 hours (using a
timer), or whenever the service starts, whichever is sooner. Some
clients essentially "freak out" and execute the main block of code
several times per second for a period of time, resulting in hundreds of
thousands of records being added to the database in a 48 hour span of
time (instead of a couple). The event logs that are generated by the
service when this happens indicate that blocks of code are being
executed at random. Sometimes the same block is executed multiple
Just a shot in the dark. Could there be something amiss with the
clocks on the affected machines? Is the timer being disabled when
entering the timer event? Can you tell if the timer is firing often
when the problem occurs? What method do you use for the timer? Does
it just tick periodically and you calculate when the 48 hours have
elapsed? Can you describe how you have implemented the timer?

One crude, but effective, debugging method would be to create a simple
logging mechanism that logs to a file. Periodically in the code have
it write out something like "Checkpoint A", "Checkpoint B", etc. so you
can follow the execution path. Have it output the values of pertinent
variables as well. You can then study the results and see if it helps
with the problem.

Good Luck

Jan 3 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Virus | last post by:
Ok well what I am trying to do is have 1.) the background color to change randomly with 5 different colors.(change on page load) 2,) 10 different quotes randomly fadeing in and out in random...
5
by: Marty McDonald | last post by:
I create and start several threads, each thread executes the same method - within the method, a web service is invoked. I find that the more threads I use, the longer it takes for all of the...
29
by: Ken Allen | last post by:
I have a number of services developed in C# (.Net), and they have been working fine for the most part. Recently someone reported that ipon occassion (originally rarely, but more frequently on some...
10
by: Curt_C [MVP] | last post by:
If I use it in my page it's fine but when I put it in a Class file for calling it returns the same # for each call. Any ideas why? I'm sure it's something I'll slap myself for but the only samples...
6
by: Intiha | last post by:
Hello all, I am trying to generate random seeds for my simulations. currently i was using srand(time(NULL); for this purpose. But for confidence in my results i ran it using a script in a loop....
13
by: Peter Oliphant | last post by:
I would like to be able to create a random number generator that produces evenly distributed random numbers up to given number. For example, I would like to pick a random number less than 100000,...
3
markmcgookin
by: markmcgookin | last post by:
Folks, I have an ASP .Net web service that I am using for a product in work. But we need to make this a more "portable" for installation on other boxes. One of the requirements is to avoid a...
1
by: vineet1987 | last post by:
i want to generate a series of random numbers like 00101 01011 01111 01010 11101 it is a 5*5 matrix and is random every time upon execution my code is:-
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.