Description
I have the same issue as reported in VELOCITY-562, velocity hangs in method Parser.jj_scan_token(). I can reproduce it by running heavy load on my application for a few hours.
Currently running 1.6.3, I looked at the issues fixed in 1.6.4, VELOCITY-718 seems not related, but I will now upgrade to 1.6.4 and see if the same happens again.
The application is using velocity in up to 3 threads simultaneously, nothing is shared between threads, relevant stack traces from a thread dump are as follows, one thread is currently not inside velocity at all:
"1334671070@qtp-2060763463-85" prio=6 tid=0x00000000181c5800 nid=0x6004 runnable [0x00000000110dd000]
java.lang.Thread.State: RUNNABLE
at org.apache.velocity.runtime.parser.Parser.jj_scan_token(Parser.java:3340)
at org.apache.velocity.runtime.parser.Parser.jj_3R_56(Parser.java:2768)
at org.apache.velocity.runtime.parser.Parser.jj_3R_29(Parser.java:3000)
at org.apache.velocity.runtime.parser.Parser.jj_3_8(Parser.java:2834)
at org.apache.velocity.runtime.parser.Parser.jj_3_7(Parser.java:2878)
at org.apache.velocity.runtime.parser.Parser.jj_2_7(Parser.java:2560)
at org.apache.velocity.runtime.parser.Parser.Reference(Parser.java:1317)
at org.apache.velocity.runtime.parser.Parser.Statement(Parser.java:354)
at org.apache.velocity.runtime.parser.Parser.IfStatement(Parser.java:1530)
at org.apache.velocity.runtime.parser.Parser.Statement(Parser.java:346)
at org.apache.velocity.runtime.parser.Parser.Directive(Parser.java:888)
at org.apache.velocity.runtime.parser.Parser.Statement(Parser.java:373)
at org.apache.velocity.runtime.parser.Parser.process(Parser.java:311)
at org.apache.velocity.runtime.parser.Parser.parse(Parser.java:105)
at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1131)
at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1086)
at org.apache.velocity.Template.process(Template.java:124)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:446)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354)
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
at org.apache.velocity.runtime.directive.Parse.render(Parse.java:198)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at org.apache.velocity.Template.merge(Template.java:328)
at org.apache.velocity.Template.merge(Template.java:235)
"1946923020@qtp-2060763463-4" prio=6 tid=0x000000000c6dc000 nid=0x48a4 runnable [0x0000000013bcd000]
java.lang.Thread.State: RUNNABLE
at org.apache.velocity.runtime.parser.Parser.jj_scan_token(Parser.java:3340)
at org.apache.velocity.runtime.parser.Parser.jj_3R_56(Parser.java:2768)
at org.apache.velocity.runtime.parser.Parser.jj_3R_29(Parser.java:3000)
at org.apache.velocity.runtime.parser.Parser.jj_3_8(Parser.java:2834)
at org.apache.velocity.runtime.parser.Parser.jj_3_7(Parser.java:2878)
at org.apache.velocity.runtime.parser.Parser.jj_2_7(Parser.java:2560)
at org.apache.velocity.runtime.parser.Parser.Reference(Parser.java:1317)
at org.apache.velocity.runtime.parser.Parser.Statement(Parser.java:354)
at org.apache.velocity.runtime.parser.Parser.Directive(Parser.java:888)
at org.apache.velocity.runtime.parser.Parser.Statement(Parser.java:373)
at org.apache.velocity.runtime.parser.Parser.process(Parser.java:311)
at org.apache.velocity.runtime.parser.Parser.parse(Parser.java:105)
at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1131)
at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1086)
at org.apache.velocity.Template.process(Template.java:124)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:446)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354)
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1380)
at org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro(VelocimacroFactory.java:202)
- locked <0x00000000cd74bae8> (a org.apache.velocity.runtime.VelocimacroFactory)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:261) - locked <0x00000000cd950eb8> (a org.apache.velocity.runtime.RuntimeInstance)
at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107)
Attachments
Issue Links
- relates to
-
VELOCITY-812 Parser.jj_scan_token very slow during debugging
- Closed