https://bz.apache.org/bugzilla/show_bug.cgi?id=66323

            Bug ID: 66323
           Summary: JDK_JAVA_OPTIONS grows unboundedly if webapp restarts
                    Tomcat
           Product: Tomcat 9
           Version: 9.0.65
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: martin.do...@hitachivantara.com
  Target Milestone: -----

The code at:

https://github.com/apache/tomcat/blob/09193e0514ac449df454184941bba492d9b20a85/bin/catalina.sh#L294

... that starts appending to JDK_JAVA_OPTIONS with:

JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS
--add-opens=java.base/java.lang=ALL-UNNAMED"

... eventually causes an error like:

     [exec] /opt/smu/tomcat/bin/catalina.sh: 1: eval:
/opt/smu/javaTools/java/bin/java: Argument list too long

... if the Tomcat webapp restarts Tomcat enough times (on the order of 553) to
break a 128 KiB limit on the length of a single environment variable that the
shell is perhaps imposing.

I think this code was originally from Tomcat 9.0.0.M23 2017-07-03 in
https://github.com/apache/tomcat/commit/4ad5264746e667a9874d6a56f6d52a7faa051b09
but was backported to Tomcat 8.5.24 2017-10-02 with
https://github.com/apache/tomcat/commit/c3f3260481f14a9107994a6ee18f9e5ccc48c692.

We'll solve it without changing Tomcat, not least as our wrapper code is doing
something similar with another environment variable, but I would have found the
diagnosis easier if my web search for E2BIG "Argument list too long"
catalina.sh had shown me the way, so I wanted to report it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to