titan.core issueshttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues2023-05-16T10:53:34Zhttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/690ttcn3 connect() on port triggering kernel OOM killer on component2023-05-16T10:53:34ZPau Espin Pedrolttcn3 connect() on port triggering kernel OOM killer on component## Summary
At osmocom we have a set of testsuites in TTCN3 which tests several telecommunications nodes in this repository [1]. Most tetsuite are run nightly with a prepared containerized setup under docker available at [2].
The PGW_Te...## Summary
At osmocom we have a set of testsuites in TTCN3 which tests several telecommunications nodes in this repository [1]. Most tetsuite are run nightly with a prepared containerized setup under docker available at [2].
The PGW_Tests setup (docker-playground.git/ttcn3-pgw-test/) starts a open5gs core network (specifically UPF and SMF) and tests creating 256 GTPv2 concurrent sessions against it (TC_createSession_ping4_256), launching 256 ping commands on one tun dev per conn. TTCN3 emulates OCS and PFC (Gx, Gy interface) as well as SGW (GTP). The most relevant code can be found at [3].
[1] https://gitea.osmocom.org/ttcn3/osmo-ttcn3-hacks
[2] https://gitea.osmocom.org/osmocom/docker-playground
[3] https://gitea.osmocom.org/ttcn3/osmo-ttcn3-hacks/src/branch/master/pgw/PGW_Tests.ttcn
In TTCN3, we have 1 component per GTP session, each in turn has ports connected to a Gx DIAMETER Gx and Gy DIAMETER components through component ports.
## Steps and/or TTCN-3 code to reproduce
Today, the PGW_Tests testsuite started to fail within a specific test: TC_createSession_ping4_256
Looking at the logs it seems the first 3-4 GTP sessions (ttcn3 components) are created fine and everything works fine, but at around the 4th-5th one it fails due to one component detecting a peer component closed the unix socket uses to intercommunicate with it (I also attah full merged log of all components during the failing test run[PGW_Tests.TC_createSession_ping4_256.pcap.gz](/uploads/97a31b296bf98c17556bf9118c0b09a1/PGW_Tests.TC_createSession_ping4_256.pcap.gz)[PGW_Tests.TC_createSession_ping4_256.merged.gz](/uploads/021bae01b9158ba54a7929c86110f144/PGW_Tests.TC_createSession_ping4_256.merged.gz)):
```
17:00:55.894883 22 - Connection of port DIAMETER to TC_createSession_ping4_256(4):DIAMETER_CLIENT was closed unexpectedly by the peer.
17:00:55.894983 19 PGW_Tests.ttcn:85 Connection of port DIAMETER_PROC to TC_createSession_ping4_256(4):DIAMETER_PROC was closed unexpectedly by the peer.
17:00:55.895109 16 PGW_Tests.ttcn:85 Connection of port DIAMETER_PROC to TC_createSession_ping4_256(4):DIAMETER_PROC was closed unexpectedly by the peer.
17:00:55.895114 13 PGW_Tests.ttcn:85 Connection of port DIAMETER_PROC to TC_createSession_ping4_256(4):DIAMETER_PROC was closed unexpectedly by the peer.
17:00:55.895215 10 PGW_Tests.ttcn:85 Connection of port DIAMETER_PROC to TC_createSession_ping4_256(4):DIAMETER_PROC was closed unexpectedly by the peer.
17:00:55.895219 7 PGW_Tests.ttcn:85 Connection of port DIAMETER_PROC to TC_createSession_ping4_256(4):DIAMETER_PROC was closed unexpectedly by the peer.
17:00:55.895260 22 - Port DIAMETER was disconnected from TC_createSession_ping4_256(4):DIAMETER_CLIENT.
17:00:55.895350 19 PGW_Tests.ttcn:85 Port DIAMETER_PROC was disconnected from TC_createSession_ping4_256(4):DIAMETER_PROC.
17:00:55.895386 mtc PGW_Tests.ttcn:275 Connection of port Gx_PROC to TC_createSession_ping4_256(4):DIAMETER_PROC was closed unexpectedly by the peer.
17:00:55.895423 16 PGW_Tests.ttcn:85 Port DIAMETER_PROC was disconnected from TC_createSession_ping4_256(4):DIAMETER_PROC.
17:00:55.895427 13 PGW_Tests.ttcn:85 Port DIAMETER_PROC was disconnected from TC_createSession_ping4_256(4):DIAMETER_PROC.
17:00:55.895509 10 PGW_Tests.ttcn:85 Port DIAMETER_PROC was disconnected from TC_createSession_ping4_256(4):DIAMETER_PROC.
17:00:55.895511 7 PGW_Tests.ttcn:85 Port DIAMETER_PROC was disconnected from TC_createSession_ping4_256(4):DIAMETER_PROC.
17:00:55.895743 mtc PGW_Tests.ttcn:275 Port Gx_PROC was disconnected from TC_createSession_ping4_256(4):DIAMETER_PROC.
17:00:55.896229 19 PGW_Tests.ttcn:85 Connection of port DIAMETER to TC_createSession_ping4_256(4):DIAMETER_CLIENT was reset by the peer.
17:00:55.896294 16 PGW_Tests.ttcn:85 Connection of port DIAMETER to TC_createSession_ping4_256(4):DIAMETER_CLIENT was closed unexpectedly by the peer.
17:00:55.896298 13 PGW_Tests.ttcn:85 Connection of port DIAMETER to TC_createSession_ping4_256(4):DIAMETER_CLIENT was closed unexpectedly by the peer.
17:00:55.896378 10 PGW_Tests.ttcn:85 Connection of port DIAMETER to TC_createSession_ping4_256(4):DIAMETER_CLIENT was closed unexpectedly by the peer.
17:00:55.896509 19 PGW_Tests.ttcn:85 Warning: The last outgoing messages on port DIAMETER may be lost.
17:00:55.896530 7 PGW_Tests.ttcn:85 Connection of port DIAMETER to TC_createSession_ping4_256(4):DIAMETER_CLIENT was closed unexpectedly by the peer.
17:00:55.896582 16 PGW_Tests.ttcn:85 Port DIAMETER was disconnected from TC_createSession_ping4_256(4):DIAMETER_CLIENT.
17:00:55.896586 13 PGW_Tests.ttcn:85 Port DIAMETER was disconnected from TC_createSession_ping4_256(4):DIAMETER_CLIENT.
17:00:55.896601 mtc PGW_Tests.ttcn:275 Connection of port Gx_UNIT to TC_createSession_ping4_256(4):DIAMETER_UNIT was closed unexpectedly by the peer.
17:00:55.896640 10 PGW_Tests.ttcn:85 Port DIAMETER was disconnected from TC_createSession_ping4_256(4):DIAMETER_CLIENT.
17:00:55.896762 7 PGW_Tests.ttcn:85 Port DIAMETER was disconnected from TC_createSession_ping4_256(4):DIAMETER_CLIENT.
17:00:55.896827 19 PGW_Tests.ttcn:85 Port DIAMETER was disconnected from TC_createSession_ping4_256(4):DIAMETER_CLIENT.
17:00:55.896851 mtc PGW_Tests.ttcn:275 Port Gx_UNIT was disconnected from TC_createSession_ping4_256(4):DIAMETER_UNIT.
17:00:55.897238 mtc PGW_Tests.ttcn:275 Dynamic test case error: Error message was received from MC: Establishment of port connection 4:DIAMETER_PROC - 22:DIAMETER_PROC failed because test component 4 has terminated during connection setup.
```
So looking at the TTCN3 logs (attached), I can compare the previous 3-4 created sessions with the last failing one, and it seems the "closed unexpectedly" happens while the port of the component is in the process of being connected() to the remote port (not yet completed).
When those errors show up, I get following output in "dmesg":
```
[28567.554950] __vm_enough_memory: pid: 233484, comm: PGW_Tests, no enough memory for the allocation
[28567.555002] __vm_enough_memory: pid: 233484, comm: PGW_Tests, no enough memory for the allocation
[28567.555066] __vm_enough_memory: pid: 233484, comm: PGW_Tests, no enough memory for the allocation
```
That's due to sysctl vm.overcommit_memory being 0 in my system (https://www.kernel.org/doc/html/latest/mm/overcommit-accounting.html). Disabling it (sysctl -w vm.overcommit_memory=1) makes it trigger the OOM killer every time I run the test, which kills the "PGW_Tests" binary containing the compiled TTCN3.
So I then run the "ttcn3_start" binary under "strace -ff -o /data/strace.log" to find out more. I get lots of strace.log, one per component (process). I grep for "unexpectedly" to find out the failing component, and look around to find out what's going on. According to the code, this happens because the unix socket recv() is returning 0. strace confirms that:
```
set_robust_list(0x7f9141acdee0, 24) = 0
close(3) = 0
epoll_create(16) = 3
close(4) = 0
epoll_ctl(3, EPOLL_CTL_DEL, 4, 0x7ffc6c88dd5c) = -1 EBADF (Bad file descriptor)
fcntl(4, F_GETFD) = -1 EBADF (Bad file descriptor)
close(6) = 0
openat(AT_FDCWD, "PGW_Tests-TC_createSession_ping4_256-7b8d6c76ffd5-22.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 4
lseek(4, 0, SEEK_END) = 0
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
write(4, "17:00:54.715547 - Warning: A plu"..., 110) = 110
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.715905 - TTCN-3 Paralle"..., 235) = 235
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.716072 - TTCN Logger v2"..., 289) = 289
socket(AF_UNIX, SOCK_STREAM, 0) = 6
connect(6, {sa_family=AF_UNIX, sun_path="/tmp/ttcn3-mctr-33961"}, 110) = 0
fcntl(6, F_GETFD) = 0
fcntl(6, F_SETFD, FD_CLOEXEC) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN, {u32=6, u64=6}}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.716422 - Connected to M"..., 35) = 35
sendto(6, "\2\4\26", 3, 0, NULL, 0) = 3
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.716616 - Initializing v"..., 152) = 152
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.717908 - Port DIAMETER "..., 45) = 45
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.718042 - Port DIAMETER_"..., 50) = 50
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.718148 - Port DIAMETER_"..., 52) = 52
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.718230 - Component type"..., 81) = 81
epoll_wait(3, [{EPOLLIN, {u32=6, u64=6}}], 64, -1) = 1
recvfrom(6, "\200T\r\10DIAMETER\4\32TC_createSession_p"..., 1000, 0, NULL, NULL) = 86
socket(AF_UNIX, SOCK_STREAM, 0) = 7
connect(7, {sa_family=AF_UNIX, sun_path="/tmp/ttcn3-portconn-c554be55"}, 110) = 0 //<--- "/tmp/ttcn3-portconn-c554be55", fd=7
fcntl(7, F_GETFD) = 0
fcntl(7, F_SETFD, FD_CLOEXEC) = 0
fcntl(7, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN, {u32=7, u64=7}}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.718682 - Port DIAMETER "..., 141) = 141
epoll_wait(3, [{EPOLLIN|EPOLLHUP, {u32=7, u64=7}}], 64, -1) = 1 //<----- POLLED FOR READ!
recvfrom(7, "", 1000, 0, NULL, NULL) = 0 //<-------- recv() returns 0!!!!!! peer closed!
sendto(6, "\33\20\10DIAMETER\4\17DIAMETER_CLIENT", 28, 0, NULL, 0) = 28
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:55.894883 - Connection of "..., 132) = 132
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:55.895260 - Port DIAMETER "..., 101) = 101
epoll_ctl(3, EPOLL_CTL_DEL, 7, 0x7ffc6c88ddec) = 0
close(7) = 0
epoll_wait(3, [{EPOLLIN, {u32=6, u64=6}}], 64, -1) = 1
recvfrom(6, "\1\26", 1000, 0, NULL, NULL) = 2
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:55.904796 - Kill was reque"..., 68) = 68
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:55.905412 - Terminating co"..., 77) = 77
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:55.906088 - Port DIAMETER "..., 45) = 45
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:55.906693 - Port DIAMETER_"..., 50) = 50
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:55.907299 - Port DIAMETER_"..., 52) = 52
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:55.907881 - Component type"..., 122) = 122
sendto(6, "\3\27\0\0", 4, 0, NULL, 0) = 4
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:55.908685 - Final verdict "..., 45) = 45
sendto(6, "&\1\0\206\237\370\346G\267\273\r0\32Final verdict of PT"..., 39, 0, NULL, 0) = 39
shutdown(6, SHUT_WR) = 0
recvfrom(6, "", 1024, 0, NULL, NULL) = 0
close(6) = 0
epoll_ctl(3, EPOLL_CTL_DEL, 6, 0x7ffc6c88dafc) = -1 EBADF (Bad file descriptor)
fcntl(6, F_GETFD) = -1 EBADF (Bad file descriptor)
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:55.958218 - Disconnected f"..., 40) = 40
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:55.958534 - TTCN-3 Paralle"..., 59) = 59
rt_sigaction(SIGPIPE, NULL, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f913d896d60}, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f913d896d60}, NULL, 8) = 0
close(4) = 0
munmap(0x7f9141aae000, 32880) = 0
close(3) = 0
exit_group(0) = ?
+++ exited with 0 +++
```
So, the peer component is closing its socket, why? probably because it's crashing and the kernel is closing resources. Since the unix socket path is know from the above ("/tmp/ttcn3-portconn-c554be55"), we can easily identify the peer over all the other strace logs. Here it is (I attach the full file too[strace.log.46.gz](/uploads/75378688f6b57a50c5d5c688c9e38150/strace.log.46.gz)):
```
// This shows it's the component running DIAMETER_Emulation.main():
write(4, "17:00:53.675978 DIAMETER_Emulati"..., 133) = 133
sendto(6, "\200e\1\0\206\237\370\346E\251\241\n-\200XCreated Expect[0]"..., 103, 0, NULL, 0) = 103
[...]
// unix socket to which the component exiting with "unexepctedly closed by peer" is connecting:
socket(AF_UNIX, SOCK_STREAM, 0) = 11
getpid() = 46
bind(11, {sa_family=AF_UNIX, sun_path="/tmp/ttcn3-portconn-c554be55"}, 110) = 0
listen(11, 0) = 0
fcntl(11, F_GETFD) = 0
fcntl(11, F_SETFD, FD_CLOEXEC) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 11, {EPOLLIN, {u32=11, u64=11}}) = 0
sendto(6, "9\f\17DIAMETER_CLIENT\26\10DIAMETER\2\34/t"..., 58, 0, NULL, 0) = 58
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.717919 DIAMETER_Emulati"..., 183) = 183
[...]
//peer connects to us:
epoll_wait(3, [{EPOLLIN, {u32=11, u64=11}}], 64, -1) = 1
accept(11, NULL, NULL) = 22
fcntl(22, F_GETFD) = 0
fcntl(22, F_SETFD, FD_CLOEXEC) = 0
fcntl(22, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(22, F_SETFL, O_RDWR|O_NONBLOCK) = 0
epoll_ctl(3, EPOLL_CTL_DEL, 11, 0x7ffc6c88cb3c) = 0
getsockname(11, {sa_family=AF_UNIX, sun_path="/tmp/ttcn3-portconn-c554be55"}, [110->31]) = 0
unlink("/tmp/ttcn3-portconn-c554be55") = 0
close(11) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 22, {EPOLLIN, {u32=22, u64=22}}) = 0
sendto(6, "\33\r\17DIAMETER_CLIENT\26\10DIAMETER", 28, 0, NULL, 0) = 28
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.727273 DIAMETER_Emulati"..., 139) = 139
epoll_wait(3, [{EPOLLIN, {u32=6, u64=6}}], 64, -1) = 1
recvfrom(6, ":\f\rDIAMETER_PROC\26\32TC_createSessi"..., 1000, 0, NULL, NULL) = 59
socket(AF_UNIX, SOCK_STREAM, 0) = 11
getpid() = 46
bind(11, {sa_family=AF_UNIX, sun_path="/tmp/ttcn3-portconn-df4eb11c"}, 110) = 0 //<---- HERE ANOTHER SOCKET WITH DIFFERENT PATH IS CREATED
listen(11, 0) = 0
fcntl(11, F_GETFD) = 0
fcntl(11, F_SETFD, FD_CLOEXEC) = 0
mmap(NULL, 17179869184, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) //<----- HERE MEM ALLOC OF 16GB!!!!!!! IT FAILS!!!!
brk(0x563e6dfce000) = 0x563a6dfbc000
mmap(NULL, 17180004352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
futex(0x7f9141b5f1e0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(4, "17:00:54.732595 - Fatal error. A"..., 51) = 51 //<----- FAILURE TO ALLOC TRIGGERS TC_Error, ABORTS PROGRAM
sendto(6, ",\1\0\206\237\370\346F\254\3333\6 Fatal error. Aborti"..., 45, 0, NULL, 0) = 45
rt_sigaction(SIGPIPE, NULL, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f913d896d60}, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f913d896d60}, NULL, 8) = 0
close(4) = 0
munmap(0x7f9141aae000, 32880) = 0
close(3) = 0
sendto(6, "\30\20\rDIAMETER_UNIT\1\7Gx_UNIT", 25, 0, NULL, 0) = 25
epoll_ctl(-1, EPOLL_CTL_DEL, 7, 0x7ffc6c88d6dc) = -1 EBADF (Bad file descriptor)
fcntl(7, F_GETFD) = 0x1 (flags FD_CLOEXEC)
write(2, "terminate called after throwing "..., 48) = 48
write(2, "TC_Error", 8) = 8
write(2, "'\n", 2) = 2
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
getpid() = 46
gettid() = 46
tgkill(46, 46, SIGABRT) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=46, si_uid=0} ---
```
So allegadely according to logs and strace output, this mem allocation of 16GB (interestingly happens to be the memory on my system) which crashes the program happens when in PORT::connect_listen_unix_stream(), AFTER set_close_on_exec() is called (see strace) and before anything else is logged, which potentially means during calls to any of PORT::add_connection(), TTCN_Communication::send_connect_listen_ack_unix_stream() or TTCN_Logger::log_port_misc().
## What is the current bug behavior?
A TTCN3 component crashes trying to allocate all the memory in my system and obviously fails to do so, crashing.
## What is the expected correct behavior?
The TTCN3 component should not be attempting that big allocation of memory.
## Relevant logs and/or screenshots
Attached as explained above.
## Possible fixes
Couldn't find a fix for this.
## Titan version
titan.core version: 8.3.0
## Platform details (OS type and version)
linux: Linux 6.1.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 14 Feb 2023 22:08:08 +0000 x86_64 GNU/Linux
/cc @aknappqwt @mmagyariGábor SzalaiGábor Szalaihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/580gcc warning: control reaches end of non-void function2022-05-04T05:39:53ZGábor Szalaigcc warning: control reaches end of non-void function## Summary
The GCC compiler generates a warning:
warning: control reaches end of non-void function [-Wreturn-type]
## Steps and/or TTCN-3 code to reproduce
```
module proba{
type enumerated t_e {I,O}
function f1(in t_e a) return...## Summary
The GCC compiler generates a warning:
warning: control reaches end of non-void function [-Wreturn-type]
## Steps and/or TTCN-3 code to reproduce
```
module proba{
type enumerated t_e {I,O}
function f1(in t_e a) return integer {
select(a){
case (I) {
return 1
}
case else {
return 2
}
}
}
}
```
## What is the current bug behavior?
```
g++ -c -DLINUX -I/home/ethgasz/TTCNv3/include -Wall -o proba.o proba.cc
proba.cc: In function ‘INTEGER proba::f1(const proba::t__e&)’:
proba.cc:665:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
```
## What is the expected correct behavior?
No warning
## Possible fixes
Do not generate the unnecessary goto and label statements
/cc @aknappqwtAdam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/560CROSSTAG(OTHERWISE) one 1 field union generates incorrect C++ code2021-11-10T08:22:29ZLenard NagyCROSSTAG(OTHERWISE) one 1 field union generates incorrect C++ codeOriginal Bugzilla bug written by Pau Espin Pedrol:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=574469
## Summary
CROSSTAG(OTHERWISE) one 1 field union generates incorrect C++ code
## Steps and/or TTCN-3 code to reproduce
Following T...Original Bugzilla bug written by Pau Espin Pedrol:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=574469
## Summary
CROSSTAG(OTHERWISE) one 1 field union generates incorrect C++ code
## Steps and/or TTCN-3 code to reproduce
Following TTCN3 code compiles fine, but generates incorrect C++ code:
~~~
type union PCUIF_ContainerMsgUnion {
octetstring other
} with { variant "" };
type record PCUIF_container {
uint8_t msg_type,
uint8_t spare,
uint16_t len,
PCUIF_ContainerMsgUnion u
} with {
variant (len) "LENGTHTO(u)"
variant (u) "CROSSTAG(
other, OTHERWISE)"
};
~~~
Then when C++ code is compiled:
~~~
g++ -c -DLINUX -DMAKEDEPEND_RUN -DUSE_SCTP -DLKSCTP_MULTIHOMING_ENABLED -I/usr/ttcn3/include -fPIC -o RSL_Emulation.o RSL_Emulation.cc
PCUIF_Types.cc: In member function ‘int PCUIF__Types::PCUIF__container::RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean, int, boolean, const RAW_Force_Omit*)’:
PCUIF_Types.cc:31342:3: error: ‘else’ without a previous ‘if’
31342 | else selected_field = 0;
| ^~~~
~~~
So it seems the TTCN3->C++ compiler is missing checking specific cases where the union (or the CROSSTAG) has only 1 OTHERWISE option.
Rationale for TTCN3 code shown above:
I wrote that TTCN3 code since I'm implementing the container layer without having yet any specific message in top of it specified, which will come later. Hence I wanted to have some octetstring on top to send random data to test only up to the container layer, while leaving the TTCN3 records prepared to add new container payload data in the future.
## Titan version
6.6.1
/cc @aknappqwtAdam KnappAdam Knapp2021-11-09https://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/702integer is not treated as integer: The union type LENGTHTO field must contain...2023-11-15T09:56:50ZGábor Szalaiinteger is not treated as integer: The union type LENGTHTO field must contain only integer, bitstring or octetstring fields## Summary
the
type integer INT1
is not identified as integer
## Steps and/or TTCN-3 code to reproduce
```
module proba {
type union my_attribute_length {
INT1 short_length,
LIN2_BO_LAST extended_length
}
type record my_a...## Summary
the
type integer INT1
is not identified as integer
## Steps and/or TTCN-3 code to reproduce
```
module proba {
type union my_attribute_length {
INT1 short_length,
LIN2_BO_LAST extended_length
}
type record my_attribute {
my_attribute_length attribute_length,
octetstring attribute_value
} with {
variant (attribute_length) "LENGTHTO(attribute_value)"
}
type integer INT1 (0..255) with { variant "FIELDLENGTH(8)" };
type integer LIN2_BO_LAST (0..65535) with { variant "FIELDLENGTH(16), COMP(nosign), BYTEORDER(last)" };
} with {
encode "RAW"
}
```
## What is the current bug behavior?
proba.ttcn:8.6-11.1: error: The union type LENGTHTO field must contain only integer, bitstring or octetstring fields
proba.ttcn:8.6-11.1: error: The union type LENGTHTO field must contain only integer, bitstring or octetstring fields
## What is the expected correct behavior?
no error
## Relevant logs and/or screenshots
The
```
type union my_attribute_length {
integer short_length,
integer extended_length
} with {
variant (short_length) "FIELDLENGTH(8)"
variant (extended_length) "FIELDLENGTH(16), COMP(nosign), BYTEORDER(last)"
}
```
compiled correctly
/cc @aknappqwt @mmagyariAdam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/701AtNotation issue causing problems in BER and OER decoding2023-11-15T09:56:55ZAdam KnappAtNotation issue causing problems in BER and OER decodingDear Support,
I got an issue while decoding a COER packet encoded by TITAN COER codec.
I attached the sample project to illustrate the issue. The error is:
hello_world.ttcn:211: Dynamic test case error: Unbound left operand of integer c...Dear Support,
I got an issue while decoding a COER packet encoded by TITAN COER codec.
I attached the sample project to illustrate the issue. The error is:
hello_world.ttcn:211: Dynamic test case error: Unbound left operand of integer comparison.
It is linked ASN.1 files provided by IEEE 1609.2, IEEE 1609.2.1 and ETSI 103 759.
Many thanks in advanced for your support,
Best Regards,
Yann Garcia
The issue originates from this forum topic: https://www.eclipse.org/forums/index.php/t/1112887/Adam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/700Compilation issue in getter/setter functions2023-11-15T09:57:00ZBotond BaranyiCompilation issue in getter/setter functionsThe 'is_in_getter_scope' and 'is_in_setter_scope' functions don't compile on Alpine Linux.
See https://www.eclipse.org/forums/index.php/t/1113087/The 'is_in_getter_scope' and 'is_in_setter_scope' functions don't compile on Alpine Linux.
See https://www.eclipse.org/forums/index.php/t/1113087/Botond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/699Uncompilable generated code2023-11-15T09:57:06ZGábor SzalaiUncompilable generated code## Summary
The TITAN generates uncompilable code from the ASN.1 file
## Steps and/or TTCN-3 code to reproduce
Try to compile the generated code
## What is the current bug behavior?
error: redeclaration of ‘size_t pos’
size_t pos = p...## Summary
The TITAN generates uncompilable code from the ASN.1 file
## Steps and/or TTCN-3 code to reproduce
Try to compile the generated code
## What is the current bug behavior?
error: redeclaration of ‘size_t pos’
size_t pos = p_buf.get_pos();
^~~
error: redeclaration of ‘OER_struct tmp_oer’
OER_struct tmp_oer;
^~~~~~~
## Titan version
Latest
/cc @aknappqwt @mmagyariAdam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/697gcc 4.8 compatibility issue2023-05-16T10:53:28ZGábor Szalaigcc 4.8 compatibility issue## Summary
(C++) Communication.cc
In file included from /usr/include/c++/4.8/unordered_map:35:0,
from Fd_And_Timeout_User.hh:27,
from Communication.cc:47:
/usr/include/c++/4.8/bits/c++0x_warning.h...## Summary
(C++) Communication.cc
In file included from /usr/include/c++/4.8/unordered_map:35:0,
from Fd_And_Timeout_User.hh:27,
from Communication.cc:47:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^
In file included from Communication.cc:47:0:
Fd_And_Timeout_User.hh:125:10: error: 'unordered_map' in namespace 'std' does not name a type
static std::unordered_map<int,Data> items;
^
Fd_And_Timeout_User.hh: In static member function 'static boolean FdMap::findInItems(int)':
Fd_And_Timeout_User.hh:112:12: error: 'items' was not declared in this scope
return items.find(fd)!=items.end();
^
/cc @aknappqwt @mmagyariGábor SzalaiGábor Szalaihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/696Extension additions of a SEQUENCE/SET are not set to optional2023-09-06T12:59:16ZAdam KnappExtension additions of a SEQUENCE/SET are not set to optional## Summary
According to the ASN.1 standard, "All fields in extension additions of a SEQUENCE type or a SET type shall be transformed to optional fields". This behavior is missing currently.
Originates from this forum post: https://www....## Summary
According to the ASN.1 standard, "All fields in extension additions of a SEQUENCE type or a SET type shall be transformed to optional fields". This behavior is missing currently.
Originates from this forum post: https://www.eclipse.org/forums/index.php/t/1112865/
## Titan version
All
## Platform details (OS type and version)
All
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/694Template initialization error2023-11-15T09:57:11ZLenard NagyTemplate initialization error## Summary
Original Titan Forum article:
https://www.eclipse.org/forums/index.php/t/1112705/
## Steps and/or TTCN-3 code to reproduce
[proba.ttcn](/uploads/2ce1c6fbbf9f5d026872aab8755fdd7e/proba.ttcn)
## What is the current bug behav...## Summary
Original Titan Forum article:
https://www.eclipse.org/forums/index.php/t/1112705/
## Steps and/or TTCN-3 code to reproduce
[proba.ttcn](/uploads/2ce1c6fbbf9f5d026872aab8755fdd7e/proba.ttcn)
## What is the current bug behavior?
Compiler crash
## Titan version
8.3.0
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/692xsd2ttcn: include doesn't copy import statements2023-05-16T10:53:32ZBotond Baranyixsd2ttcn: include doesn't copy import statementsWhen generating code for an 'include' statement from an XSD, the xsd2ttcn tool doesn't copy 'import' statements from the included schema. This is needed, since the elements/types in the included schema may depend on other types from the ...When generating code for an 'include' statement from an XSD, the xsd2ttcn tool doesn't copy 'import' statements from the included schema. This is needed, since the elements/types in the included schema may depend on other types from the imported schema.
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/689Type compatibility issue for union templates2023-05-16T10:53:36ZBotond BaranyiType compatibility issue for union templates## Summary
Conversion between two templates of two different union types, that are compatible with each other, fails at runtime (RT2 only).
This issue was originally posted on the Eclipse forums: https://www.eclipse.org/forums/index.php...## Summary
Conversion between two templates of two different union types, that are compatible with each other, fails at runtime (RT2 only).
This issue was originally posted on the Eclipse forums: https://www.eclipse.org/forums/index.php/t/1112510/
## Steps and/or TTCN-3 code to reproduce
See example in the forum post.
## What is the current bug behavior?
Dynamic test case error during conversion.
## What is the expected correct behavior?
Successful conversion.
## Relevant logs and/or screenshots
See forum post.
## Possible fixes
Update the union template conversion function generator.
## Titan version
8.3.0
## Platform details (OS type and version)
Any
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/688ASN.1 Information Objects parsing error2023-05-16T10:53:38ZDenis FilatovASN.1 Information Objects parsing error## Summary
The ASN.1 compiler doesn't support the _complex_ information objects like
```
Pdu ::= SEQUENCE {
id EXT-TYPE.&extId({Variants}),
content SEQUENCE OF EXT-TYPE.&ExtContent({Variants}{@.id})
}
```
## Steps and/or TTCN...## Summary
The ASN.1 compiler doesn't support the _complex_ information objects like
```
Pdu ::= SEQUENCE {
id EXT-TYPE.&extId({Variants}),
content SEQUENCE OF EXT-TYPE.&ExtContent({Variants}{@.id})
}
```
## Steps and/or TTCN-3 code to reproduce
```
ttcn3_compiler -A test.asn
```
### test.asn:
```
ModuleTestEmpty DEFINITIONS AUTOMATIC TAGS ::= BEGIN
IMPORTS ;
Pdu ::= SEQUENCE {
id EXT-TYPE.&extId({Variants}),
content SEQUENCE OF EXT-TYPE.&ExtContent({Variants}{@.id})
}
EXT-TYPE ::= CLASS {
&extId VarId,
&ExtContent
} WITH SYNTAX {&ExtContent IDENTIFIED BY &extId}
Variants EXT-TYPE ::= {
{NULL IDENTIFIED BY v1},
...
}
VarId ::= INTEGER(0..255)
END
```
[test.asn](/uploads/79f1a9276672df941b8f4481b9fb7cd5/test.asn)
## What is the current bug behavior?
```
ttcn3_compiler.exe -A test.asn
Notify: Parsing ASN.1 module `test.asn'...
Notify: Checking modules...
test.asn: In ASN.1 module `ModuleTestEmpty':
test.asn:5: In type assignment `Pdu':
test.asn:7: In constraint #1 of type `open type':
test.asn:7: error: Type `@ModuleTestEmpty.Pdu.content' is not a SEQUENCE, SET of CHOICE type.
Notify: Error found in the input module. Code will not be generated.
```
## What is the expected correct behavior?
Code should be generated
## Relevant logs and/or screenshots
See above
## Titan version
```
TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor
Version: 8.3.0
Build date: Jan 26 2023 09:02:42
Compiled with: GCC 11.3.0
Using OpenSSL 1.1.1s 1 Nov 2022
Commit id: a4679583a
```
## Platform details (OS type and version)
Windows 10+Cygwin)
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/687initialization of @lazy and @fuzzy variables can be done by functions having ...2023-11-15T09:57:22ZLevente Erősinitialization of @lazy and @fuzzy variables can be done by functions having inout and out parameters## Summary
The condition in the title is not allowed according to Restriction e) in Section 11.1 of the TTCN-3 standard. Titan however, allows this.
## Steps and/or TTCN-3 code to reproduce
```
function noinoutps() return integer{
v...## Summary
The condition in the title is not allowed according to Restriction e) in Section 11.1 of the TTCN-3 standard. Titan however, allows this.
## Steps and/or TTCN-3 code to reproduce
```
function noinoutps() return integer{
var integer i:=2;
var integer j;
inoutps(i,j);
return 2;
}
function inoutps(inout integer i, out integer j) return integer{
j:=i;
i:=3;
return 3;
}
testcase fuzzy_lazy_ass() runs on ct_empty{
var integer i:=2;
var integer j;
var @lazy integer lv;
@try{
lv := inoutps(i,j);
}@catch(msg){
setverdict(pass);
}
var @lazy integer lv2 := noinoutps();
i:=2;
var @fuzzy integer fv;
@try{
fv := inoutps(i,j);
}@catch(msg){
setverdict(pass);
}
var @fuzzy integer fv2 := noinoutps();
}
```
## What is the current bug behavior?
The testcase has a none verdict.
## What is the expected correct behavior?
The testcase shall have a pass verdict (due to the problematic initializations -- with inoutps running into an error). That is, using ```inoutps(i,j)``` for initializing variables lv and fv shall cause an error.
## Relevant logs and/or screenshots
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/686@lazy and @fuzzy modifiers are not working properly in Titan2023-11-15T09:57:27ZLevente Erős@lazy and @fuzzy modifiers are not working properly in Titan## Summary
According to Section 11.0 of the TTCN-3 standard a lazy variable shall be evaluated when it is first referenced after its value assignment, and shall keep its value until its next value assignment. A fuzzy variable shall be e...## Summary
According to Section 11.0 of the TTCN-3 standard a lazy variable shall be evaluated when it is first referenced after its value assignment, and shall keep its value until its next value assignment. A fuzzy variable shall be evaluated each time it is referenced after its value assignment. Titan however, evaluates lazy and fuzzy variables right at their value assignments.
## Steps and/or TTCN-3 code to reproduce
```
module variables {
type component ct_empty{}
testcase lazyeval() runs on ct_empty{
var integer i := 5;
var @lazy integer l := i;
i := 6;
if(l==6){setverdict(pass);}else{setverdict(fail);}
i := 7;
if(l==6){setverdict(pass);}else{setverdict(fail);}
var float n := 1.0;
var float d := 0.0;
var @lazy float f := n/d;
//shall not cause error as it's not evaluated
}
testcase fuzzyeval() runs on ct_empty{
var integer i := 5;
var @fuzzy integer l := i;
i := 6;
if(l==6){setverdict(pass);}else{setverdict(fail);}
i := 7;
if(l==7){setverdict(pass);}else{setverdict(fail);}
var @fuzzy integer v_fuzzy := 1;
var integer v_var;
var boolean v_condition := true;
if (v_condition) {
var integer v_local := 0;
v_fuzzy := v_local;
v_local := 10;
}
if(v_fuzzy==10){setverdict(pass);}else{setverdict(fail);}
}
control{
execute(lazyeval());
execute(fuzzyeval());
}
}
```
## What is the current bug behavior?
lazy test case causes error (and would not pass without the division by zero). The fuzzy test case fails too.
## What is the expected correct behavior?
Both test cases shall pass
## Relevant logs and/or screenshots
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyarihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/685Referencing null field does not result in error2023-11-15T09:57:33ZLevente ErősReferencing null field does not result in error## Summary
According to point c) of Section 10 of the TTCN-3 standard, referencing a null field value using dot or index notation shall result in an error. Titan however, does not work accordingly.
## Steps and/or TTCN-3 code to reprod...## Summary
According to point c) of Section 10 of the TTCN-3 standard, referencing a null field value using dot or index notation shall result in an error. Titan however, does not work accordingly.
## Steps and/or TTCN-3 code to reproduce
```
type record defrecord{
default f
}
type record of default defvector;
const defrecord cdr := {null}
const defvector cdv := {null, null}
testcase null_field_constant() runs on ct_empty{
log(cdr.f);
log(cdv[0]);
setverdict(pass);
}
```
## What is the current bug behavior?
Test case passes.
## What is the expected correct behavior?
Test case shall run into an error.
## Relevant logs and/or screenshots
2023/Jan/27 06:39:24.007471 USER - null
2023/Jan/27 06:39:24.007533 USER - null
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyarihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/683Fully unitialized constants are allowed by Titan2023-11-15T09:57:38ZLevente ErősFully unitialized constants are allowed by Titan## Summary
According to Section 10 point d) of the TTCN-3 standard, "The right-hand side of the assignment that initializes a constant shall evaluate to an object that is at least partially initialized."
## Steps and/or TTCN-3 code to ...## Summary
According to Section 10 point d) of the TTCN-3 standard, "The right-hand side of the assignment that initializes a constant shall evaluate to an object that is at least partially initialized."
## Steps and/or TTCN-3 code to reproduce
```
type record myRecord{
integer field1,
charstring field2 optional,
integer field3
}
type record mymultirecord{
myRecord A,
myRecord B
}
type record of integer roi;
testcase partly_init_constants() runs on ct_empty{
const mymultirecord cr := {A := {field1 := 1, field2 := -, field3 := -}, B := -};
const mymultirecord ct := {A := -, B := -}; //should cause an error
const roi iro := {}; //should cause an error
setverdict(pass);
}
```
## What is the current bug behavior?
The test case passes.
## What is the expected correct behavior?
The indicated lines shall cause an error, as those constants are not even partially initialized (they have unbound fields).
## Relevant logs and/or screenshots
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/681Clashing enumerated identifiers unrecognized by Titan2023-11-15T09:57:46ZLevente ErősClashing enumerated identifiers unrecognized by Titan## Summary
According to sections 6.2.4 and 8.2.3.1 of the TTCN-3 standard, the identifier of a data element with an enumerated type cannot be identical to any element of the domain of the given enumerated type. For example, in the below...## Summary
According to sections 6.2.4 and 8.2.3.1 of the TTCN-3 standard, the identifier of a data element with an enumerated type cannot be identical to any element of the domain of the given enumerated type. For example, in the below example enumY cannot be the identifier of a MyEnumType variable for the following reason: When assigning enumY as the value of another MyEnumType variable enumW, it is ambiguous whether the value of variable enumY (which is enumX) or the emunerated domain value enumY is intended to be assigned to enumW.
## Steps and/or TTCN-3 code to reproduce
```
import from A all;
const MyEnumType2 enumX := enumY;// this is allowed as MyEnumtype2 does not contain enumX
testcase clashing_enum_value() runs on ct_empty{
var MyEnumType enumY := enumX; // this is not allowed as enumerated values restrict global names (see clause 6.2.4)
var MyEnumType enumW := enumY;
var MyEnumType enumZ;
enumZ := enumX; // allowed as MyEnumType does not contain enumZ and also, enumX resolves to domain element of type MyEnumType
//enumZ := modules.enumX; //ERROR but due to this resolving to local constant enumX, which is the expected behavior
setverdict(pass);
}
```
```
module A {
friend module modules;
type enumerated MyEnumType {enumX, enumY}
type enumerated MyEnumType2 {enumY, enumZ}
}
```
## What is the current bug behavior?
pass
## What is the expected correct behavior?
error
## Relevant logs and/or screenshots
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyarihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/680OOP: using class method return value as external function parameter2023-05-16T10:53:40ZBotond BaranyiOOP: using class method return value as external function parameterThe use of return values of class methods as actual parameters of external functions is not handled correctly by the compiler.
In the example below a class method returning a template is passed to a parameter expecting a value. This is n...The use of return values of class methods as actual parameters of external functions is not handled correctly by the compiler.
In the example below a class method returning a template is passed to a parameter expecting a value. This is not caught at compile-time, and it causes a C++ compilation error.
```
type record of integer IntList
with {
encode "JSON";
}
external function f_enc_il(in IntList x) return octetstring
with { extension "prototype(convert) encode(JSON)" }
type class ExampleClass {
private template IntList t := { 0, 1, 2, 3 }
public function get_list() return template IntList { return t; }
}
function test() {
var ExampleClass x := ExampleClass.create;
var octetstring res := f_enc_il(x.get_list()); // C++ compilation error
}
```
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/678importing imports does not work2023-11-15T09:57:56ZLevente Erősimporting imports does not work## Summary
The mechanism defined in Section 8.2.3.7 of the TTCN-3 standard for importing import statements does not work.
## Steps and/or TTCN-3 code to reproduce
In one module
```
import from chain1 {import all};
testcase importimpo...## Summary
The mechanism defined in Section 8.2.3.7 of the TTCN-3 standard for importing import statements does not work.
## Steps and/or TTCN-3 code to reproduce
In one module
```
import from chain1 {import all};
testcase importimport() runs on ct_empty{
// log(chain2const); //ERROR
// log(chain32const); //ERROR
log(chain33const); //should work
}
```
Furthermore the following modules are needed:
```
module chain1 {
private import from chain2 {import all}; //importing module does not see chain2const
import from chain22 {import all}; //importing module does not see chain32const
public import from chain23 {import all}; //importing module does see chain33const
}
```
```
module chain2 {
import from chain3 all;
}
```
```
module chain22 {
import from chain32 all;
}
```
```
module chain23 {
import from chain33 all;
}
```
```
module chain3 {
const integer chain2const := 1;
}
```
```
module chain32 {
const integer chain32const := 1;
}
```
```
module chain33 {
const integer chain33const := 1;
}
```
## What is the current bug behavior?
chain33const is not seen in the main module.
## What is the expected correct behavior?
chain33const shoulw be seen in the main module while the commented-out two constants should not be seen.
## Relevant logs and/or screenshots
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyari