zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2.04k stars 593 forks source link

Ice/operations cpp-java cross-test failure (CI, ubuntu) #2569

Closed bernardnormier closed 1 week ago

bernardnormier commented 3 months ago

From https://github.com/zeroc-ice/ice/actions/runs/10083898519/job/27881520439?pr=2565:

[ running client/server test - 07/24/24 21:42:10 ]
- Config: tcp
- Mappings: cpp,java
(/opt/hostedtoolcache/Java_Oracle_jdk/17/x64/bin/java -ea -Djdk.net.URLClassPath.disableClassPathURLCheck=true -Dtest.class=test.Ice.operations.Server test.TestDriver --Ice.Default.Host=127.0.0.1 --Test.BasePort=14000 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1 env={'CLASSPATH': '/home/runner/work/ice/ice/java/lib/test.jar'})
(/home/runner/work/ice/ice/cpp/test/Ice/operations/build/x86_64-linux-gnu/shared/client --Ice.Default.Host=127.0.0.1 --Test.BasePort=14000 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 --Ice.PrintStackTraces=1 env={'LD_LIBRARY_PATH': '/home/runner/work/ice/ice/cpp/lib/x86_64-linux-gnu'})
testing twoway operations... ok
testing oneway operations... ok
testing twoway operations with AMI... ok
testing oneway operations with AMI... ok
testing batch oneway operations... ok
testing batch AMI oneway operations... ok
error: src/Ice/ConnectionI.cpp:2249 ::Ice::ConnectionAbortedException connection aborted by the idle check because it did not receive any bytes for 60s
stack trace:
  0 Ice::Exception::Exception(char const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) in /home/runner/work/ice/ice/cpp/test/Ice/operations/build/x86_64-linux-gnu/shared/../../../../../../lib/x86_64-linux-gnu/libIce.so.38a0
  1 /home/runner/work/ice/ice/cpp/test/Ice/operations/build/x86_64-linux-gnu/shared/../../../../../../lib/x86_64-linux-gnu/libIce.so.38a0(+0x12ca68) [0x7fccd592ca68]
  2 /home/runner/work/ice/ice/cpp/test/Ice/operations/build/x86_64-linux-gnu/shared/../../../../../../lib/x86_64-linux-gnu/libIce.so.38a0(+0x159310) [0x7fccd5959310]
  3 /home/runner/work/ice/ice/cpp/test/Ice/operations/build/x86_64-linux-gnu/shared/../../../../../../lib/x86_64-linux-gnu/libIce.so.38a0(+0x16b0cc) [0x7fccd596b0cc]
  4 Ice::Timer::run() in /home/runner/work/ice/ice/cpp/test/Ice/operations/build/x86_64-linux-gnu/shared/../../../../../../lib/x86_64-linux-gnu/libIce.so.38a0
  5 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xeabb4) [0x7fccd54eabb4]
  6 /lib/x86_64-linux-gnu/libc.so.6(+0x9ca94) [0x7fccd509ca94]
  7 /lib/x86_64-linux-gnu/libc.so.6(+0x129c3c) [0x7fccd5129c3c]
bernardnormier commented 3 months ago

Side issue: why do we pass --Ice.PrintStackTraces=1 to this test?

bernardnormier commented 1 month ago

The client code is not a plain shutdown, but a shutdown followed by an opAvoid call (that we expect to fail): https://github.com/zeroc-ice/ice/blob/d0674bc8c16f1ea1f394079575b6c191acdf52a6/cpp/test/Ice/operations/Client.cpp#L35

It's not clear if the "idle timeout" occurs in opVoid or shutdown. The test doesn't print "testing server shutdown..." which suggests shutdown. Doesn't seem likely though: the shutdown would/should timeout after 10 seconds, not idle timeout after 60s.

bernardnormier commented 1 month ago

We should also double-check and add a better comment for: https://github.com/zeroc-ice/ice/blob/d0674bc8c16f1ea1f394079575b6c191acdf52a6/cpp/test/Ice/operations/Client.cpp#L39

bernardnormier commented 1 week ago

Fixed by #2961.