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

增强bootstrap类AbstractPlainSocketImpl#connectToAddress出现NPE #189

Closed
zhaoyb1990 opened this issue Jun 26, 2019 · 2 comments
Closed
Assignees
Labels

Comments

@zhaoyb1990
Copy link
Contributor

增强bootstrap类AbstractPlainSocketImpl#connectToAddress出现NPE

2019-06-26 13:27:26 default WARN  transform java/net/AbstractPlainSocketImpl failed, by module=xxxx in loader=null
java.lang.NullPointerException: null
	at com.alibaba.jvm.sandbox.core.util.AsmUtils.getCommonSuperClassImplByAsm(AsmUtils.java:30)
	at com.alibaba.jvm.sandbox.core.util.AsmUtils.getCommonSuperClass(AsmUtils.java:23)
	at com.alibaba.jvm.sandbox.core.enhance.EventEnhancer$1.getCommonSuperClass(EventEnhancer.java:52)
	at org.objectweb.asm.SymbolTable.addMergedType(SymbolTable.java:1198)
	at org.objectweb.asm.Frame.merge(Frame.java:1294)
	at org.objectweb.asm.Frame.merge(Frame.java:1175)
	at org.objectweb.asm.MethodWriter.computeAllFrames(MethodWriter.java:1617)
	at org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1553)
	at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2426)
	at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1275)
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:679)
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:391)
	at com.alibaba.jvm.sandbox.core.enhance.EventEnhancer.toByteCodeArray(EventEnhancer.java:100)
	at com.alibaba.jvm.sandbox.core.manager.impl.SandboxClassFileTransformer._transform(SandboxClassFileTransformer.java:135)
	at com.alibaba.jvm.sandbox.core.manager.impl.SandboxClassFileTransformer.transform(SandboxClassFileTransformer.java:92)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
	at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144)
	at com.alibaba.jvm.sandbox.core.manager.impl.DefaultModuleEventWatcher.reTransformClasses(DefaultModuleEventWatcher.java:119)
	at com.alibaba.jvm.sandbox.core.manager.impl.DefaultModuleEventWatcher.watch(DefaultModuleEventWatcher.java:200)
	at com.alibaba.jvm.sandbox.core.manager.impl.DefaultModuleEventWatcher.watch(DefaultModuleEventWatcher.java:166)
	at com.alibaba.jvm.sandbox.api.listener.ext.EventWatchBuilder.build(EventWatchBuilder.java:764)
	at com.alibaba.jvm.sandbox.api.listener.ext.EventWatchBuilder.access$400(EventWatchBuilder.java:35)
	at com.alibaba.jvm.sandbox.api.listener.ext.EventWatchBuilder$BuildingForBehavior.onWatch(EventWatchBuilder.java:633)
	at com.taobao.iastmodule.core.MockCoreModule.loadCompleted(MockCoreModule.java:121)
	at com.alibaba.jvm.sandbox.core.manager.impl.DefaultCoreModuleManager.callAndFireModuleLifeCycle(DefaultCoreModuleManager.java:135)
	at com.alibaba.jvm.sandbox.core.manager.impl.DefaultCoreModuleManager.load(DefaultCoreModuleManager.java:189)
	at com.alibaba.jvm.sandbox.core.manager.impl.DefaultCoreModuleManager.access$300(DefaultCoreModuleManager.java:36)
	at com.alibaba.jvm.sandbox.core.manager.impl.DefaultCoreModuleManager$InnerModuleLoadCallback.onLoad(DefaultCoreModuleManager.java:563)
	at com.alibaba.jvm.sandbox.core.manager.impl.ModuleJarLoader.loadingModules(ModuleJarLoader.java:100)
	at com.alibaba.jvm.sandbox.core.manager.impl.ModuleJarLoader.load(ModuleJarLoader.java:163)
	at com.alibaba.jvm.sandbox.core.manager.impl.ModuleLibLoader.load(ModuleLibLoader.java:79)
	at com.alibaba.jvm.sandbox.core.manager.impl.DefaultCoreModuleManager.forceFlush(DefaultCoreModuleManager.java:765)
	at com.alibaba.jvm.sandbox.core.manager.impl.DefaultCoreModuleManager.flush(DefaultCoreModuleManager.java:570)
	at com.alibaba.jvm.sandbox.core.manager.impl.DefaultModuleManager.flush(DefaultModuleManager.java:27)
	at com.alibaba.jvm.sandbox.module.mgr.ModuleMgrModule.flush(ModuleMgrModule.java:112)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.alibaba.jvm.sandbox.core.server.jetty.servlet.ModuleHttpServlet.doMethod(ModuleHttpServlet.java:119)
	at com.alibaba.jvm.sandbox.core.server.jetty.servlet.ModuleHttpServlet.doGet(ModuleHttpServlet.java:46)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:594)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
	at org.eclipse.jetty.server.Server.handle(Server.java:351)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
	at java.lang.Thread.run(Thread.java:852)

问题定位(boostrap类classloader是null)导致npe

java:net:AbstractPlainSocketImpl

ASMUtils-NPE

@z529192557
Copy link
Collaborator

fix in #170

@oldmanpushcart
Copy link
Collaborator

1.2.2版本发布解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants