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

Scala Native WeakConcurrentBag NPE when forking 10K fibers #9681

Open
hearnadam opened this issue Mar 10, 2025 · 0 comments
Open

Scala Native WeakConcurrentBag NPE when forking 10K fibers #9681

hearnadam opened this issue Mar 10, 2025 · 0 comments
Labels
bug Something isn't working scala-native

Comments

@hearnadam
Copy link
Collaborator

[info]   - PromiseSpec - waiter stack safety
[info]     Exception in thread "zio-fiber-931" java.lang.NullPointerException: null
[info]     	at scala.scalanative.runtime.package$.throwNullPointer(Unknown Source)
[info]     	at <none>.(Unknown Source)
[info]     	at java.util.concurrent.ConcurrentHashMap.treeifyBin(Unknown Source)
[info]     	at java.util.concurrent.ConcurrentHashMap.putVal(Unknown Source)
[info]     	at java.util.concurrent.ConcurrentHashMap$KeySetView.add(Unknown Source)
[info]     	at zio.internal.WeakConcurrentBag.addToLongTermStorage(Unknown Source)
[info]     	at zio.internal.WeakConcurrentBag.add(Unknown Source)
[info]     	at zio.internal.FiberScope$global$.add(Unknown Source)
[info]     	at zio.ZIO$unsafe$.makeChildFiber(Unknown Source)
[info]     	at zio.ZIO$unsafe$.fork(Unknown Source)
[info]     	at zio.ZIO.$anonfun$forkWithScopeOverride$2(Unknown Source)
[info]     	at zio.ZIO$$Lambda$280.apply(Unknown Source)
[info]     	at zio.PromiseSpec.spec(PromiseSpec.scala:127)
[info]     	at zio.PromiseSpec.spec(PromiseSpec.scala:124)

I introduced a new test in #9569 which resulted in this strange failure on Native.

@hearnadam hearnadam added bug Something isn't working scala-native labels Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scala-native
Projects
None yet
Development

No branches or pull requests

1 participant