[#6389] Recurrence::nextRecurrence(weekly) recursive function call
Summary Recurrence::nextRecurrence(weekly) recursive function call
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester thomas (dot) jarosch (at) intra2net (dot) com
Created 03/06/2008 (168 days ago)
Due
Updated 05/26/2008 (87 days ago)
Assigned 05/24/2008 (89 days ago)
Resolved 05/26/2008 (87 days ago)
Attachments
Milestone
Patch No

History
05/26/2008 Jan Schneider State ⇒ Not A Bug
Taken from Jan Schneider
 
05/26/2008 Thomas Jarosch State ⇒ Resolved
 
05/26/2008 Thomas Jarosch Comment #3 Reply to this comment
Hello Jan,
The code has been there working fine for almost 7 years, so I'd
rather not want to change it. But if you could provide a test case to
reproduce the infinite loop we could try to track down what's going
wrong.
The infinite loop was caused by broken data which triggered a weekly 
recurrence with 98949324892 recurrences. I've fixed that by #6388,
so I think we can leave the code as it is until we stumble
on it again with real data (which probably shouldn't happen).

Thomas

05/24/2008 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
The code has been there working fine for almost 7 years, so I'd rather 
not want to change it. But if you could provide a test case to 
reproduce the infinite loop we could try to track down what's going 
wrong.
03/10/2008 Jan Schneider State ⇒ Assigned
 
03/06/2008 Chuck Hagenbuch Assigned to Jan Schneider
 
03/06/2008 thomas (dot) jarosch (at) intra2net (dot) com Comment #1
Queue ⇒ Horde Framework Packages
Summary ⇒ Recurrence::nextRecurrence(weekly) recursive function call
Type ⇒ Bug
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Reply to this comment
Hello together,

during tests with the new Kolab freebusy framework I bombarded the 
code with all kinds of calendering data. Suddenly PHP started 
segfaulting.

It turned out this was due to a 
Horde_Date_Recurrence::nextRecurrence() recursive function call for an 
unlimited weekly recurrence which hit the internal stack size limit of 
PHP. After adding a debug
counter I saw nextRecurrence() being called over 1.600 times.

Jan, as you are most familiar with the recurrence code,
would it be possible to change the recursive function call into a loop?

Cheers,
Thomas