sofastack / sofa-ark

SOFAArk is a light-weight,java based classloader isolation framework.
https://www.sofastack.tech/projects/sofa-boot/sofa-ark-readme/
Apache License 2.0
1.56k stars 497 forks source link

biz被卸载时bizclassloader类加载行为被改变 #796

Open yuanyuancin opened 9 months ago

yuanyuancin commented 9 months ago

原因

  1. 缓存被清理com.alipay.sofa.ark.container.service.classloader.AbstractClasspathClassLoader#classCache
  2. hook失效 com.alipay.sofa.ark.container.service.classloader.BizClassLoader#postLoadClass image

可能存在的问题 在中间件兼容性不够完善等特殊场景中,模块被卸载后仍旧有很大可能会存在bizclassloader.loadclass()的行为,如果打破了该行为会导致不预期的ClassNotFoundException或NoClassDefFoundError

jdk规范中classloader close后,通常会禁止新class define,但是仍旧会允许get loaded class

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions.

github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions.

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions.

github-actions[bot] commented 6 months ago

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue or help wanted. Thank you for your contributions.