Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple duplicate element IDs cause excess memory allocations and looping. #17562

Closed
tbitonti opened this issue Jun 16, 2021 · 0 comments
Closed
Assignees
Labels
bug This bug is not present in a released version of Open Liberty release bug This bug is present in a released version of Open Liberty release:22001

Comments

@tbitonti
Copy link
Contributor

tbitonti commented Jun 16, 2021

Describe the bug

When using at least two levels of nested elements and several child elements with the same ID, memory usage quickly becomes excessive and is likely to result in running out of heap space.

Original description:
The problem is excess memory usage, and there appears to be an infinite loop in configuration merge processing.

Using a custom connection type, with references from each custom connection to a connection factory, if the connection factories are properly given unique IDs, the configuration is processed as expected.

The problem occurs If the connection factory IDs are incorrectly set to the same value.

See the attachments:

Stack of note:
stack.txt
(In particular, "com.ibm.ws.config.xml.internal.ConfigElement.merge".)

Leak suspects:
memory.txt
(In particular "com.ibm.ws.config.xml.internal.SimpleElement".)

Working configuration:
config_working.txt

Failing configuration:
config_failing.txt

The change between the configurations is the reuse of the connection factory IDs:

  <customConnection id="cc0001" connectionFactoryRef="cf0001"/>
  <connectionFactory id="cf0001">
    <properties.xx hostName="000.00.000.0" portNumber="0001"/>
  </connectionFactory>

  <customConnection id="cc0002" connectionFactoryRef="cf0002"/>
  <connectionFactory id="cf0002">
    <properties.xx hostName="000.00.000.0" portNumber="0002"/>
  </connectionFactory>

  <customConnection id="cc0001" connectionFactoryRef="cf0001"/>
  <connectionFactory id="cf0001">
    <properties.xx hostName="000.00.000.0" portNumber="0001"/>
  </connectionFactory>

  <customConnection id="cc0002" connectionFactoryRef="cf0001"/>
  <connectionFactory id="cf0001">
    <properties.xx hostName="000.00.000.0" portNumber="0002"/>
  </connectionFactory>
@tbitonti tbitonti added the bug This bug is not present in a released version of Open Liberty label Jun 16, 2021
@tbitonti tbitonti self-assigned this Jun 16, 2021
@brenthdaniel brenthdaniel self-assigned this Nov 15, 2021
@brenthdaniel brenthdaniel added the release bug This bug is present in a released version of Open Liberty label Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This bug is not present in a released version of Open Liberty release bug This bug is present in a released version of Open Liberty release:22001
Projects
None yet
Development

No branches or pull requests

3 participants