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

Cannot return wrapped ByteBuffer, BufferLease phaser was already terminated #12

Closed
StrongestNumber9 opened this issue Oct 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@StrongestNumber9
Copy link
Contributor

Describe the bug

Closed already by: java.lang.Exception: Closed now
java.lang.Exception: Closed now
        at com.teragrep.net_01.channel.buffer.BufferLeaseImpl$ClearingPhaser.onAdvance(BufferLeaseImpl.java:136)
        at java.base/java.util.concurrent.Phaser.doArrive(Phaser.java:395)
        at java.base/java.util.concurrent.Phaser.arriveAndDeregister(Phaser.java:650)
        at com.teragrep.net_01.channel.buffer.BufferLeaseImpl.removeRef(BufferLeaseImpl.java:107)
        at com.teragrep.rlp_03.frame.RelpFrameLeaseful.close(RelpFrameLeaseful.java:109)
        at com.teragrep.rlp_03.frame.RelpFrameAccess.close(RelpFrameAccess.java:115)
        at com.teragrep.cfe_35.router.MessageParser.lambda$accept$2(MessageParser.java:193)
        at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787)
        at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
        at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2179)
        at com.teragrep.rlp_03.client.TransactionService.complete(TransactionService.java:125)
        at com.teragrep.rlp_03.client.RelpClientDelegate.accept(RelpClientDelegate.java:81)
        at com.teragrep.rlp_03.frame.FrameDelegationClock.delegateFrame(FrameDelegationClock.java:114)
        at com.teragrep.rlp_03.frame.FrameDelegationClock.advance(FrameDelegationClock.java:93)
        at com.teragrep.net_01.channel.context.IngressImpl.run(IngressImpl.java:120)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.lang.Thread.run(Thread.java:1583)
<<<
14.10.2024 14:42:32.189 [ERROR] [com.teragrep.net_01.channel.context.IngressImpl] [pool-2-thread-3] run() threw java.lang.IllegalStateException: Cannot return wrapped ByteBuffer, BufferLease phaser was already terminated!
        at com.teragrep.net_01.channel.buffer.BufferLeaseImpl.buffer(BufferLeaseImpl.java:88)
        at com.teragrep.rlp_03.frame.FrameClockLeaseful.submit(FrameClockLeaseful.java:67)
        at com.teragrep.rlp_03.frame.FrameDelegationClock.advance(FrameDelegationClock.java:76)
        at com.teragrep.net_01.channel.context.IngressImpl.run(IngressImpl.java:120)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.lang.Thread.run(Thread.java:1583)

Prints are additions to net_01 and rlp_03 built on top of that, newest versions at time of writing

Expected behavior

Everything works

How to reproduce

kortemik/cfe-35 branch to-9

Run cfe_35
java -Dlog4j2.configurationFile=file:src/test/resources/log4j2.xml -DserverThreads=8 -Dcfe07LookupPath=src/test/resources/cfe_07 -Dcfe16LookupPath=src/test/resources/cfe_16 -Dkin02LookupPath=src/test/resources/kin_02 -DroutingTargetsConfig=src/test/resources/targets.json -DlistenPort=4600 -jar target/cfe_35.jar

Run rlp_10
java -Dtarget=127.0.0.1 -Dport=4600 -jar target/rlp_10-0.0.1-SNAPSHOT-jar-with-dependencies.jar

Let run until fails

Screenshots

Software version

cfe_35 3.0.0
rlp_03 8.0.1 custom built with net_01 changes
net_01 1.1.0 + extra debug printing

Desktop (please complete the following information if relevant):

  • OS:
  • Browser:
  • Version:

Additional context

@StrongestNumber9 StrongestNumber9 added the bug Something isn't working label Oct 14, 2024
@StrongestNumber9
Copy link
Contributor Author

Nevermind #10 was already open for this exact issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants