www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladislav Malyshkin <malys...@cs.wmich.edu>
Subject mod_jserv/4580: Can not post may long form parameters with the same name.
Date Mon, 14 Jun 1999 02:37:05 GMT

>Number:         4580
>Category:       mod_jserv
>Synopsis:       Can not post may long form parameters with the same name.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sun Jun 13 19:40:00 PDT 1999
>Originator:     malyshki@cs.wmich.edu
>Release:        1.3.6 + JServ 1fc1
Redhat 5.2, JDK 1.1.7
Currently I can not post many long form parameters 
with the same name. The JServ gets outofmemory error.
I started JVM as
exec /usr/local/jdk117_v3/bin/java -ms20000K -mx20000K -verbosegc $*
then looked to error log.
Also I added printing to the class from SUNs JDK 
javax.servlet.http.HttpUtils, method parseQueryString
The output looks like:

<GC: freed 9 objects, 760 bytes in 148 ms, 97% free (14978264/15359992)>
  <GC: init&scan: 8 ms, scan handles: 39 ms, sweep: 29 ms, compact: 72 ms>
######### parseQueryString
<GC: freed 3 objects, 760 bytes in 139 ms, 97% free (14977992/15359992)>
  <GC: init&scan: 6 ms, scan handles: 36 ms, sweep: 28 ms, compact: 69 ms>
<GC: managing allocation failure. need 73728 bytes, type=1, action=1>
<GC: freed 4440 objects, 7445256 bytes in 4057 ms, 48% free (7448592/15359992)>
  <GC: init&scan: 22 ms, scan handles: 4004 ms, sweep: 31 ms, compact: 0 ms>
######### parseQueryString DONE
<GC: freed 31 objects, 1240 bytes in 250 ms, 43% free (6709048/15359992)>
  <GC: init&scan: 6 ms, scan handles: 35 ms, sweep: 29 ms, compact: 180 ms>

The JVM is taking a lot of memory, but GC does not claim it back.
After javax.servlet.http.HttpUtils.parseQueryString about 7Mb 
memory is taken, but the form parameters take just 40Kb.

Something is wrong with the garbage collector and its 
interaction with JServ and javax.servlet.http.HttpUtils.
I used a workaround to make JServ be able working 
with many long parameters as it described below.
1. Run Java VM as
exec /usr/local/jdk117_v3/bin/java -ms20000K -mx20000K -verbosegc $*
2. Post by using POST method of the form many long parameters
   (about 40Kb).
   I can supply you with such form if necessary.
3. Look at error_log.
The JVM will take a lot of memory or even run outofmemory error.
The memory will be released only after request is completed.
During all request processing a lot of memory is taken 
by something.
I have the following workaround to fix this.
1. Move SUN's file javax.servlet.http.HttpUtils
to org.apache.jserv.X_HttpUtils
and replace  
org.apache.jserv.X_HttpUtils.parseName(String, StringBuffer) by
This fixes this problem!!! I do not know why.
Also Edit org.apache.jserv.JServConnection to
use X_HttpUtils instead of HttpUtils.
After these changes are made 
free memory is always >95% in the garbage collector 
output. I have no OutOfMemoery error after this.
Before these changes were made 
one can easily get outofmemory error if post to many long parameters
with the same name.
[In order for any reply to be added to the PR database, you need]
[to include <apbugs@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message