comp.lang.ada
 help / color / mirror / Atom feed
From: Jano <nono@celes.unizar.es>
Subject: Help with anormal pausing of program
Date: Wed, 11 Jun 2003 01:37:33 +0200
Date: 2003-06-11T01:37:33+02:00	[thread overview]
Message-ID: <MPG.19508a2de77d0e4c989718@News.CIS.DFN.DE> (raw)

Hello everybody,

I have been discussing this matter in the Gnatlist but it seems that we 
have not extracted any definitive conclusion, so I want to ask here too.

I have a multitasking program; it has service tasks with usually are 
accepting rendezvous, and periodic tasks that do some processing and 
sleep for some time.

The problem is that I've detected that some (many) of these tasks are 
being stopped for unusual long times, after some running time. It seems 
like I issue a delay 1.0 but they sleep for much more. I haven't find 
any deadlock or critical race condition anywhere, CPU usage is idle.

Since the program is fairly big and complex, I've distilled the 
following test case to rule out problems in my code:

http://www.mycgiserver.com/~mosteo/dead-noio.zip

This is fairly simple but exhibits the same behavior. It has a queue for 
trace messages, a task reading them, a task producing them, and other 
dummy tasks that seem to favour the happening of the wrong thing.

The program runs fine for some time, and suddenly traces cease to 
appear. Some arbitrary time after, usually less than half an hour (but 
sometimes hours, sometimes "never"), everything resumes normally but is 
evident that the task I'm using as reference (called heartbeat in my 
sample) has slept for much more time than it should. I detect that 
condition and report it.

I have the following test combinations, in everyone I launch eight 
simultaneous instances of the test:

A) AMD 2000+ winXP SP1 Gnat 3.15p. Usually some of the instances 
exhibits the rare stopping in less than half an hour.

B) Same computer as A) but with Linux, Gnat 3.15p native threading: 
Everything OK (several hours uptime).

C) Same computer as A) but using ObjectAda free edition: Everything OK 
(several days uptime).

D) PIII 1000 WinXP Gnat 3.15p. It has happened only once in several 
days.

People from the gnatlist have run similar versions of this test program; 
a Win2000 user has reported the freezing after 90 minutes, while users 
of other platforms have not reported any problem for very long uptimes.

I would be very grateful if you could review my program and test it. I 
would want to know if

a) There is a justification for abnormally long delays in my code, 
because of some misunderstanding or bug in my tasks.

b) This is XP or at least windows specific, or even if it happens to 
someone apart from me.

c) It could be a problem in Gnat-Windows itself.

d) How could I workaround that, if possible.

I've launched the eight tasks just before starting this post. They're 
now all frozen, and what's more strange, I've seen them frozen 
within 30 seconds of difference (I was keeping an eye on them), and have 
resumed at the nearly same time. CPU idle all the time. This is driving 
me crazy. Any light or hope in this matter would make me very happy. I 
have usually uptimes of several days and no other program is showing 
strange behaviors. I've tested my RAM also.

Thanks in advance,

-- 
-------------------------
Jano
402450.at.cepsz.unizar.es
-------------------------



             reply	other threads:[~2003-06-10 23:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-10 23:37 Jano [this message]
2003-06-11 14:31 ` Help with anormal pausing of program Dmitriy Anisimkov
2003-06-11 18:42   ` Jano
2003-06-11 19:54     ` Pascal Obry
2003-06-12  2:21     ` Anisimkov
2003-06-12  6:31       ` Jano
2003-06-12  7:26         ` tmoran
2003-06-12  7:47           ` Jano
2003-06-12  9:43           ` Georg Bauhaus
2003-06-12 17:09             ` tmoran
2003-06-12 22:19               ` Georg Bauhaus
2003-06-13 18:13               ` Jano
2003-06-14  4:59                 ` tmoran
2003-06-12  7:47         ` Jano
2003-06-12 12:59           ` Dmitriy Anisimkov
2003-06-12  8:32         ` Preben Randhol
2003-06-12  7:06       ` Vinzent Hoefler
2003-06-13 13:35         ` Dmitriy Anisimkov
2003-06-11 20:16   ` tmoran
2003-06-11 21:11     ` Jano
2003-06-11 22:36       ` tmoran
2003-06-12  6:38         ` Jano
2003-06-12 18:08   ` Wiljan Derks
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox