ha9u63a7
ha9u63a7

Reputation: 6824

Java Thread Dump - Negative Line Numbers

I was just trying to understand some blocked items from a thread dump:

"Thread-65" : 151 : RUNNABLE : cpu=36796875000 : cpuLoad= 0.29151857
BlockedCount:94117 BlockedTime:-1 LockName:null LockOwnerID:-1 LockOwnerName:null
WaitedCount:16 WaitedTime:-1 InNative:false IsSuspended:false   at java.util.zip.ZipFile.open(ZipFile.java:-2)
    at java.util.zip.ZipFile.(ZipFile.java:219)
    at java.util.zip.ZipFile.(ZipFile.java:149)
    at java.util.jar.JarFile.(JarFile.java:166)
    at java.util.jar.JarFile.(JarFile.java:130)
    at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:188)
    at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:173)
    at org.apache.catalina.webresources.AbstractArchiveResourceSet.openJarFile(AbstractArchiveResourceSet.java:316)
    at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:96)
    at org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:265)
    at org.apache.catalina.webresources.StandardRoot.getResourceInternal(StandardRoot.java:281)
    at org.apache.catalina.webresources.CachedResource.validateResource(CachedResource.java:97)
    at org.apache.catalina.webresources.Cache.getResource(Cache.java:69)
    at org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:216)
    at org.apache.catalina.webresources.StandardRoot.getClassLoaderResource(StandardRoot.java:225)
    at org.apache.catalina.loader.WebappClassLoaderBase.getResourceAsStream(WebappClassLoaderBase.java:1067)
    at java.lang.Class.getResourceAsStream(Class.java:2223)
    at bsh.BshClassManager.getResourceAsStream(null:-1)
    at bsh.classpath.ClassManagerImpl.getResourceAsStream(null:-1)
    at bsh.BshClassManager.loadSourceClass(null:-1)
    at bsh.classpath.ClassManagerImpl.classForName(null:-1)
    at bsh.NameSpace.classForName(null:-1)
    at bsh.NameSpace.getImportedClassImpl(null:-1)
    at bsh.NameSpace.getClassImpl(null:-1)
    at bsh.NameSpace.getClass(null:-1)
    at bsh.Name.consumeNextObjectField(null:-1)
    at bsh.Name.toObject(null:-1)
    at bsh.Name.toObject(null:-1)
    at bsh.NameSpace.get(null:-1)
    at bsh.Interpreter.get(null:-1)
    at bsh.Interpreter.getu(null:-1)
    at bsh.Interpreter.(null:-1)
    at bsh.Interpreter.(null:-1)
    at bsh.Interpreter.(null:-1)

What I a not getting is the negative line number. Does it mean that that the source cannot be found?

Upvotes: 0

Views: 199

Answers (1)

Bill K
Bill K

Reputation: 62789

Those are all beanshell classes. I'm guessing they do that to keep it from being confusing.

I'm guessing that they are using this as a "Trick" to remove those lines in some conditions (such as when you are running in the beanshell repl).

You could use that same trick to remove those lines from your dump.

This possibly related question How to get the complete log for bean shell scripts in jmeter

Suggested adding the debug() directive to beanshell get a less limited stack trace--perhaps if you did that then it would fill in those bsh stack lines?

Upvotes: 0

Related Questions