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

update guava version to aviod guava cache pin problem #853

Merged
merged 6 commits into from
Mar 5, 2024

Conversation

g-stream
Copy link
Contributor

@g-stream g-stream commented Mar 5, 2024

Motivation

jdkversion:21
sofa-ark-version:2.2.3

when using virtualthread, i got this pin log:

[2024-03-04T11:01:17.356+0800] Thread[#46141,ForkJoinPool-1-worker-80,5,CarrierThreads]
    java.base/java.lang.VirtualThread$VThreadContinuation.onPinned(VirtualThread.java:201)
    java.base/jdk.internal.vm.Continuation.onPinned0(Continuation.java:393)
    java.base/java.lang.VirtualThread.park(VirtualThread.java:601)
    java.base/java.lang.System$2.parkVirtualThread(System.java:2643)
    java.base/jdk.internal.misc.VirtualThreads.park(VirtualThreads.java:54)
    java.base/java.util.concurrent.locks.LockSupport.park(LockSupport.java:219)
    java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:754)
    java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:990)
    java.base/java.util.concurrent.locks.ReentrantLock$Sync.lock(ReentrantLock.java:153)
    java.base/java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:322)
    com.google.common.cache.LocalCache$Segment.storeLoadedValue(LocalCache.java:3125)
    com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2318)
    com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2279)
    com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155) <== monitors:1
    com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
    com.google.common.cache.LocalCache.get(LocalCache.java:3951)
    com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4848)
    com.alipay.sofa.ark.container.service.classloader.AbstractClasspathClassLoader.loadClassWithCache(AbstractClasspathClassLoader.java:204)
    com.alipay.sofa.ark.container.service.classloader.AbstractClasspathClassLoader.loadClass(AbstractClasspathClassLoader.java:111)
    java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)

 

cause

google/guava#6845

newer guava version(>= 33.0.0) support virtualthread-friendly cache usage.

Modification

update guava version to 33.0.0

Result

aviod virtualthread pin when load class

Copy link

sofastack-cla bot commented Mar 5, 2024

Hi @g-stream, welcome to SOFAStack community, Please sign Contributor License Agreement!

After you signed CLA, we will automatically sync the status of this pull request in 3 minutes.

@sofastack-cla sofastack-cla bot added size/XS and removed size/S labels Mar 5, 2024
Copy link
Collaborator

@lvjing2 lvjing2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.90%. Comparing base (a77b061) to head (a0fa15d).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #853      +/-   ##
============================================
+ Coverage     78.74%   78.90%   +0.16%     
- Complexity      834      835       +1     
============================================
  Files           162      162              
  Lines          6794     6794              
  Branches       1011     1011              
============================================
+ Hits           5350     5361      +11     
+ Misses          921      910      -11     
  Partials        523      523              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lvjing2 lvjing2 merged commit 51ba5e0 into sofastack:master Mar 5, 2024
7 checks passed
lvjing2 pushed a commit that referenced this pull request Mar 7, 2024
* update guava version

* update guava version in container jar

* remove file

---------

Co-authored-by: leo james <leojames.googol@gmail.com>

