Thread waits forever after hitting LocalCache$Segment.waitForLoadingValue

118 views
Skip to first unread message

Miroslav Smiljanic

unread,
Mar 20, 2024, 9:23:53 AMMar 20
to guava-discuss
Hi All,

In the Apache Jackrabbit Oak project [0], we use the guava cache; sometimes, the thread loading value from the cache waits forever [1].

guava version: 32.1.2-jre

In GitHub, I can find a number of related issues [2], and I also see that one of the last changes got reverted [3].

Is this still an unsolved problem? 

I see https://github.com/google/guava/issues/5439 is still open.

Regards,
Miroslav 

[0]
https://jackrabbit.apache.org/oak/docs/

[1]

   java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java...@11.0.15/Native Method)
- parking to wait for  <0x000000039a43bfc0> (a org.apache.jackrabbit.guava.common.util.concurrent.SettableFuture)
at java.util.concurrent.locks.LockSupport.park(java...@11.0.15/LockSupport.java:194)
at org.apache.jackrabbit.guava.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:561)
at org.apache.jackrabbit.guava.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:111)
at org.apache.jackrabbit.guava.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:247)
at org.apache.jackrabbit.guava.common.cache.LocalCache$LoadingValueReference.waitForValue(LocalCache.java:3621)
at org.apache.jackrabbit.guava.common.cache.LocalCache$Segment.waitForLoadingValue(LocalCache.java:2210)
at org.apache.jackrabbit.guava.common.cache.LocalCache$Segment.get(LocalCache.java:2074)
at org.apache.jackrabbit.guava.common.cache.LocalCache.get(LocalCache.java:4012)
at org.apache.jackrabbit.guava.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4922)
at org.apache.jackrabbit.oak.segment.SegmentCache$NonEmptyCache.getSegment(SegmentCache.java:160)
at org.apache.jackrabbit.oak.segment.file.FileStore.readSegment(FileStore.java:507)

[2]

https://github.com/google/guava/issues/2774

https://github.com/google/guava/issues/5439

https://github.com/ben-manes/caffeine/issues/771


[3]
https://github.com/google/guava/pull/6972


Ben Manes

unread,
Mar 20, 2024, 11:01:28 AMMar 20
to guava-discuss
Sounds like https://github.com/google/guava/issues/2774 which is due to https://bugs.openjdk.org/browse/JDK-8318888. A stack overflow may corrupt the system and should be avoided.
Reply all
Reply to author
Forward
0 new messages