<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Infinite loop breaks apache</title> 
  <pubDate>Fri, 10 Apr 2026 19:28:19 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/10252</link> 
  <atom:link rel="self" type="application/rss+xml" title="Infinite loop breaks apache" href="https://bugs.horde.org/ticket/10252/rss" /> 
  <description>Infinite loop breaks apache</description> 
 
   
   
  <item> 
   <title>I&#039;ve just came across a severe bug in IMP which locks up my </title> 
   <description>I&#039;ve just came across a severe bug in IMP which locks up my apache 2 process with 100% CPU load. I&#039;m not exactly sure what I did to cause it but I will describe my actions as good as I can.

I setup horde4 with imp, kronolith, turba etc. it worked like a charm for some weeks now. I regularly update the pear packages when I get the announcements.

Today I used kronolith to create a new calendar entry in April 2012, shortly after this I moved an appointment from today to tomorrow via drag and drop. Then I tried to switch back to DIMP. It kept saying &quot;Loading&quot; but nothing happened. I logged into my server and realized that the apache2 process was running at 100% CPU load. I checked the logfiles and saw that my /var/log/messages file grew rapidly. See below, the &quot;fread&quot; and &quot;feof&quot; error lines spammed the logfile. I restarted the apache server, removed /tmp/&lt;horde cache files&gt;*, restarted my browser and logged in again to the horde webinterface. The snippet below from the /var/log/messages file is the result of this successful login process but the result is the same, the logfile gets spammed with the PHP error messages.

Since then I can no longer use the horde webinterface because as soon as I access it, it instantly locks up my apache server.

System information:
-------------
root@server:~# pear list -c horde
INSTALLED PACKAGES, CHANNEL PEAR.HORDE.ORG:
===========================================
PACKAGE                   VERSION STATE
...
horde                     4.0.6   stable
imp                       5.0.7   stable
kronolith                 3.0.4   stable
...
-------------
root@server:~# pear list-upgrades
Channel pear.horde.org: No upgrades available
-------------
root@server:~# php -v
PHP 5.3.3-7+squeeze1 with Suhosin-Patch (cli) (built: Mar 18 2011 17:22:52) 
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

