DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B3030: an entry more tasks may call than its Max_Queue_Length

Catalog status: active. Default severity: error. Stable name: queue-length-exceeded. Family: Flow and effects.

Max_Queue_Length => N on a protected entry says that at most N callers wait on it at once; a call that finds the queue full raises Program_Error (RM D.4(19)). Verada's tasks are declared in library packages and live as long as the program, so each task that may call the entry, directly or through the subprograms it calls, may be waiting at the same time. Verada proves the queue never overflows by checking that the tasks (and the main subprogram) that may call the entry are at most N.

Example (Vada)

   protected Gate is
      entry Pass with Max_Queue_Length => 1;
      ...
   task body First is
   begin
      loop
         Gate.Pass;
   ...
   task body Second is
   begin
      loop
         Gate.Pass;

What to do (Vada)

Raise the bound to the number of tasks that call the entry, or give each caller an entry of its own:

      entry Pass with Max_Queue_Length => 2;

Regression source and further reading

Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.

See flow and effects, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.