Skip to content

Instantly share code, notes, and snippets.

@v-bus
Created September 2, 2020 12:34
Show Gist options
  • Save v-bus/f41e39780039a112beecd0bb9f70e1af to your computer and use it in GitHub Desktop.
Save v-bus/f41e39780039a112beecd0bb9f70e1af to your computer and use it in GitHub Desktop.
$ docker build --pull --rm -f "supplemental/docker/ubuntu18build/Dockerfile" -t nanoservices:latest -t nanoservices:v0.1.1 "supplemental/docker/ubuntu18build"`
Step 8/8 : RUN cd ~; git clone https://github.com/dmerkushov/nanoservices.git; cd nanoservices; git checkout v-bus-patch-2; mkdir build; cd build; cmake .. ; sudo /usr/share/zookeeper/bin/zkServer.sh start; cmake --build . ; cpack ; echo "echo 'Please start zookeper before you go further:'" >> ~/.bashrc ; echo "sudo /usr/share/zookeeper/bin/zkServer.sh start" >> ~/.bashrc
---> Running in 22b07ec9ece1
Cloning into 'nanoservices'...
Switched to a new branch 'v-bus-patch-2'
Branch 'v-bus-patch-2' set up to track remote branch 'v-bus-patch-2' from 'origin'.
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Preparing ns-skeleton build as a part of global nanoservices build
Sources: src/NsException.cpp;src/NsMonitoring.cpp;src/NsRpcExecutor.cpp;src/NsRpcRequest.cpp;src/NsRpcResponse.cpp;src/NsRpcResponseError.cpp;src/NsSerializer.cpp;src/NsSkelConfiguration.cpp;src/NsSkeleton.cpp;src/NsSkelJson.cpp;src/NsSkelRpcHttpServer.cpp;src/NsSkelRpcRegistry.cpp;src/NsSkelRpcReplier.cpp;src/NsSkelRpcReplierInterface.cpp;src/NsSkelRpcServer.cpp;src/NsSkelRpcService.cpp;src/NsSkelUtils.cpp;src/NsUtils.cpp;src/ConfigValidator.cpp;src/CVInvalidType.cpp;src/CVNoNodeData.cpp;src/CVTooManyChildren.cpp;src/CVTooLongData.cpp;src/NsCmdLineParameters.cpp;src/NsSkelLoopWorkerInterface.cpp;src/zoo_config/ZooConfig.cpp
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find CxxTest (missing: CXXTEST_INCLUDE_DIR CXXTEST_PYTHON_TESTGEN_EXECUTABLE)
Sources: main.cpp
ns-shutdown: Will link ns-shutdown with /home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so
Preparing ns-tests build as a part of global nanoservices build
Sources: main.cpp;testing.cpp;testing.h;testBase64.cpp;testBase64.h;testExceptionThrowThrough.cpp;testExceptionThrowThrough.h;testBrokenWrite.cpp;testBrokenWrite.h
ns-tests: Will link ns-tests with /home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/deploy/nanoservices/build
ZooKeeper JMX enabled by default
Using config: /etc/zookeeper/conf/zoo.cfg
Starting zookeeper ... STARTED
Scanning dependencies of target ns-skeleton
[ 2%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsException.cpp.o
[ 4%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsMonitoring.cpp.o
[ 6%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsRpcExecutor.cpp.o
[ 8%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsRpcRequest.cpp.o
[ 10%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsRpcResponse.cpp.o
[ 12%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsRpcResponseError.cpp.o
[ 14%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSerializer.cpp.o
[ 17%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSkelConfiguration.cpp.o
[ 19%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSkeleton.cpp.o
/home/deploy/nanoservices/ns-skeleton/src/NsSkeleton.cpp:176:46: warning: literal operator suffixes not preceded by '_' are reserved for future standardization [-Wliteral-suffix]
constexpr std::chrono::milliseconds operator ""ms(unsigned long long ms)
^~~~
[ 21%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSkelJson.cpp.o
[ 23%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSkelRpcHttpServer.cpp.o
[ 25%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSkelRpcRegistry.cpp.o
[ 27%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSkelRpcReplier.cpp.o
[ 29%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSkelRpcReplierInterface.cpp.o
[ 31%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSkelRpcServer.cpp.o
[ 34%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSkelRpcService.cpp.o
[ 36%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSkelUtils.cpp.o
[ 38%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsUtils.cpp.o
[ 40%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/ConfigValidator.cpp.o
[ 42%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/CVInvalidType.cpp.o
[ 44%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/CVNoNodeData.cpp.o
[ 46%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/CVTooManyChildren.cpp.o
[ 48%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/CVTooLongData.cpp.o
[ 51%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsCmdLineParameters.cpp.o
[ 53%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/NsSkelLoopWorkerInterface.cpp.o
[ 55%] Building CXX object ns-skeleton/CMakeFiles/ns-skeleton.dir/src/zoo_config/ZooConfig.cpp.o
[ 57%] Linking CXX shared library libns-skeleton.so
[ 57%] Built target ns-skeleton
Scanning dependencies of target ns-configurator
[ 59%] Building CXX object misc/ns-configurator/CMakeFiles/ns-configurator.dir/main.cpp.o
[ 61%] Building CXX object misc/ns-configurator/CMakeFiles/ns-configurator.dir/__/__/ns-skeleton/src/NsException.cpp.o
[ 63%] Building CXX object misc/ns-configurator/CMakeFiles/ns-configurator.dir/__/__/ns-skeleton/src/NsSkelJson.cpp.o
[ 65%] Building CXX object misc/ns-configurator/CMakeFiles/ns-configurator.dir/__/__/ns-skeleton/src/NsUtils.cpp.o
[ 68%] Building CXX object misc/ns-configurator/CMakeFiles/ns-configurator.dir/__/__/ns-skeleton/src/ConfigValidator.cpp.o
[ 70%] Building CXX object misc/ns-configurator/CMakeFiles/ns-configurator.dir/__/__/ns-skeleton/src/CVInvalidType.cpp.o
[ 72%] Building CXX object misc/ns-configurator/CMakeFiles/ns-configurator.dir/__/__/ns-skeleton/src/CVNoNodeData.cpp.o
[ 74%] Building CXX object misc/ns-configurator/CMakeFiles/ns-configurator.dir/__/__/ns-skeleton/src/CVTooManyChildren.cpp.o
[ 76%] Building CXX object misc/ns-configurator/CMakeFiles/ns-configurator.dir/__/__/ns-skeleton/src/CVTooLongData.cpp.o
[ 78%] Building CXX object misc/ns-configurator/CMakeFiles/ns-configurator.dir/__/__/ns-skeleton/src/NsCmdLineParameters.cpp.o
[ 80%] Building CXX object misc/ns-configurator/CMakeFiles/ns-configurator.dir/__/__/ns-skeleton/src/zoo_config/ZooConfig.cpp.o
[ 82%] Linking CXX executable ns-configurator
[ 82%] Built target ns-configurator
Scanning dependencies of target ns-shutdown
[ 85%] Building CXX object misc/ns-shutdown/CMakeFiles/ns-shutdown.dir/main.cpp.o
[ 87%] Linking CXX executable ns-shutdown
[ 87%] Built target ns-shutdown
Scanning dependencies of target ns-tests
[ 89%] Building CXX object ns-tests/CMakeFiles/ns-tests.dir/main.cpp.o
[ 91%] Building CXX object ns-tests/CMakeFiles/ns-tests.dir/testing.cpp.o
[ 93%] Building CXX object ns-tests/CMakeFiles/ns-tests.dir/testBase64.cpp.o
[ 95%] Building CXX object ns-tests/CMakeFiles/ns-tests.dir/testExceptionThrowThrough.cpp.o
[ 97%] Building CXX object ns-tests/CMakeFiles/ns-tests.dir/testBrokenWrite.cpp.o
[100%] Linking CXX executable ns-tests
[WARNING] Node /myService/http-enabled hasn't description!
[WARNING] Node /myService/param-keys/fuse hasn't description!
[WARNING] Node /myService/param-keys/fuse/desc hasn't description!
[WARNING] Node /myService/param-keys/fuse/isRequired hasn't description!
**********************************
*
* Test: testBase64
*
* Test Base64 encoding/decoding routines
* by encoding/decoding sample lines
* that had used to cause problems
*
/home/databin/Maps/Podolsk/Podolsk.map -> L2hvbWUvZGF0YWJpbi9NYXBzL1BvZG9sc2svUG9kb2xzay5tYXA= -> /home/databin/Maps/Podolsk/Podolsk.map
/home/databin/Maps/Podolsk/Podolsk.ma -> L2hvbWUvZGF0YWJpbi9NYXBzL1BvZG9sc2svUG9kb2xzay5tYQ== -> /home/databin/Maps/Podolsk/Podolsk.ma
/home/databin/Maps/Podolsk/Podolsk.m -> L2hvbWUvZGF0YWJpbi9NYXBzL1BvZG9sc2svUG9kb2xzay5t -> /home/databin/Maps/Podolsk/Podolsk.m
/home/databin/Maps/Podolsk/Podolsk. -> L2hvbWUvZGF0YWJpbi9NYXBzL1BvZG9sc2svUG9kb2xzay4= -> /home/databin/Maps/Podolsk/Podolsk.
/home/databin/Maps/N-37-017/N-37-017.MAP -> L2hvbWUvZGF0YWJpbi9NYXBzL04tMzctMDE3L04tMzctMDE3Lk1BUA== -> /home/databin/Maps/N-37-017/N-37-017.MAP
/home/databin/Maps/N-37-017/N-37-017.MA -> L2hvbWUvZGF0YWJpbi9NYXBzL04tMzctMDE3L04tMzctMDE3Lk1B -> /home/databin/Maps/N-37-017/N-37-017.MA
/home/databin/Maps/N-37-017/N-37-017.M -> L2hvbWUvZGF0YWJpbi9NYXBzL04tMzctMDE3L04tMzctMDE3Lk0= -> /home/databin/Maps/N-37-017/N-37-017.M
/home/databin/Maps/N-37-017/N-37-017. -> L2hvbWUvZGF0YWJpbi9NYXBzL04tMzctMDE3L04tMzctMDE3Lg== -> /home/databin/Maps/N-37-017/N-37-017.
*
* ...Test testBase64 passed
*
**********************************
**********************************
*
* Test: testExceptionThrowThrough
*
RPC server created
HTTP is enabled in service description on port: 8082, so will create an HTTP server
HTTP server created
Skeleton configured
Replier registered
Known services: {"myService":{"host":"0.0.0.0","http-enabled":true,"http-port":8082,"param-keys":{"fuse":{"desc":"fuse service","isRequired":false,"key":"f"}},"port":12345}}
Listening on port 12345
Before sending request
processIncomingConnection(): Server socket 10, client address 127.0.0.1
==============================
WARNING: Could not write a log record to the logging service:
Start write 4 bytes.
because of an exception (NsException): N12nanoservices11NsExceptionE : NsException: N12nanoservices11NsExceptionE : No service description found for service name "ns-logger"
/home/deploy/nanoservices/ns-skeleton/src/NsSkelRpcRegistry.cpp:191: in std::shared_ptr<nanoservices::NsSkelRpcService> nanoservices::NsSkelRpcRegistry::getService(std::shared_ptr<std::__cxx11::basic_string<char> >) - /home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices17NsSkelRpcRegistry10getServiceESt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE+0x431) [0x7f90a122c319]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(+0x26a0b0) [0x7f90a12430b0]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices11NsSkelUtils3logE8LogLevelRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1e1) [0x7f90a12423ab]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices11NsSkelUtils3logE8LogLevelRSo+0xb9) [0x7f90a1241f9d]
./ns-tests(_ZN12nanoservices8writeBinEiPKvm+0x98) [0x55efcd49d332]
./ns-tests(+0xff241) [0x55efcd4de241]
./ns-tests(+0x1005d6) [0x55efcd4df5d6]
./ns-tests(_ZN12nanoservices10NsSkeleton4callINS_5tests25testExceptionThrowThrough31TestExceeptionThrowThrough_ArgsENS3_32TestExceptionThrowThrough_ResultEEESt10shared_ptrIT0_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESG_S6_IT_Eb+0xc1) [0x55efcd4e1dd7]
./ns-tests(_ZN12nanoservices5tests25testExceptionThrowThrough25testExceptionThrowThroughEv+0x3c1) [0x55efcd4deeb8]
./ns-tests(main+0x19) [0x55efcd496c9e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f90a0449b97]
./ns-tests(_start+0x2a) [0x55efcd495a7a]
/home/deploy/nanoservices/ns-skeleton/include/NsSkelRpcServer.h:377: in std::shared_ptr<_Up> nanoservices::sendRpcRequest(std::shared_ptr<std::__cxx11::basic_string<char> >, std::shared_ptr<std::__cxx11::basic_string<char> >, std::shared_ptr<_Tp>, bool) [with Args = LogArgs; Result = NsVoidResult] - /home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(+0x26ac15) [0x7f90a1243c15]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices11NsSkelUtils3logE8LogLevelRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1e1) [0x7f90a12423ab]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices11NsSkelUtils3logE8LogLevelRSo+0xb9) [0x7f90a1241f9d]
./ns-tests(_ZN12nanoservices8writeBinEiPKvm+0x98) [0x55efcd49d332]
./ns-tests(+0xff241) [0x55efcd4de241]
./ns-tests(+0x1005d6) [0x55efcd4df5d6]
./ns-tests(_ZN12nanoservices10NsSkeleton4callINS_5tests25testExceptionThrowThrough31TestExceeptionThrowThrough_ArgsENS3_32TestExceptionThrowThrough_ResultEEESt10shared_ptrIT0_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESG_S6_IT_Eb+0xc1) [0x55efcd4e1dd7]
./ns-tests(_ZN12nanoservices5tests25testExceptionThrowThrough25testExceptionThrowThroughEv+0x3c1) [0x55efcd4deeb8]
./ns-tests(main+0x19) [0x55efcd496c9e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f90a0449b97]
./ns-tests(_start+0x2a) [0x55efcd495a7a]
==============================
Server: Incoming request is for method: doSmth
Server: Looking for a replier...
Replier error: -32000: N12nanoservices11NsExceptionE : N12nanoservices11NsExceptionE : Exception from MyReplier:processRequest
/home/deploy/nanoservices/ns-tests/testExceptionThrowThrough.h:101: in virtual std::shared_ptr<nanoservices::tests::testExceptionThrowThrough::TestExceptionThrowThrough_Result> nanoservices::tests::testExceptionThrowThrough::TestExceeptionThrowThrough_Replier::processRequest(std::shared_ptr<nanoservices::tests::testExceptionThrowThrough::TestExceeptionThrowThrough_Args>) - ./ns-tests(_ZN12nanoservices5tests25testExceptionThrowThrough34TestExceeptionThrowThrough_Replier14processRequestESt10shared_ptrINS1_31TestExceeptionThrowThrough_ArgsEE+0x152) [0x55efcd4e0a84]
./ns-tests(_ZN12nanoservices16NsSkelRpcReplierINS_5tests25testExceptionThrowThrough31TestExceeptionThrowThrough_ArgsENS2_32TestExceptionThrowThrough_ResultEE24processSerializedRequestERNS_12NsBinaryDataE+0x9d) [0x55efcd4e830f]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices17processRpcRequestESt10shared_ptrINS_12NsBinaryDataEERb+0x4ed) [0x7f90a11acd69]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices15NsSkelRpcServer25processIncomingConnectionEi+0x41c) [0x7f90a123af02]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt13__invoke_implIvRMN12nanoservices15NsSkelRpcServerEFviERPS1_JRiEET_St21__invoke_memfun_derefOT0_OT1_DpOT2_+0x7e) [0x7f90a123ef6e]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt8__invokeIRMN12nanoservices15NsSkelRpcServerEFviEJRPS1_RiEENSt15__invoke_resultIT_JDpT0_EE4typeEOS9_DpOSA_+0x66) [0x7f90a123ee98]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS1_iEE6__callIvJEJLm0ELm1EEEET_OSt5tupleIJDpT0_EESt12_Index_tupleIJXspT1_EEE+0x84) [0x7f90a123edb2]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS1_iEEclIJEvEET0_DpOT_+0x39) [0x7f90a123ec77]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt13__invoke_implIvSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS2_iEEJEET_St14__invoke_otherOT0_DpOT1_+0x20) [0x7f90a123eb5b]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt8__invokeISt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS2_iEEJEENSt15__invoke_resultIT_JDpT0_EE4typeEOS9_DpOSA_+0x35) [0x7f90a123e935]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt6thread8_InvokerISt5tupleIJSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS4_iEEEEE9_M_invokeIJLm0EEEEDTcl8__invokespcl10_S_declvalIXT_EEEEESt12_Index_tupleIJXspT_EEE+0x28) [0x7f90a123f2a6]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt6thread8_InvokerISt5tupleIJSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS4_iEEEEEclEv+0x2c) [0x7f90a123f200]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS5_iEEEEEEE6_M_runEv+0x1c) [0x7f90a123f03c]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xbd6df) [0x7f90a0aee6df]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f90a0dc16db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f90a0549a3f]
/home/deploy/nanoservices/ns-skeleton/include/NsSkelRpcReplier.h:68: in std::shared_ptr<nanoservices::NsBinaryData> nanoservices::NsSkelRpcReplier<Args, Result>::processSerializedRequest(nanoservices::NsSerialized&) [with Args = nanoservices::tests::testExceptionThrowThrough::TestExceeptionThrowThrough_Args; Result = nanoservices::tests::testExceptionThrowThrough::TestExceptionThrowThrough_Result; nanoservices::NsSerialized = nanoservices::NsBinaryData] - ./ns-tests(_ZN12nanoservices16NsSkelRpcReplierINS_5tests25testExceptionThrowThrough31TestExceeptionThrowThrough_ArgsENS2_32TestExceptionThrowThrough_ResultEE24processSerializedRequestERNS_12NsBinaryDataE+0x310) [0x55efcd4e8582]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices17processRpcRequestESt10shared_ptrINS_12NsBinaryDataEERb+0x4ed) [0x7f90a11acd69]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices15NsSkelRpcServer25processIncomingConnectionEi+0x41c) [0x7f90a123af02]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt13__invoke_implIvRMN12nanoservices15NsSkelRpcServerEFviERPS1_JRiEET_St21__invoke_memfun_derefOT0_OT1_DpOT2_+0x7e) [0x7f90a123ef6e]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt8__invokeIRMN12nanoservices15NsSkelRpcServerEFviEJRPS1_RiEENSt15__invoke_resultIT_JDpT0_EE4typeEOS9_DpOSA_+0x66) [0x7f90a123ee98]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS1_iEE6__callIvJEJLm0ELm1EEEET_OSt5tupleIJDpT0_EESt12_Index_tupleIJXspT1_EEE+0x84) [0x7f90a123edb2]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS1_iEEclIJEvEET0_DpOT_+0x39) [0x7f90a123ec77]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt13__invoke_implIvSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS2_iEEJEET_St14__invoke_otherOT0_DpOT1_+0x20) [0x7f90a123eb5b]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt8__invokeISt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS2_iEEJEENSt15__invoke_resultIT_JDpT0_EE4typeEOS9_DpOSA_+0x35) [0x7f90a123e935]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt6thread8_InvokerISt5tupleIJSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS4_iEEEEE9_M_invokeIJLm0EEEEDTcl8__invokespcl10_S_declvalIXT_EEEEESt12_Index_tupleIJXspT_EEE+0x28) [0x7f90a123f2a6]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt6thread8_InvokerISt5tupleIJSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS4_iEEEEEclEv+0x2c) [0x7f90a123f200]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS5_iEEEEEEE6_M_runEv+0x1c) [0x7f90a123f03c]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xbd6df) [0x7f90a0aee6df]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f90a0dc16db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f90a0549a3f]
*
* ...Test testExceptionThrowThrough passed
*
**********************************
**********************************
*
* Test: testBrokenWrite
*
* Regression test on issue https://github.com/dmerkushov/nanoservices/issues/3
*
* 1. A sends a request to B
* 2. B starts processing the request, the processing is time-consuming
* 3. A dies
* 4. B finishes processing, tries to send a response, but falls into an infinite loop in writeBin()
*
Forking child (A side) from the parent (B side)
myService called threw an exception: Exception on remote RPC side (service myService, method doSmth):
-32000: N12nanoservices11NsExceptionE : Exception from MyReplier:processRequest
/home/deploy/nanoservices/ns-tests/testExceptionThrowThrough.h:101: in virtual std::shared_ptr<nanoservices::tests::testExceptionThrowThrough::TestExceptionThrowThrough_Result> nanoservices::tests::testExceptionThrowThrough::TestExceeptionThrowThrough_Replier::processRequest(std::shared_ptr<nanoservices::tests::testExceptionThrowThrough::TestExceeptionThrowThrough_Args>) - ./ns-tests(_ZN12nanoservices5tests25testExceptionThrowThrough34TestExceeptionThrowThrough_Replier14processRequestESt10shared_ptrINS1_31TestExceeptionThrowThrough_ArgsEE+0x152) [0x55efcd4e0a84]
./ns-tests(_ZN12nanoservices16NsSkelRpcReplierINS_5tests25testExceptionThrowThrough31TestExceeptionThrowThrough_ArgsENS2_32TestExceptionThrowThrough_ResultEE24processSerializedRequestERNS_12NsBinaryDataE+0x9d) [0x55efcd4e830f]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices17processRpcRequestESt10shared_ptrINS_12NsBinaryDataEERb+0x4ed) [0x7f90a11acd69]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices15NsSkelRpcServer25processIncomingConnectionEi+0x41c) [0x7f90a123af02]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt13__invoke_implIvRMN12nanoservices15NsSkelRpcServerEFviERPS1_JRiEET_St21__invoke_memfun_derefOT0_OT1_DpOT2_+0x7e) [0x7f90a123ef6e]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt8__invokeIRMN12nanoservices15NsSkelRpcServerEFviEJRPS1_RiEENSt15__invoke_resultIT_JDpT0_EE4typeEOS9_DpOSA_+0x66) [0x7f90a123ee98]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS1_iEE6__callIvJEJLm0ELm1EEEET_OSt5tupleIJDpT0_EESt12_Index_tupleIJXspT1_EEE+0x84) [0x7f90a123edb2]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS1_iEEclIJEvEET0_DpOT_+0x39) [0x7f90a123ec77]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt13__invoke_implIvSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS2_iEEJEET_St14__invoke_otherOT0_DpOT1_+0x20) [0x7f90a123eb5b]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZSt8__invokeISt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS2_iEEJEENSt15__invoke_resultIT_JDpT0_EE4typeEOS9_DpOSA_+0x35) [0x7f90a123e935]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt6thread8_InvokerISt5tupleIJSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS4_iEEEEE9_M_invokeIJLm0EEEEDTcl8__invokespcl10_S_declvalIXT_EEEEESt12_Index_tupleIJXspT_EEE+0x28) [0x7f90a123f2a6]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt6thread8_InvokerISt5tupleIJSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS4_iEEEEEclEv+0x2c) [0x7f90a123f200]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJSt5_BindIFMN12nanoservices15NsSkelRpcServerEFviEPS5_iEEEEEEE6_M_runEv+0x1c) [0x7f90a123f03c]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xbd6df) [0x7f90a0aee6df]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f90a0dc16db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f90a0549a3f]
Parent: i am B
Child: i am A
terminate called after throwing an instance of 'nanoservices::NsException'
terminate called after throwing an instance of 'nanoservices::NsException'
what(): N12nanoservices11NsExceptionE : NsSkeleton::init(): NsException: N12nanoservices11NsExceptionE : Already connected!
/home/deploy/nanoservices/ns-skeleton/src/zoo_config/ZooConfig.cpp:19: in static void nanoservices::AbstractConfig::init(const string&, std::shared_ptr<ConfigValidator>) - /home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices14AbstractConfig4initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrI15ConfigValidatorE+0x162) [0x7f90a125658a]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices19NsSkelConfigurationC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_+0x154) [0x7f90a11be26c]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(nsSkelConfig+0x42) [0x7f90a11be0ac]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices10NsSkeleton4initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPPc+0x63) [0x7f90a11c18c9]
./ns-tests(_Z7child_Av+0x6b) [0x55efcd4ecac7]
./ns-tests(_ZN12nanoservices5tests15testBrokenWrite15testBrokenWriteEv+0xb3) [0x55efcd4ec52a]
./ns-tests(main+0x1e) [0x55efcd496ca3]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f90a0449b97]
./ns-tests(_start+0x2a) [0x55efcd495a7a]
/home/deploy/nanoservices/ns-skeleton/src/NsSkeleton.cpp:81: in static void nanoservices::NsSkeleton::init(const string&, int, char**) - /home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices10NsSkeleton4initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPPc+0x886) [0x7f90a11c20ec]
./ns-tests(_Z7child_Av+0x6b) [0x55efcd4ecac7]
./ns-tests(_ZN12nanoservices5tests15testBrokenWrite15testBrokenWriteEv+0xb3) [0x55efcd4ec52a]
./ns-tests(main+0x1e) [0x55efcd496ca3]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f90a0449b97]
./ns-tests(_start+0x2a) [0x55efcd495a7a]
what(): N12nanoservices11NsExceptionE : NsSkeleton::init(): NsException: N12nanoservices11NsExceptionE : Already connected!
/home/deploy/nanoservices/ns-skeleton/src/zoo_config/ZooConfig.cpp:19: in static void nanoservices::AbstractConfig::init(const string&, std::shared_ptr<ConfigValidator>) - /home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices14AbstractConfig4initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrI15ConfigValidatorE+0x162) [0x7f90a125658a]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices19NsSkelConfigurationC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_+0x154) [0x7f90a11be26c]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(nsSkelConfig+0x42) [0x7f90a11be0ac]
/home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices10NsSkeleton4initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPPc+0x63) [0x7f90a11c18c9]
./ns-tests(_Z8parent_Bi+0x71) [0x55efcd4ec5e6]
./ns-tests(_ZN12nanoservices5tests15testBrokenWrite15testBrokenWriteEv+0xe7) [0x55efcd4ec55e]
./ns-tests(main+0x1e) [0x55efcd496ca3]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f90a0449b97]
./ns-tests(_start+0x2a) [0x55efcd495a7a]
/home/deploy/nanoservices/ns-skeleton/src/NsSkeleton.cpp:81: in static void nanoservices::NsSkeleton::init(const string&, int, char**) - /home/deploy/nanoservices/build/ns-skeleton/libns-skeleton.so(_ZN12nanoservices10NsSkeleton4initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPPc+0x886) [0x7f90a11c20ec]
./ns-tests(_Z8parent_Bi+0x71) [0x55efcd4ec5e6]
./ns-tests(_ZN12nanoservices5tests15testBrokenWrite15testBrokenWriteEv+0xe7) [0x55efcd4ec55e]
./ns-tests(main+0x1e) [0x55efcd496ca3]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f90a0449b97]
./ns-tests(_start+0x2a) [0x55efcd495a7a]
Aborted
ns-tests/CMakeFiles/ns-tests.dir/build.make:199: recipe for target 'ns-tests/ns-tests' failed
make[2]: *** [ns-tests/ns-tests] Error 134
make[2]: *** Deleting file 'ns-tests/ns-tests'
make[1]: *** [ns-tests/CMakeFiles/ns-tests.dir/all] Error 2
CMakeFiles/Makefile2:271: recipe for target 'ns-tests/CMakeFiles/ns-tests.dir/all' failed
make: *** [all] Error 2
Makefile:151: recipe for target 'all' failed
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: nanoservices
CPack Error: Problem running install command: /usr/bin/cmake --build . --target "preinstall"
Please check /home/deploy/nanoservices/build/_CPack_Packages/Linux/DEB/PreinstallOutput.log for errors
CPack Error: Error when generating package: nanoservices-zoo
Removing intermediate container 22b07ec9ece1
---> 480dabf5971e
Successfully built 480dabf5971e
Successfully tagged nanoservices:latest
Successfully tagged nanoservices:v0.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment