Thymeleaf application deadlocked in production, stuck inside Thymeleaf code
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
What could cause this to happen? My web application has frozen up and stopped responding. I went and did a thread dump and found several threads all BLOCKED inside Thymeleaf:
Thread 3247: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=836 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int) @bci=72, line=997 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int) @bci=24, line=1304 (Compiled frame)
- java.util.concurrent.Semaphore.acquire() @bci=5, line=312 (Compiled frame)
- org.thymeleaf.util.ResourcePool.allocate() @bci=4, line=108 (Compiled frame)
- org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplateUsingPool(org.thymeleaf.Configuration, java.lang.String, java.io.Reader, org.thymeleaf.util.ResourcePool) @bci=2, line=124 (Compiled frame)
- org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplate(org.thymeleaf.Configuration, java.lang.String, java.io.Reader) @bci=8, line=116 (Compiled frame)
- org.thymeleaf.TemplateRepository.getTemplate(org.thymeleaf.TemplateProcessingParameters) @bci=556, line=278 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(org.thymeleaf.TemplateProcessingParameters, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=11, line=1104 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(java.lang.String, org.thymeleaf.context.IProcessingContext, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=110, line=1060 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(java.lang.String, org.thymeleaf.context.IContext, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=17, line=1011 (Compiled frame)
- org.thymeleaf.spring4.view.ThymeleafView.renderFragment(org.thymeleaf.fragment.IFragmentSpec, java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=590, line=335 (Compiled frame)
- org.thymeleaf.spring4.view.ThymeleafView.render(java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=5, line=190 (Compiled frame)
What could cause this? The presentation-layer code has not changed with the last release of the application. The application is fairly mature and stable. I'm not sure where to start investigating. Application is redeployed back to previous release for now while I try to reproduce the issue through a load-test.
Why would Thymeleaf require any kind of locking? There seems to be some fundamental architectural aspect of Thymeleaf at play here, that I don't understand.
This may not be technically a "deadlock" by the most strict definitions, but the result is the same.
java thymeleaf
add a comment |
What could cause this to happen? My web application has frozen up and stopped responding. I went and did a thread dump and found several threads all BLOCKED inside Thymeleaf:
Thread 3247: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=836 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int) @bci=72, line=997 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int) @bci=24, line=1304 (Compiled frame)
- java.util.concurrent.Semaphore.acquire() @bci=5, line=312 (Compiled frame)
- org.thymeleaf.util.ResourcePool.allocate() @bci=4, line=108 (Compiled frame)
- org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplateUsingPool(org.thymeleaf.Configuration, java.lang.String, java.io.Reader, org.thymeleaf.util.ResourcePool) @bci=2, line=124 (Compiled frame)
- org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplate(org.thymeleaf.Configuration, java.lang.String, java.io.Reader) @bci=8, line=116 (Compiled frame)
- org.thymeleaf.TemplateRepository.getTemplate(org.thymeleaf.TemplateProcessingParameters) @bci=556, line=278 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(org.thymeleaf.TemplateProcessingParameters, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=11, line=1104 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(java.lang.String, org.thymeleaf.context.IProcessingContext, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=110, line=1060 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(java.lang.String, org.thymeleaf.context.IContext, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=17, line=1011 (Compiled frame)
- org.thymeleaf.spring4.view.ThymeleafView.renderFragment(org.thymeleaf.fragment.IFragmentSpec, java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=590, line=335 (Compiled frame)
- org.thymeleaf.spring4.view.ThymeleafView.render(java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=5, line=190 (Compiled frame)
What could cause this? The presentation-layer code has not changed with the last release of the application. The application is fairly mature and stable. I'm not sure where to start investigating. Application is redeployed back to previous release for now while I try to reproduce the issue through a load-test.
Why would Thymeleaf require any kind of locking? There seems to be some fundamental architectural aspect of Thymeleaf at play here, that I don't understand.
This may not be technically a "deadlock" by the most strict definitions, but the result is the same.
java thymeleaf
Which thymeleaf version are you using? 2.1.6.RELEASE?
– caco3
Nov 26 '18 at 16:58
I'm on 2.1.5.RELEASE
– Alex R
Nov 26 '18 at 17:00
add a comment |
What could cause this to happen? My web application has frozen up and stopped responding. I went and did a thread dump and found several threads all BLOCKED inside Thymeleaf:
Thread 3247: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=836 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int) @bci=72, line=997 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int) @bci=24, line=1304 (Compiled frame)
- java.util.concurrent.Semaphore.acquire() @bci=5, line=312 (Compiled frame)
- org.thymeleaf.util.ResourcePool.allocate() @bci=4, line=108 (Compiled frame)
- org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplateUsingPool(org.thymeleaf.Configuration, java.lang.String, java.io.Reader, org.thymeleaf.util.ResourcePool) @bci=2, line=124 (Compiled frame)
- org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplate(org.thymeleaf.Configuration, java.lang.String, java.io.Reader) @bci=8, line=116 (Compiled frame)
- org.thymeleaf.TemplateRepository.getTemplate(org.thymeleaf.TemplateProcessingParameters) @bci=556, line=278 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(org.thymeleaf.TemplateProcessingParameters, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=11, line=1104 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(java.lang.String, org.thymeleaf.context.IProcessingContext, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=110, line=1060 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(java.lang.String, org.thymeleaf.context.IContext, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=17, line=1011 (Compiled frame)
- org.thymeleaf.spring4.view.ThymeleafView.renderFragment(org.thymeleaf.fragment.IFragmentSpec, java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=590, line=335 (Compiled frame)
- org.thymeleaf.spring4.view.ThymeleafView.render(java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=5, line=190 (Compiled frame)
What could cause this? The presentation-layer code has not changed with the last release of the application. The application is fairly mature and stable. I'm not sure where to start investigating. Application is redeployed back to previous release for now while I try to reproduce the issue through a load-test.
Why would Thymeleaf require any kind of locking? There seems to be some fundamental architectural aspect of Thymeleaf at play here, that I don't understand.
This may not be technically a "deadlock" by the most strict definitions, but the result is the same.
java thymeleaf
What could cause this to happen? My web application has frozen up and stopped responding. I went and did a thread dump and found several threads all BLOCKED inside Thymeleaf:
Thread 3247: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=836 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int) @bci=72, line=997 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int) @bci=24, line=1304 (Compiled frame)
- java.util.concurrent.Semaphore.acquire() @bci=5, line=312 (Compiled frame)
- org.thymeleaf.util.ResourcePool.allocate() @bci=4, line=108 (Compiled frame)
- org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplateUsingPool(org.thymeleaf.Configuration, java.lang.String, java.io.Reader, org.thymeleaf.util.ResourcePool) @bci=2, line=124 (Compiled frame)
- org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplate(org.thymeleaf.Configuration, java.lang.String, java.io.Reader) @bci=8, line=116 (Compiled frame)
- org.thymeleaf.TemplateRepository.getTemplate(org.thymeleaf.TemplateProcessingParameters) @bci=556, line=278 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(org.thymeleaf.TemplateProcessingParameters, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=11, line=1104 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(java.lang.String, org.thymeleaf.context.IProcessingContext, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=110, line=1060 (Compiled frame)
- org.thymeleaf.TemplateEngine.process(java.lang.String, org.thymeleaf.context.IContext, org.thymeleaf.fragment.IFragmentSpec, java.io.Writer) @bci=17, line=1011 (Compiled frame)
- org.thymeleaf.spring4.view.ThymeleafView.renderFragment(org.thymeleaf.fragment.IFragmentSpec, java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=590, line=335 (Compiled frame)
- org.thymeleaf.spring4.view.ThymeleafView.render(java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=5, line=190 (Compiled frame)
What could cause this? The presentation-layer code has not changed with the last release of the application. The application is fairly mature and stable. I'm not sure where to start investigating. Application is redeployed back to previous release for now while I try to reproduce the issue through a load-test.
Why would Thymeleaf require any kind of locking? There seems to be some fundamental architectural aspect of Thymeleaf at play here, that I don't understand.
This may not be technically a "deadlock" by the most strict definitions, but the result is the same.
java thymeleaf
java thymeleaf
edited Nov 26 '18 at 17:03
Alex R
asked Nov 26 '18 at 15:44
Alex RAlex R
4,1791051103
4,1791051103
Which thymeleaf version are you using? 2.1.6.RELEASE?
– caco3
Nov 26 '18 at 16:58
I'm on 2.1.5.RELEASE
– Alex R
Nov 26 '18 at 17:00
add a comment |
Which thymeleaf version are you using? 2.1.6.RELEASE?
– caco3
Nov 26 '18 at 16:58
I'm on 2.1.5.RELEASE
– Alex R
Nov 26 '18 at 17:00
Which thymeleaf version are you using? 2.1.6.RELEASE?
– caco3
Nov 26 '18 at 16:58
Which thymeleaf version are you using? 2.1.6.RELEASE?
– caco3
Nov 26 '18 at 16:58
I'm on 2.1.5.RELEASE
– Alex R
Nov 26 '18 at 17:00
I'm on 2.1.5.RELEASE
– Alex R
Nov 26 '18 at 17:00
add a comment |
1 Answer
1
active
oldest
votes
The answer, it turns out, is that running out of heap space can cause the above contention.
Further investigation (we didn't have to look very far) revealed that the JVM was running out of heap space due to some overzealous caching in a related application that shares the same JVM.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53484627%2fthymeleaf-application-deadlocked-in-production-stuck-inside-thymeleaf-code%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The answer, it turns out, is that running out of heap space can cause the above contention.
Further investigation (we didn't have to look very far) revealed that the JVM was running out of heap space due to some overzealous caching in a related application that shares the same JVM.
add a comment |
The answer, it turns out, is that running out of heap space can cause the above contention.
Further investigation (we didn't have to look very far) revealed that the JVM was running out of heap space due to some overzealous caching in a related application that shares the same JVM.
add a comment |
The answer, it turns out, is that running out of heap space can cause the above contention.
Further investigation (we didn't have to look very far) revealed that the JVM was running out of heap space due to some overzealous caching in a related application that shares the same JVM.
The answer, it turns out, is that running out of heap space can cause the above contention.
Further investigation (we didn't have to look very far) revealed that the JVM was running out of heap space due to some overzealous caching in a related application that shares the same JVM.
answered Nov 27 '18 at 3:48
Alex RAlex R
4,1791051103
4,1791051103
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53484627%2fthymeleaf-application-deadlocked-in-production-stuck-inside-thymeleaf-code%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Which thymeleaf version are you using? 2.1.6.RELEASE?
– caco3
Nov 26 '18 at 16:58
I'm on 2.1.5.RELEASE
– Alex R
Nov 26 '18 at 17:00