Summary | Infinite loop breaks apache |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | mmarx (at) netdmon (dot) de |
Created | 06/16/2011 (5104 days ago) |
Due | |
Updated | 06/28/2011 (5092 days ago) |
Assigned | 06/25/2011 (5095 days ago) |
Resolved | 06/28/2011 (5092 days ago) |
Milestone | |
Patch | No |
Taken from Michael Slusarz
State ⇒ Resolved
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
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
This fixed the problem on our production server. It made an inifite loop.
Happy to have it working again.
Thanks!
State ⇒ Assigned
Version ⇒ Git master
Queue ⇒ Horde Framework Packages
Revert "Always make sure that $_contents is a resource before using it
(
Bug #10252)."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
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'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
Add test case for
bug #10252.1 files changed, 5 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/0dd9cbe7aa097bdf5120bb3417f3e99ba057a343
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
New Attachment: kronolith_failing_conf.php
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.
State ⇒ Feedback
Priority ⇒ 1. Low
Version ⇒ Git master
after saving the event, I get an alarm notification displayed for this
event.
Queue ⇒ Kronolith
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 "Save" 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 "horde_alarms" database table and after I changed the
entry created for this event in the "kronolith_events" database table
so that the "event_alarm" is in the future.
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 "fread" and "feof"
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
"/usr/share/horde4/kronolith/lib/Kronolith.php"]
Jun 16 17:27:26 server HORDE: HORDE [kronolith] PHP ERROR: Undefined
index: api [pid 13557 on line 1219 of
"/usr/share/horde4/kronolith/lib/Kronolith.php"]
Jun 16 17:27:26 server HORDE: HORDE [kronolith] PHP ERROR: Undefined
index: api [pid 13557 on line 1222 of
"/usr/share/horde4/kronolith/lib/Kronolith.php"]
Jun 16 17:27:26 server HORDE: HORDE [kronolith] PHP ERROR: Undefined
index: api [pid 13557 on line 1231 of
"/usr/share/horde4/kronolith/lib/Kronolith.php"]
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 "/usr/share/php/Horde/Mime/Part.php"]
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 "/usr/share/php/Horde/Mime/Part.php"]
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 "/usr/share/php/Horde/Mime/Part.php"]
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 "/usr/share/php/Horde/Mime/Part.php"]
...
checked again after some hours if the webinterface would still crash
but it did not. The system now behaves again as it should.
Priority ⇒ 3. High
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ Infinite loop breaks apache
Type ⇒ Bug
Queue ⇒ IMP
process with 100% CPU load. I'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
"Loading" 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 "fread" and "feof" error lines spammed the logfile. I
restarted the apache server, removed /tmp/<horde cache files>*,
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
"/usr/share/horde4/login.php"]
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 "/usr/share/horde4/imp/lib/Auth.php"]
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
"/usr/share/php/Horde/Mime/Part.php"]
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
"/usr/share/php/Horde/Mime/Part.php"]
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
"/usr/share/php/Horde/Mime/Part.php"]
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
"/usr/share/php/Horde/Mime/Part.php"]
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
"/usr/share/php/Horde/Mime/Part.php"]
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
"/usr/share/php/Horde/Mime/Part.php"]
...
-------------
/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
"/usr/share/php/Horde/Mime/Part.php"]
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
"/usr/share/php/Horde/Mime/Part.php"]
Jun 16 10:54:01 server suhosin[16086]: ALERT - canary mismatch on
efree() - heap overflow detected at 0xba12588c (attacker 'REMOTE_ADDR
not set', file '/usr/share/horde4/imp/lib/Ajax/Application.php', line
456)
-------------
Please tell me if you need further information.