From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,446940dda01a26f2,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-16 08:54:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!uni-berlin.de!dialin-145-254-122-222.arcor-ip.NET!not-for-mail From: Stefan Soos Newsgroups: comp.lang.ada Subject: Tasking_Error Date: Sun, 16 Mar 2003 17:53:47 +0100 Message-ID: Reply-To: stefan.soos@gmx.de NNTP-Posting-Host: dialin-145-254-122-222.arcor-ip.net (145.254.122.222) X-Trace: fu-berlin.de 1047833647 70508057 145.254.122.222 (16 [16707]) X-Orig-Path: ID-soos.user.dfncis.de!nobody User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:35382 Date: 2003-03-16T17:53:47+01:00 List-Id: Hallo all, when i run the following program on Linux 2.4.18 with Gnat 3.14p-3 I always get the following exception information: Exception name: TASKING_ERROR Message: Failure during activation Here's the program: -- Cut here -- with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Text_IO; use Ada.Text_IO; with Ada.Exceptions; use Ada.Exceptions; procedure Task_Stressing is Maximum_Tasks : constant := 5000; task type Called_Task_Type is entry Start; entry Rendevouz; end Called_Task_Type; task body Called_Task_Type is begin accept Start; Put ("Tasks waiting so far: "); Put (Rendevouz'Count); New_Line; accept Rendevouz; end Called_Task_Type; Called_Task : Called_Task_Type; task type Calling_Task_Type is entry Start; end Calling_Task_Type; task body Calling_Task_Type is begin accept Start; Called_Task.Rendevouz; end Calling_Task_Type; type Calling_Task_Access is access Calling_Task_Type; type Calling_Task_List; type Calling_Task_List_Access is access all Calling_Task_List; type Calling_Task_List is record Next : Calling_Task_List_Access := null; Item : Calling_Task_Access := null; end record; Head : Calling_Task_List_Access; List_Items : Calling_Task_List_Access; Tasks_Created : Natural := 0; begin Head := new Calling_Task_List; Head.Item := new Calling_Task_Type; List_Items := Head; Tasks_Created := Tasks_Created + 1; Create_Calling_Tasks : begin for I in 2 .. Maximum_Tasks loop List_Items.Next := new Calling_Task_List; if (I mod 100) = 0 then Put ("."); end if; List_Items.Next.Item := new Calling_Task_Type; List_Items := List_Items.Next; Tasks_Created := Tasks_Created + 1; end loop; exception when E : others => New_Line; Put ("Tasks created: "); Put (Tasks_Created); New_Line; Put_Line (Exception_Information (E)); end Create_Calling_Tasks; List_Items := Head; New_Line (2); STart_Calling_Tasks : for I in 1 .. Maximum_Tasks loop if List_Items.Item /= null then List_Items.Item.Start; if (I mod 100) = 0 then Put ("!"); end if; List_Items := List_Items.Next; else exit Start_Calling_Tasks; end if; end loop Start_Calling_Tasks; New_Line (1); Called_Task.Start; end Task_Stressing; -- Cut here -- Am I missing something or why is the program behaving faulty? I don't know if it is of interest but my limit settings are: core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 stack size (kbytes, -s) unlimited cpu time (seconds, -t) unlimited max user processes (-u) 4095 virtual memory (kbytes, -v) unlimited Thanks for any ideas, Stefan --