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

MaxConnection tests Android failure #3300

Open
pepone opened this issue Dec 22, 2024 · 2 comments
Open

MaxConnection tests Android failure #3300

pepone opened this issue Dec 22, 2024 · 2 comments
Milestone

Comments

@pepone
Copy link
Member

pepone commented Dec 22, 2024

*** [22/40] Running java/Ice/maxConnections tests ***
[ running client/server test - 12/22/24 19:03:41 ]
- Config: android,Debug,x64
testing the creation of 100 connections... com.zeroc.Ice.CloseTimeoutException: Close timed out.
        at com.zeroc.Ice.QueueExecutorService.execute(QueueExecutorService.java:64)
        at com.zeroc.Ice.QueueExecutorService.executeNoThrow(QueueExecutorService.java:28)
        at com.zeroc.Ice.ConnectionI.close(ConnectionI.java:159)
        at test.Ice.maxConnections.AllTests.testCreateConnections(AllTests.java:57)
        at test.Ice.maxConnections.AllTests.allTests(AllTests.java:35)
        at test.Ice.maxConnections.Client.run(Client.java:15)
        at com.zeroc.testcontroller.ControllerApp$ControllerHelperI.run(ControllerApp.java:328)
@pepone pepone added this to the 3.8.0 milestone Dec 22, 2024
@pepone
Copy link
Member Author

pepone commented Dec 23, 2024

The queue executor thread is paused in ConnectionI.closeImpl

wait:-1, Object (java.lang)
wait:386, Object (java.lang)
wait:524, Object (java.lang)
closeImpl:193, ConnectionI (com.zeroc.Ice)
-$$Nest$mcloseImpl:-1, ConnectionI (com.zeroc.Ice)
call:163, ConnectionI$2 (com.zeroc.Ice)
call:160, ConnectionI$2 (com.zeroc.Ice)
run:264, FutureTask (java.util.concurrent)
runWorker:1145, ThreadPoolExecutor (java.util.concurrent)
run:644, ThreadPoolExecutor$Worker (java.util.concurrent)
run:1012, Thread (java.lang)

And we have ConnectionI.finished is waiting to execute finish on the executor.

park:-1, Unsafe (jdk.internal.misc)
park:211, LockSupport (java.util.concurrent.locks)
awaitDone:447, FutureTask (java.util.concurrent)
get:190, FutureTask (java.util.concurrent)
execute:54, QueueExecutorService (com.zeroc.Ice)
executeNoThrow:28, QueueExecutorService (com.zeroc.Ice)
finished:939, ConnectionI (com.zeroc.Ice)
execute:29, ThreadPool$FinishedWorkItem (com.zeroc.Ice)
message:56, ThreadPoolWorkQueue (com.zeroc.Ice)
run:352, ThreadPool (com.zeroc.Ice)
-$$Nest$mrun:-1, ThreadPool (com.zeroc.Ice)
run:662, ThreadPool$EventHandlerThread (com.zeroc.Ice)
run:1012, Thread (java.lang)

This executor has a single thread, so threads get starved and eventually close times out.

@pepone
Copy link
Member Author

pepone commented Dec 23, 2024

Increasing the executor thread pool size fixes the test. Not clear why we have a single thread executor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant