Return-Path: Delivered-To: apmail-httpd-bugs-archive@www.apache.org Received: (qmail 98627 invoked from network); 7 Dec 2007 13:01:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2007 13:01:37 -0000 Received: (qmail 17398 invoked by uid 500); 7 Dec 2007 13:01:23 -0000 Delivered-To: apmail-httpd-bugs-archive@httpd.apache.org Received: (qmail 17364 invoked by uid 500); 7 Dec 2007 13:01:23 -0000 Mailing-List: contact bugs-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: "Apache HTTPD Bugs Notification List" List-Id: Delivered-To: mailing list bugs@httpd.apache.org Received: (qmail 17350 invoked by uid 99); 7 Dec 2007 13:01:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2007 05:01:23 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2007 13:01:10 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id 3AA8571424A; Fri, 7 Dec 2007 05:01:10 -0800 (PST) From: bugzilla@apache.org To: bugs@httpd.apache.org Subject: DO NOT REPLY [Bug 43942] - httpd crashes while loading ldap attributes In-Reply-To: X-Bugzilla-Reason: AssignedTo Message-Id: <20071207130112.3AA8571424A@brutus.apache.org> Date: Fri, 7 Dec 2007 05:01:10 -0800 (PST) X-Virus-Checked: Checked by ClamAV on apache.org DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=43942 bernd.asf@emskeim.de changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21240|0 |1 is obsolete| | AssignedTo|bugs@httpd.apache.org |bernd.asf@emskeim.de Status|NEEDINFO |ASSIGNED ------- Additional Comments From bernd.asf@emskeim.de 2007-12-07 05:01 ------- Created an attachment (id=21242) --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21242&action=view) Patch - optimized attribute handling Regardless of the process doesn't crash anymore with correct LDR-CNTRLs I still think that this is bug in util_ldap.c If you look at this piece of code: - while (values && values[j]) { - str = str ? apr_pstrcat(r->pool, str, "; ", values[j], NULL) - : apr_pstrdup(r->pool, values[j]); So with each iteration an new string is allocated with apr_pstrcat whereas the old string is not returned to the pool. In my case I want to retrieve 3'500 attribute values. So this loop has 3'500 iterations and 3'500 strings are allocated, each a bit larger than the one before. This is exponential memory consumption. In the end this loop consumes about 760 mb; in my patched version it takes only about 800 kb. Still not optimal, but much better than before. Patch now in unified diff format as requested. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org