Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » ttcn3 in container environment(ttcn3 inside Docker)
ttcn3 in container environment [message #1817730] Thu, 28 November 2019 09:59 Go to next message
Vardan Saakian is currently offline Vardan SaakianFriend
Messages: 5
Registered: November 2019
Junior Member
I am trying to run ttcn3_start inside the Docker container. There seems to be a problem when parent process fails to wait for its children to terminate. I am getting the following:
"Dynamic test case error: System call wait3() failed when waiting for terminated test component processes. (No such file or directory)".
When looking at the code in titan.core, I see it is referring to wait3 method, which is deprecated. wait.h seems to be in the path, but somehow it is not found.

Any clues?
Re: ttcn3 in container environment [message #1817896 is a reply to message #1817730] Mon, 02 December 2019 13:08 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Vardan,

if you could let us have a copy of the Docker image together with a detailed description of the fault (that is TTCN-3 code involved, logs, whatever else you consider significant)
we could investigate this issue.

Best regards
Elemer

[Updated on: Mon, 02 December 2019 13:34]

Report message to a moderator

Re: ttcn3 in container environment [message #1817922 is a reply to message #1817896] Tue, 03 December 2019 08:38 Go to previous messageGo to next message
Vardan Saakian is currently offline Vardan SaakianFriend
Messages: 5
Registered: November 2019
Junior Member
Docker image itself is quite bulky - around 740MB. I am not sure where to upload it. I checked in TTCN code (Runtime.cc) and I see an exception occuring in TTCN_Runtime::wait_terminated_processes() function:

#ifdef INTERIX
pid_t child_pid = waitpid(-1, &statuscode, WNOHANG);
getrusage(RUSAGE_CHILDREN, &r_usage);
#else
pid_t child_pid = wait3(&statuscode, WNOHANG, &r_usage);
#endif
if (child_pid <= 0) {
switch (errno) {
case ECHILD:
errno = 0;
// no break
case 0:
return;
default:
TTCN_error("System call wait3() failed when waiting for "
"terminated test component processes.");
}
}

At first I thought issue is related to "PID 1" problem in container environment. After running it with various init options, namely tini, bash with PID 1, I still get this problem. See log snippet below:

MC@cscf-ft-55c5fd9d69-dhsvn: MTC terminated.
MC2> exit
exit
MC@cscf-ft-55c5fd9d69-dhsvn: Shutting down session.
HC@cscf-ft-55c5fd9d69-dhsvn: Dynamic test case error: System call wait3() failed when waiting for terminated test component processes. (No such file or directory)
terminate called after throwing an instance of 'TC_Error'
/usr/local/bin/cftaf_regression: Abort was called
/usr/local/bin/cftaf_regression[0x9651575]
/lib64/libpthread.so.0(+0x10c10)[0x7f2e4d0a8c10]
/lib64/libc.so.6(gsignal+0x37)[0x7f2e4c282f67]
/lib64/libc.so.6(abort+0x13a)[0x7f2e4c28433a]
/usr/lib64/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x125)[0x7f2e4cba0545]
/usr/lib64/libstdc++.so.6(+0x97336)[0x7f2e4cb9e336]
/usr/lib64/libstdc++.so.6(+0x97381)[0x7f2e4cb9e381]
/usr/lib64/libstdc++.so.6(+0x975c3)[0x7f2e4cb9e5c3]
/usr/local/bin/cftaf_regression[0x95db68a]
/usr/local/bin/cftaf_regression[0x9614f75]
/usr/local/bin/cftaf_regression[0x96151b4]
/usr/local/bin/cftaf_regression[0x9616122]
/lib64/libc.so.6(+0x37869)[0x7f2e4c285869]
/lib64/libc.so.6(+0x378b5)[0x7f2e4c2858b5]
/lib64/libc.so.6(__libc_start_main+0xfc)[0x7f2e4c26e72c]
/usr/local/bin/cftaf_regression[0x412a29]
MC@cscf-ft-55c5fd9d69-dhsvn: Shutdown complete.
Re: ttcn3 in container environment [message #1817934 is a reply to message #1817922] Tue, 03 December 2019 10:07 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Vardan,

I suggest WeTransfer, it allows one sending up to 2 GB
, no subscription needed.

BR
Elemer
Re: ttcn3 in container environment [message #1817938 is a reply to message #1817934] Tue, 03 December 2019 11:42 Go to previous messageGo to next message
Vardan Saakian is currently offline Vardan SaakianFriend
Messages: 5
Registered: November 2019
Junior Member
Hi Elemer,

Thanks! Here's link to the image:
https://wetransfer.com/downloads/da597382595a6274600aa9c71c5c217320191203113822/6f53471a74e866a0b0bb58c27ace3e0520191203113822/661641

/Vardan
Re: ttcn3 in container environment [message #1818176 is a reply to message #1817730] Mon, 09 December 2019 13:08 Go to previous messageGo to next message
Botond Baranyi is currently offline Botond BaranyiFriend
Messages: 36
Registered: February 2016
Member
Hi Vardan,

I've managed to reproduce the error on the docker image you've provided.

I've been trying to rebuild the executable with a debug-mode Titan to be able to debug the code, but I can't find the sources or makefiles to build your project. Are these on the docker image, or only the built executable?

Alternatively, could you re-create the docker image, but with a debug-mode Titan (i.e. a Titan built with 'DEBUG := yes' set in the Makefile.personal)?

Best regards,
Botond
Re: ttcn3 in container environment [message #1818202 is a reply to message #1818176] Tue, 10 December 2019 08:21 Go to previous messageGo to next message
Vardan Saakian is currently offline Vardan SaakianFriend
Messages: 5
Registered: November 2019
Junior Member
Hi,

yes, container has only executables. I am unable to find the Makefile though, in order to set debug flag. Any idea where is it located?

/Vardan
Re: ttcn3 in container environment [message #1818207 is a reply to message #1818202] Tue, 10 December 2019 09:39 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Vardan,

it should be located wherever you have built your project and copied the executables from;
or if it was not you who built the project ask the one who did.


BR
Elemer
Re: ttcn3 in container environment [message #1818212 is a reply to message #1817730] Tue, 10 December 2019 09:52 Go to previous messageGo to next message
Botond Baranyi is currently offline Botond BaranyiFriend
Messages: 36
Registered: February 2016
Member
Hi Vardan,

the file 'Makefile.personal' is not part of the 'titan.core' git repository. It's up to the user to create one with their own build settings (in this case with 'DEBUG := yes'). It should be placed in the main directory of the repository.

Best regards,
Botond
Re: ttcn3 in container environment [message #1818213 is a reply to message #1818207] Tue, 10 December 2019 09:54 Go to previous messageGo to next message
Vardan Saakian is currently offline Vardan SaakianFriend
Messages: 5
Registered: November 2019
Junior Member
Ok, I'm using ttcn packages from ttcn.ericsson.se which are already built.
I will check if it is possible to have a debug build

Regards,
Vardan
Re: ttcn3 in container environment [message #1818546 is a reply to message #1818213] Thu, 19 December 2019 10:22 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi,

the problem has been solved,
the resolution can be followed up here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=558427

Not yet contained in 6.6.1 , it will be part of an upcoming intermediate release 6.6.2

Best regards
Elemer
Previous Topic:The Titan SocketCAN test port
Next Topic:The "Christmas refactoring"
Goto Forum:
  


Current Time: Wed Jun 16 12:10:21 GMT 2021

Powered by FUDForum. Page generated in 0.02229 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top