473,760 Members | 8,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.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 1372
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
2505
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 spots on the webpage. with a delay timer on them, so they keep changing as the page is open. Not random each time the page is loaded. If anyone can help it would be greatly appreaciated, I have tried many of
5
4825
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 threads to finish. The threads are asynchronous, correct? And I thought each would be able to use it's own version of the web service. Am I wrong, does the web service force only one thread at a time to execute? Here is code if interested... I'm...
29
3414
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 systems of late), there is an entry in the Event Log immediately after a boot indicating that the service failed to start after 30,000 milliseconds. Usually it starts fine when attempting manually after the boot. I instrumented the code to...
10
1659
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 I can find are for calling the Random() within the page, not a seperate class. --Page-- myClass myclass = new myClass(); for(int i = 1;i <= 100; i++) {
6
5910
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. Since the time b/w execution is very similar, many simulation runs resulted in exact same results. Is there a better way of seeding the random number generator in c/c++
13
2815
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, or between 0 and 99999 (inclusive). Further, the I want the range to be a variable. Concretely, I would like to create the following method: unsigned long Random( unsigned long num )
3
9843
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 recompile when performing different installs. Thus we can't have any hard coded paths in the service. So I have some code I wrote for another application that happily parses an xml file and stores a load of local variables based on it's content, which...
1
2034
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
9333
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10107
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9945
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9900
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5361
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.