Logfiles:
/var/log/messages:
Jun 16 10:53:41 server HORDE: HORDE [horde] Login success for a@b.de [111.111.222.222] to horde. [pid 25835 on line 153 of &quot;/usr/share/horde4/login.php&quot;]
Jun 16 10:53:41 server HORDE: HORDE [imp] Login success for a@b.de (Horde user a@b.de) [111.111.222.222] to {localhost:993 [imap]} [pid 25835 on line 179 of &quot;/usr/share/horde4/imp/lib/Auth.php&quot;]
Jun 16 10:53:44 server HORDE: HORDE [imp] PHP ERROR: rewind() expects parameter 1 to be resource, string given [pid 25835 on line 1802 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
Jun 16 10:53:44 server HORDE: HORDE [imp] PHP ERROR: feof() expects parameter 1 to be resource, string given [pid 25835 on line 1803 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
Jun 16 10:53:44 server HORDE: HORDE [imp] PHP ERROR: fread() expects parameter 1 to be resource, string given [pid 25835 on line 1804 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
Jun 16 10:53:44 server HORDE: HORDE [imp] PHP ERROR: feof() expects parameter 1 to be resource, string given [pid 25835 on line 1803 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
Jun 16 10:53:44 server HORDE: HORDE [imp] PHP ERROR: fread() expects parameter 1 to be resource, string given [pid 25835 on line 1804 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
Jun 16 10:53:44 server HORDE: HORDE [imp] PHP ERROR: feof() expects parameter 1 to be resource, string given [pid 25835 on line 1803 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
...
-------------
/var/log/syslog:
...
Jun 16 10:54:01 server HORDE: HORDE [imp] PHP ERROR: fread() expects parameter 1 to be resource, string given [pid 25835 on line 1804 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
Jun 16 10:54:01 server HORDE: HORDE [imp] PHP ERROR: feof() expects parameter 1 to be resource, string given [pid 25835 on line 1803 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
Jun 16 10:54:01 server suhosin[16086]: ALERT - canary mismatch on efree() - heap overflow detected at 0xba12588c (attacker &#039;REMOTE_ADDR not set&#039;, file &#039;/usr/share/horde4/imp/lib/Ajax/Application.php&#039;, line 456)
-------------

Please tell me if you need further information.</description> 
   <pubDate>Thu, 16 Jun 2011 09:38:00 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65683</link> 
  </item> 
   
  <item> 
   <title>I can maybe qualify the severity because the problem disappe</title> 
   <description>I can maybe qualify the severity because the problem disappeared. I checked again after some hours if the webinterface would still crash but it did not. The system now behaves again as it should.</description> 
   <pubDate>Thu, 16 Jun 2011 15:27:07 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65698</link> 
  </item> 
   
  <item> 
   <title>But ... I could reproduce the issue. I just moved an appoint</title> 
   <description>But ... I could reproduce the issue. I just moved an appointment in the montly view in kronolith from one day to the next and tried to switch to DIMP. The CPU load for the apache process immediatly rose to 100% and the logfiles got spammed again with the &quot;fread&quot; and &quot;feof&quot; messages but this time kronolith produced them.

Jun 16 17:27:26 server HORDE: HORDE [kronolith] PHP ERROR: Undefined index: api [pid 13557 on line 1216 of &quot;/usr/share/horde4/kronolith/lib/Kronolith.php&quot;]
Jun 16 17:27:26 server HORDE: HORDE [kronolith] PHP ERROR: Undefined index: api [pid 13557 on line 1219 of &quot;/usr/share/horde4/kronolith/lib/Kronolith.php&quot;]
Jun 16 17:27:26 server HORDE: HORDE [kronolith] PHP ERROR: Undefined index: api [pid 13557 on line 1222 of &quot;/usr/share/horde4/kronolith/lib/Kronolith.php&quot;]
Jun 16 17:27:26 server HORDE: HORDE [kronolith] PHP ERROR: Undefined index: api [pid 13557 on line 1231 of &quot;/usr/share/horde4/kronolith/lib/Kronolith.php&quot;]
Jun 16 17:27:36 server HORDE: HORDE [kronolith] PHP ERROR: rewind() expects parameter 1 to be resource, string given [pid 13557 on line 1802 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
Jun 16 17:27:36 server HORDE: HORDE [kronolith] PHP ERROR: feof() expects parameter 1 to be resource, string given [pid 13557 on line 1803 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
Jun 16 17:27:36 server HORDE: HORDE [kronolith] PHP ERROR: fread() expects parameter 1 to be resource, string given [pid 13557 on line 1804 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
Jun 16 17:27:36 server HORDE: HORDE [kronolith] PHP ERROR: feof() expects parameter 1 to be resource, string given [pid 13557 on line 1803 of &quot;/usr/share/php/Horde/Mime/Part.php&quot;]
...
</description> 
   <pubDate>Thu, 16 Jun 2011 15:36:44 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65699</link> 
  </item> 
   
  <item> 
   <title>I investigated a little bit further because my system got un</title> 
   <description>I investigated a little bit further because my system got unusable again.

Steps to recreate the issue:

1. Open the calendar
2. Create an event for the current date with the following settings
   Title: testevent
   From: 1 hour later than the current time
   Length: 1 hour
   Reminder: Set to 2 hours before the event (This time lies in the past)
3. Leave the remaining settings as defaults
4. As soon as you click &quot;Save&quot; something breaks

So I think this bug is not IMP but Kronolith/Notification related.

I could get my system running again after I deleted the corresponding entry in the &quot;horde_alarms&quot; database table and after I changed the entry created for this event in the &quot;kronolith_events&quot; database table so that the &quot;event_alarm&quot; is in the future.</description> 
   <pubDate>Fri, 17 Jun 2011 08:21:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65705</link> 
  </item> 
   
  <item> 
   <title>I cannot reproduce this. When I perform the listed steps to </title> 
   <description>I cannot reproduce this. When I perform the listed steps to reproduce, after saving the event, I get an alarm notification displayed for this event.</description> 
   <pubDate>Fri, 24 Jun 2011 18:55:27 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65830</link> 
  </item> 
   
  <item> 
   <title>I can still recreate the issue with the steps I described be</title> 
   <description>I can still recreate the issue with the steps I described below.

Please tell me what I can do to help you debug the problem.

As a first step I attached the kronolith config of my horde installation.</description> 
   <pubDate>Sat, 25 Jun 2011 13:11:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65841</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Check if fil</title> 
   <description>Changes have been made in Git for this ticket:

Check if file pointer is (still) a valid resource (Bug #10252).

 1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/12e98ec4c91378ae7faa64a97630dc6afab8102b</description> 
   <pubDate>Sat, 25 Jun 2011 19:52:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65848</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Add test cas</title> 
   <description>Changes have been made in Git for this ticket:

Add test case for bug #10252.

 1 files changed, 5 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/0dd9cbe7aa097bdf5120bb3417f3e99ba057a343</description> 
   <pubDate>Sat, 25 Jun 2011 19:52:59 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65849</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Always make </title> 
   <description>Changes have been made in Git for this ticket:

Always make sure that $_contents is a resource before using it (Bug #10252).
As a side-effect of serializing, it might have been converted to a string, and
we don&#039;t want to clone the mime part before serializing it.

 2 files changed, 31 insertions(+), 9 deletions(-)
http://git.horde.org/horde-git/-/commit/b2d086839532ea785a20e7bd1a57d114e6cd2658</description> 
   <pubDate>Sat, 25 Jun 2011 19:53:00 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65850</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Revert &quot;Alwa</title> 
   <description>Changes have been made in Git for this ticket:

Revert &quot;Always make sure that $_contents is a resource before using it (Bug #10252).&quot;
This reverts commit b2d086839532ea785a20e7bd1a57d114e6cd2658.

This breaks message viewing in IMP, though all tests pass just fine. No
idea what IMP is doing with mime parts that breaks this.

 2 files changed, 9 insertions(+), 31 deletions(-)
http://git.horde.org/horde-git/-/commit/10b3eb5f8f5f5baa2e9490b7d69316dfa38024f7</description> 
   <pubDate>Sat, 25 Jun 2011 20:47:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65851</link> 
  </item> 
   
  <item> 
   <title>Bug in Horde_Mime.</title> 
   <description>Bug in Horde_Mime.</description> 
   <pubDate>Sat, 25 Jun 2011 20:50:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65852</link> 
  </item> 
   
  <item> 
   <title>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Check</title> 
   <description>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Check if file pointer is (still) a valid resource (Bug #10252).
&gt;
&gt;  1 files changed, 1 insertions(+), 1 deletions(-)
&gt; http://git.horde.org/horde-git/-/commit/12e98ec4c91378ae7faa64a97630dc6afab8102b

--

This fixed the problem on our production server. It made an inifite loop.
Happy to have it working again.

Thanks!</description> 
   <pubDate>Sun, 26 Jun 2011 19:17:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65863</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Implement Se</title> 
   <description>Changes have been made in Git for this ticket:

Implement Serializable interface to fix serialization, this time for real (Bug #10252).

 3 files changed, 86 insertions(+), 28 deletions(-)
http://git.horde.org/horde-git/-/commit/81986ac9689647052cfd2ed8637d0e8cc29f9371</description> 
   <pubDate>Tue, 28 Jun 2011 10:15:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10252#t65910</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
