View Issue Details

IDProjectCategoryView StatusLast Update
0000092LDMud 3.3Runtimepublic2012-12-09 01:55
Reportermenaures Assigned Tozesstra  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
Target Version3.3.721 
Summary0000092: Near-endless loops using catch()
DescriptionJust happened to notice this... execution continues if there's not enough eval reserve available for catch().

So I just had to try this:
---- 8< ----
while(1) catch(1; reserve get_eval_cost());
---- 8< ----

Even without the 'reserve get_eval_cost()' add-on the driver hangs for quite some time because UNItopias default reserve is with 64k evals quite big. The driver is busy for quite a long time writing thousands of 'Caught error: Not enough eval time left for catch()' into the debug logs.

I'm quite sorry about this coz this behaviour was introduced in 3.3.559 and suggested by me (changelog says so, but I don't remember and can't find any related mail).

Quite unsure what to do about the issue though... only see two possibilities right now, either ignore it (mudlib problem, well, since there are also other ways to let the mud hang for a bit) or return to the old behaviour. Need to recall my reasoning for this suggestion, though.
TagsNo tags attached.

Relationships

related to 0000603 closedzesstra LDMud 3.5 Detect and log too long executions in terms of execution time 

Activities

lars

2004-07-14 06:31

reporter   ~0000101

I am leaning towards leaving it this way - using while(1) is always asking for trouble, and as long as the eval-cost limit eventually ends such a loop, there is not much else that can be done.

The reasoning for the change (we talked about it April this year) was to make the handling of catch easier: Something like

if (msg = catch(...) {
    write("Error: "+msg+"\n");
}

did not handle the 'not enough evals left for catch' situation before the change.

menaures

2004-07-16 08:28

reporter   ~0000108

Other possibilities would be
- additional eval cost based on elapsed time (suggested by Gnomi)
- intelligent catch which raises a real error if there aren't enough evals
  for catch n times in a row during an execution
- make catch cost more evals if there aren't enough evals
  if there's still a considerable amount of evals left. }:-)

zesstra

2011-02-14 15:18

administrator   ~0001980

I tend to close this as WONTFIX, although: we might consider Menaures suggestion to raise a real error in catch(), if there were not enough eval costs for 10 calls to catch() in a row in the same executions thread.

zesstra

2012-12-09 01:55

administrator   ~0002174

So it seems we won't fix this.

Issue History

Date Modified Username Field Change
2004-07-14 03:05 menaures New Issue
2004-07-14 06:31 lars Note Added: 0000101
2004-07-16 08:28 menaures Note Added: 0000108
2009-01-29 01:32 zesstra Relationship added related to 0000603
2011-02-14 15:18 zesstra Note Added: 0001980
2011-02-14 15:18 zesstra Status new => feedback
2011-02-23 22:02 zesstra Target Version => 3.3.721
2012-12-09 01:55 zesstra Note Added: 0002174
2012-12-09 01:55 zesstra Status feedback => closed
2012-12-09 01:55 zesstra Assigned To => zesstra
2012-12-09 01:55 zesstra Resolution open => won't fix