ice
ice copied to clipboard
Implement Adapter.MaxConnections in C++ and Java
This PR implements MaxConnections in the remaining languages (C++ and Java).
Looks like the tests are failing though:
- Ice/maxConnections
[ running client/server test - 08/27/24 21:47:09 ]
- Config: ws,compress,ipv6,serialize,mx
(/Users/runner/work/ice/ice/cpp/test/Ice/maxConnections/build/macosx/shared/server --Ice.Default.Host=::1 --Test.BasePort=14200 --Ice.Warn.Connections=1 --Ice.Default.Protocol=ws --Ice.Override.Compress=1 --Ice.ThreadPool.Server.Serialize=1 --Ice.IPv6=1 --Ice.PreferIPv6Address=1 --Ice.Admin.Endpoints="tcp -h \"::1\"" --Ice.Admin.InstanceName=Server --IceMX.Metrics.Debug.GroupBy=id --IceMX.Metrics.Parent.GroupBy=parent --IceMX.Metrics.All.GroupBy=none --Ice.PrintStackTraces=1 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1)
(/Users/runner/work/ice/ice/cpp/test/Ice/maxConnections/build/macosx/shared/client --Ice.Default.Host=::1 --Test.BasePort=14200 --Ice.Warn.Connections=1 --Ice.Default.Protocol=ws --Ice.Override.Compress=1 --Ice.ThreadPool.Server.Serialize=1 --Ice.IPv6=1 --Ice.PreferIPv6Address=1 --Ice.Admin.Endpoints="tcp -h \"::1\"" --Ice.Admin.InstanceName=Client --IceMX.Metrics.Debug.GroupBy=id --IceMX.Metrics.Parent.GroupBy=parent --IceMX.Metrics.All.GroupBy=none --Ice.PrintStackTraces=1)
[...]
process.waitSuccess(exitstatus=exitstatus, timeout=30)
File "/Users/runner/work/ice/ice/scripts/Expect.py", line 691, in waitSuccess
self.testExitStatus(exitstatus)
File "/Users/runner/work/ice/ice/scripts/Expect.py", line 735, in testExitStatus
test(self.exitstatus, exitstatus)
File "/Users/runner/work/ice/ice/scripts/Expect.py", line 717, in test
raise RuntimeError(
RuntimeError: unexpected exit status: expected: 0, got 1
Seems like it's only the C++ side when using ws,compress,ipv6,serialize,mx on MacOS...
*** [188/334] Running cpp/Ice/maxConnections tests ***
[ running client/server test - 08/27/24 21:47:07 ]
- Config: ssl
(/Users/runner/work/ice/ice/cpp/test/Ice/maxConnections/build/macosx/shared/server --Ice.Default.Host=127.0.0.1 --Test.BasePort=14200 --Ice.Warn.Connections=1 --Ice.Default.Protocol=ssl --Ice.IPv6=0 --IceSSL.*** --IceSSL.DefaultDir=/Users/runner/work/ice/ice/certs --IceSSL.CAs=cacert.pem --IceSSL.CertFile=server.p12 --IceSSL.KeychainPassword=password --IceSSL.Keychain=server.keychain --Ice.PrintStackTraces=1 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1)
(/Users/runner/work/ice/ice/cpp/test/Ice/maxConnections/build/macosx/shared/client --Ice.Default.Host=127.0.0.1 --Test.BasePort=14200 --Ice.Warn.Connections=1 --Ice.Default.Protocol=ssl --Ice.IPv6=0 --IceSSL.*** --IceSSL.DefaultDir=/Users/runner/work/ice/ice/certs --IceSSL.CAs=cacert.pem --IceSSL.CertFile=client.p12 --IceSSL.KeychainPassword=password --IceSSL.Keychain=client.keychain --Ice.PrintStackTraces=1)
testing the creation of 100 connections... ok
testing the creation of 10 connections with connection lost at 11... ok
testing the creation of 10 connections with connection lost at 11 then recovery... ok
[ running client/server test - 08/27/24 21:47:09 ]
- Config: ws,compress,ipv6,serialize,mx
(/Users/runner/work/ice/ice/cpp/test/Ice/maxConnections/build/macosx/shared/server --Ice.Default.Host=::1 --Test.BasePort=14200 --Ice.Warn.Connections=1 --Ice.Default.Protocol=ws --Ice.Override.Compress=1 --Ice.ThreadPool.Server.Serialize=1 --Ice.IPv6=1 --Ice.PreferIPv6Address=1 --Ice.Admin.Endpoints="tcp -h \"::1\"" --Ice.Admin.InstanceName=Server --IceMX.Metrics.Debug.GroupBy=id --IceMX.Metrics.Parent.GroupBy=parent --IceMX.Metrics.All.GroupBy=none --Ice.PrintStackTraces=1 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1)
(/Users/runner/work/ice/ice/cpp/test/Ice/maxConnections/build/macosx/shared/client --Ice.Default.Host=::1 --Test.BasePort=14200 --Ice.Warn.Connections=1 --Ice.Default.Protocol=ws --Ice.Override.Compress=1 --Ice.ThreadPool.Server.Serialize=1 --Ice.IPv6=1 --Ice.PreferIPv6Address=1 --Ice.Admin.Endpoints="tcp -h \"::1\"" --Ice.Admin.InstanceName=Client --IceMX.Metrics.Debug.GroupBy=id --IceMX.Metrics.Parent.GroupBy=parent --IceMX.Metrics.All.GroupBy=none --Ice.PrintStackTraces=1)
testing the creation of 100 connections... ok
testing the creation of 10 connections with connection lost at 11... ok
testing the creation of 10 connections with connection lost at 11 then recovery... error: src/Ice/StreamSocket.cpp:230 ::Ice::ConnectionLostException connection lost: recv() returned zero
stack trace:
0 Ice::Exception::Exception(char const*, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) in libIce.38a0.dylib
1 Ice::SyscallException::SyscallException(char const*, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, int, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> (int)>) in libIce.38a0.dylib
2 Ice::ConnectionLostException::ConnectionLostException(char const*, int, int) in libIce.38a0.dylib
3 IceInternal::StreamSocket::read(char*, unsigned long) in libIce.38a0.dylib
4 IceInternal::StreamSocket::read(IceInternal::Buffer&) in libIce.38a0.dylib
5 IceInternal::WSTransceiver::initialize(IceInternal::Buffer&, IceInternal::Buffer&) in libIce.38a0.dylib
6 IceInternal::IdleTimeoutTransceiverDecorator::initialize(IceInternal::Buffer&, IceInternal::Buffer&) in libIce.38a0.dylib
7 Ice::ConnectionI::initialize(IceInternal::SocketOperation) in libIce.38a0.dylib
8 Ice::ConnectionI::message(IceInternal::ThreadPoolCurrent&) in libIce.38a0.dylib
9 IceInternal::ThreadPool::run(std::__1::shared_ptr<IceInternal::ThreadPool::EventHandlerThread> const&) in libIce.38a0.dylib
10 IceInternal::ThreadPool::EventHandlerThread::run() in libIce.38a0.dylib
11 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (IceInternal::ThreadPool::EventHandlerThread::*)(), IceInternal::ThreadPool::EventHandlerThread*>>(void*) in libIce.38a0.dylib
12 _pthread_start in libsystem_pthread.dylib
13 thread_start in libsystem_pthread.dylib
test in Ice/maxConnections failed
Seems like it's only the C++ side when using
ws,compress,ipv6,serialize,mxon MacOS...
This was due to a bug in the test: I forgot to wait for the connection close to complete in the client. See also #2701.