Bug 694790 - [apache] A rare StackOverflowError when parsing complex directives
[apache] A rare StackOverflowError when parsing complex directives
Status: NEW
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
Unspecified Unspecified
low Severity high (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2011-04-08 08:55 EDT by Lukas Krejci
Modified: 2011-05-23 20:56 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lukas Krejci 2011-04-08 08:55:39 EDT
Description of problem:

Due to bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6337993 in Java regular expressions implementation we suffer from the stack overflow errors when parsing "long" directives.

An example could be some conditional rules for logging like (an artifical example, in reality each of the below IPs would be different):

SetEnvIf Remote_Addr "(111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111|111\.111\.111\.111)" specialrequests
CustomLog logs/access_log common env=!specialrequests

How reproducible:

Steps to Reproduce:
1. Modify httpd.conf and add a long directive similar to the one above
2. run discovery on the agent
Actual results:
stack overflow error during apache server discovery

Expected results:
no exceptions, config files parsed successfully

Additional info:

Workaround is to increase the stack size of the JVM:

RHQ_AGENT_ADDITIONAL_JAVA_OPTS='-Xss10M' bin/rhq-agent.sh

Note You need to log in before you can comment on or make changes to this bug.