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

Update JSP Logic to Avoid Race Condition Regarding trackDependencies #17828

Closed
volosied opened this issue Jul 13, 2021 · 0 comments · Fixed by #17877
Closed

Update JSP Logic to Avoid Race Condition Regarding trackDependencies #17828

volosied opened this issue Jul 13, 2021 · 0 comments · Fixed by #17877
Assignees
Labels
in:Web Components release bug This bug is present in a released version of Open Liberty release:21008 team:Sirius

Comments

@volosied
Copy link
Member

volosied commented Jul 13, 2021

After #17532, it was discovered that JSP may not always update the dependentsList properly when JSP handles concurrent requests. This means dependents are not tracked, and the JSP fails to updated when any changes occur to those include JSPs.

  • Occurs when trackDependencies is true.
  • Two simultaneous requests come in to the same jsp with after the server starts up.
    • First request comes in, the page is translated/compiled, and classloaderCreated is set as true within it’s synchronous block.
    • Second requests comes in just after the first request leaves the synchronous block. and then classloaderCreated is to to false.
  • The class object containing this variable is a the same for the two requests so classloaderCreated also changes for the first request.
    classloaderCreated needs to be true for the check within loadClassInformation as that’s where the dependentsList is populated. If it’s not, then future requests to that page won’t check if the dependents are outdated (since it’s empty).

Scenarios where this can occur:

  • Large Enough JSP. Code is synchronized, and the translation/compilation take a while, This creates a backlog of requests waiting to go into that sync block. When the first request leaves, the next comes comes in and sets classloaderCreated back to false. Then that first request, fails to add dependents. Then dependencies are not tracked.
  • High Load ( Might not be ideal to update the JSP during this time)
@volosied volosied self-assigned this Jul 13, 2021
@volosied volosied changed the title Fix EDR Update Logic Update trackDepedencies Logic Jul 15, 2021
@volosied volosied changed the title Update trackDepedencies Logic Update trackDepedencies Logic to Avoid Race Condition Jul 15, 2021
@volosied volosied changed the title Update trackDepedencies Logic to Avoid Race Condition Update JSP Logic to Avoid Race Condition Regarding trackDependencies Jul 15, 2021
@pnicolucci pnicolucci added this to General Issues in Web Tier Team via automation Jul 16, 2021
@volosied volosied added the release bug This bug is present in a released version of Open Liberty label Jul 16, 2021
Web Tier Team automation moved this from General Issues to Completed Tasks Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:Web Components release bug This bug is present in a released version of Open Liberty release:21008 team:Sirius
Projects
Archived in project
Web Tier Team
  
Completed Tasks
Development

Successfully merging a pull request may close this issue.

3 participants