(cherry picked from commit 51ba5e0)
lvjing2 added a commit that referenced this pull request Mar 12, 2024
* netty support 0.9.x (#843)

* modify test for zip fill to support jdk9+

* fix export import config

* support multi sdk

* format test

* support netty 0.9

(cherry picked from commit 92daff0)

* Update README.md (#846)

(cherry picked from commit 815ea32)

* support multi sdk

(cherry picked from commit 5f7fe98)

* format test

(cherry picked from commit 0f8c409)

* using 0.9 netty

(cherry picked from commit 233f6d7)

* no lib for netty ark plugin

(cherry picked from commit 68c3509)

* set scope = provided for netty

(cherry picked from commit 957f714)

* fix test error "No Ark Container Jar File Found"

(cherry picked from commit e6bfade)

* fix test error (#854)

(cherry picked from commit 917941c)

* fix test error (#855)

* fix test error

* just warn for stop tomcat

* fix test error

(cherry picked from commit c8c384c)

* fix test error (#856)

(cherry picked from commit a77b061)

* update guava version to aviod guava cache pin problem (#853)

* update guava version

* update guava version in container jar

* remove file

---------

Co-authored-by: leo james <leojames.googol@gmail.com>

(cherry picked from commit 51ba5e0)

* update version

* no maven tree when single bundle

---------

Co-authored-by: g-stream <ylchen.changshu@gmail.com>
lvjing2 pushed a commit that referenced this pull request Mar 12, 2024
* update guava version

* update guava version in container jar

* remove file

---------

Co-authored-by: leo james <leojames.googol@gmail.com>

(cherry picked from commit 51ba5e0)
lvjing2 pushed a commit that referenced this pull request Mar 12, 2024
* update guava version

* update guava version in container jar

* remove file

---------

Co-authored-by: leo james <leojames.googol@gmail.com>

(cherry picked from commit 51ba5e0)
lvjing2 added a commit that referenced this pull request Mar 12, 2024
* netty support 0.9.x (#843)

* modify test for zip fill to support jdk9+

* fix export import config

* support multi sdk

* format test

* support netty 0.9

(cherry picked from commit 92daff0)

* Update README.md (#846)

(cherry picked from commit 815ea32)

* support multi sdk

(cherry picked from commit 5f7fe98)

* format test

(cherry picked from commit 0f8c409)

* using 0.9 netty

(cherry picked from commit 233f6d7)

* no lib for netty ark plugin

(cherry picked from commit 68c3509)

* set scope = provided for netty

(cherry picked from commit 957f714)

* fix test error "No Ark Container Jar File Found"

(cherry picked from commit e6bfade)

* fix test error (#854)

(cherry picked from commit 917941c)

* fix test error (#855)

* fix test error

* just warn for stop tomcat

* fix test error

(cherry picked from commit c8c384c)

* fix test error (#856)

(cherry picked from commit a77b061)

* update guava version to aviod guava cache pin problem (#853)

* update guava version

* update guava version in container jar

* remove file

---------

Co-authored-by: leo james <leojames.googol@gmail.com>

(cherry picked from commit 51ba5e0)

* no maven tree when single bundle

* update version

---------

Co-authored-by: g-stream <ylchen.changshu@gmail.com>
lvjing2 added a commit that referenced this pull request Mar 18, 2024
* netty support 0.9.x (#843)

* modify test for zip fill to support jdk9+

* fix export import config

* support multi sdk

* format test

* support netty 0.9

(cherry picked from commit 92daff0)

* Update README.md (#846)

(cherry picked from commit 815ea32)

* support multi sdk

(cherry picked from commit 5f7fe98)

* format test

(cherry picked from commit 0f8c409)

* using 0.9 netty

(cherry picked from commit 233f6d7)

* no lib for netty ark plugin

(cherry picked from commit 68c3509)

* set scope = provided for netty

(cherry picked from commit 957f714)

* fix test error "No Ark Container Jar File Found"

(cherry picked from commit e6bfade)

* fix test error (#854)

(cherry picked from commit 917941c)

* fix test error (#855)

* fix test error

* just warn for stop tomcat

* fix test error

(cherry picked from commit c8c384c)

* fix test error (#856)

(cherry picked from commit a77b061)

* update guava version to aviod guava cache pin problem (#853)

* update guava version

* update guava version in container jar

* remove file

---------

Co-authored-by: leo james <leojames.googol@gmail.com>

(cherry picked from commit 51ba5e0)

* update version

* no maven tree when single bundle

* update version

---------

Co-authored-by: g-stream <ylchen.changshu@gmail.com>
lvjing2 added a commit that referenced this pull request Mar 18, 2024
* netty support 0.9.x (#843)

* modify test for zip fill to support jdk9+

* fix export import config

* support multi sdk

* format test

* support netty 0.9

(cherry picked from commit 92daff0)

* Update README.md (#846)

(cherry picked from commit 815ea32)

* support multi sdk

(cherry picked from commit 5f7fe98)

* format test

(cherry picked from commit 0f8c409)

* using 0.9 netty

(cherry picked from commit 233f6d7)

* no lib for netty ark plugin

(cherry picked from commit 68c3509)

* set scope = provided for netty

(cherry picked from commit 957f714)

* fix test error "No Ark Container Jar File Found"

(cherry picked from commit e6bfade)

* fix test error (#854)

(cherry picked from commit 917941c)

* fix test error (#855)

* fix test error

* just warn for stop tomcat

* fix test error

(cherry picked from commit c8c384c)

* fix test error (#856)

(cherry picked from commit a77b061)

* update guava version to aviod guava cache pin problem (#853)

* update guava version

* update guava version in container jar

* remove file

---------

Co-authored-by: leo james <leojames.googol@gmail.com>

(cherry picked from commit 51ba5e0)

* no maven tree when single bundle

* update version

* update to release

---------

Co-authored-by: g-stream <ylchen.changshu@gmail.com>
lvjing2 added a commit that referenced this pull request Mar 31, 2024
* netty support 0.9.x (#843)

* modify test for zip fill to support jdk9+

* fix export import config

* support multi sdk

* format test

* support netty 0.9

(cherry picked from commit 92daff0)

* Update README.md (#846)

(cherry picked from commit 815ea32)

* support multi sdk

(cherry picked from commit 5f7fe98)

* format test

(cherry picked from commit 0f8c409)

* using 0.9 netty

(cherry picked from commit 233f6d7)

* no lib for netty ark plugin

(cherry picked from commit 68c3509)

* set scope = provided for netty

(cherry picked from commit 957f714)

* fix test error "No Ark Container Jar File Found"

(cherry picked from commit e6bfade)

* fix test error (#854)

(cherry picked from commit 917941c)

* fix test error (#855)

* fix test error

* just warn for stop tomcat

* fix test error

(cherry picked from commit c8c384c)

* fix test error (#856)

(cherry picked from commit a77b061)

* update guava version to aviod guava cache pin problem (#853)

* update guava version

* update guava version in container jar

* remove file

---------

Co-authored-by: leo james <leojames.googol@gmail.com>

(cherry picked from commit 51ba5e0)

* update version

* no maven tree when single bundle

* update version

* Update README.md (#869)

(cherry picked from commit 5971b2a)

* add log for file not found

(cherry picked from commit 0d7ca0c)

* simplify artifact id parser

(cherry picked from commit 1969cdb)

* Update sofa-ark-parent/core-impl/archive/src/test/java/com/alipay/sofa/ark/loader/test/jar/JarUtilsTest.java

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
(cherry picked from commit 8134069)

* fix ark plugin  (#877)

* no export apache for web and netty ark plugin

* no lib in ark plugin

(cherry picked from commit af25776)

* parse artifact id with accuracy first (#878)

* no export apache for web and netty ark plugin

* no lib in ark plugin

* parse artifact id with accuracy first

* fix test error

(cherry picked from commit e6ab184)

* add start class in manifest (#883)

* no export apache for web and netty ark plugin

* no lib in ark plugin

* parse artifact id with accuracy first

* fix test error

* add start class in manifest

* fix test

* remove unused field

(cherry picked from commit e74c7ea)

* <feature> add bizFailedEvent (#881)

* <feature> add bizFailedEvent

* format

* add notes

* rename BizFailedEvent to AfterBizFailedEvent

* refactor

---------

Co-authored-by: leo james <leojames.googol@gmail.com>
(cherry picked from commit 1a30e63)

* add envs for biz starter (#885)

* no export apache for web and netty ark plugin

* no lib in ark plugin

* parse artifact id with accuracy first

* fix test error

* add start class in manifest

* fix test

* remove unused field

* add envs for biz start

(cherry picked from commit 12d4da4)

* add envs for install operation (#887)

* add envs for install operation

* fix format

* fix potential resource leaks when install biz

(cherry picked from commit 24bd60d)

* set args as empty array when args = null for startup (#888)

* add envs for install operation

* fix format

* fix potential resource leaks when install biz

* fix null args throw exception for springboot

(cherry picked from commit e4adbcb)

* add bizStateChangeLog (#889)

* add more info for biz.toString()

* format

* format

* update bizinfo

* format

* rename to bizStateRecord

* format

(cherry picked from commit 6659991)

* 1、增加zookeeper注册节点环境变量,新增配置参数com.alipay.sofa.ark.config.env。默认为sofa-ark (#890)

* 1、增加zookeeper注册节点环境变量,新增配置参数com.alipay.sofa.ark.config.env。默认为sofa-ark
2、升级curator版本,重构NodeCache已过时

* 1、增加zookeeper注册节点环境变量,新增配置参数com.alipay.sofa.ark.config.env。默认为sofa-ark
2、升级curator版本,重构NodeCache已过时

---------

Co-authored-by: leo james <leojames.googol@gmail.com>
(cherry picked from commit 5395cbf)

* fix no ark log in ark container (#891)

* update logback in ark container

* fix ark container log

(cherry picked from commit 75fa690)

* update biz state record name (#892)

* update logback in ark container

* fix ark container log

* modify biz state record name

(cherry picked from commit 6412923)

* rename typo (#893)

* update logback in ark container

* fix ark container log

* modify biz state record name

* format code

(cherry picked from commit 6602b96)

* update version

* code format

* remove springboot 1.x 2.x adapter

---------

Co-authored-by: g-stream <ylchen.changshu@gmail.com>
Co-authored-by: Lipeng <44571204+gaosaroma@users.noreply.github.com>
Co-authored-by: hadoop835 <chenjian835@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants