6.0.0-beta1
8/13/25

[#14745] Horde_Mapi winmail.dat file of 800kB produces memory leak
Summary Horde_Mapi winmail.dat file of 800kB produces memory leak
Queue IMP
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester admin (at) layertec (dot) de
Created 12/01/2017 (2812 days ago)
Due
Updated 03/15/2018 (2708 days ago)
Assigned 12/08/2017 (2805 days ago)
Resolved 12/24/2017 (2789 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/15/2018 01:45:36 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #9 Reply to this comment
In the meantime, I found another ticket that seems to mention the 
same issue. It says it is not a bug in IMP or Horde_Mapi but the 
BigInteger-Implementation of PEAR. I just tried to install 
php-bcmath (7.0.19-1) and it seems to work fine now.
Same here, thanks for the pointer.
12/24/2017 04:54:12 AM Michael Rubinsky Comment #8
State ⇒ Resolved
Reply to this comment
Changed in git, awaiting release.
12/08/2017 03:33:35 PM Michael Rubinsky Comment #7
State ⇒ Assigned
Assigned to Michael Rubinsky
Reply to this comment

Sure. It was originally written that way to begin with, but was 
changed to Math_BigInteger (which will use bcmath if available) at the 
request of Slusarz.
12/07/2017 11:48:03 AM Jan Schneider Comment #6
State ⇒ Feedback
Reply to this comment
Michael, any chance we make bcmath a mandatory requirement for 
Horde_Mapi? IIRC we use it from HAS only, and that is optional anyway.
I'd really like to get rid of Math_BigInteger, or fall back to using 
phpsec's version.
12/07/2017 01:00:25 AM Michael Rubinsky State ⇒ Not A Bug
 
12/04/2017 08:32:37 AM admin (at) layertec (dot) de Comment #5 Reply to this comment

[Show Quoted Text - 16 lines]
Unfortunately the email message is confidential, sorry.

In the meantime, I found another ticket that seems to mention the same 
issue. It says it is not a bug in IMP or Horde_Mapi but the 
BigInteger-Implementation of PEAR. I just tried to install php-bcmath 
(7.0.19-1) and it seems to work fine now.

It's just a bit hard to figure out the behaviour when there are 
multiple possible implementations.

I learned to get rid of PEAR implementations wherever possible.

The issue is solved for me now.
12/04/2017 08:14:03 AM Jan Schneider Comment #4 Reply to this comment
This is not a memory leak, technically.
Can you provide an example message?
Didn't I?

2017-12-01T15:48:36+01:00 EMERG: HORDE [imp] Allowed memory size of 
11610612736 bytes exhausted (tried to allocate 1207959552 bytes) 
[pid 15047 on line 1090 of "/usr/share/php/Math/BigInteger.php"]
Not an error message, but an email message (or winmail.dat file), that 
triggers this behaviour ;-)
I wonder, if imap or the Horde_Mapi extension might use php_bcmath 
instead of PEAR math, if it is installed?
Yes, it does.
12/04/2017 04:59:11 AM admin (at) layertec (dot) de Comment #3 Reply to this comment
This is not a memory leak, technically.
Can you provide an example message?
Didn't I?

2017-12-01T15:48:36+01:00 EMERG: HORDE [imp] Allowed memory size of 
11610612736 bytes exhausted (tried to allocate 1207959552 bytes) [pid 
15047 on line 1090 of "/usr/share/php/Math/BigInteger.php"]

I wonder, if imap or the Horde_Mapi extension might use php_bcmath 
instead of PEAR math, if it is installed?
12/03/2017 09:14:58 PM Jan Schneider Comment #2
State ⇒ Feedback
Priority ⇒ 1. Low
Reply to this comment
This is not a memory leak, technically.
Can you provide an example message?
12/01/2017 03:04:54 PM admin (at) layertec (dot) de Comment #1
Priority ⇒ 3. High
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Horde_Mapi winmail.dat file of 800kB produces memory leak
Type ⇒ Bug
Reply to this comment
With installed Horde_Mapi extension viewing an email containing a 
winmail.dat file with a size of approx. 800kB leads to a memory leak. 
The PHP instance used by horde may use up to 1.5GB memory.

2017-12-01T15:48:36+01:00 EMERG: HORDE [imp] Allowed memory size of 
1610612736 bytes exhausted (tried to allocate 1207959552 bytes) [pid 
15047 on line 1090 of "/usr/share/php/Math/BigInteger.php"]

Saved Queries