OPEN of SOCKET device previously closed after TPTIMEOUT works correctly
Final Release Note
OPEN of a SOCKET device that was previously closed after a TPTIMEOUT error while in a READ command works correctly. Previously this would abnormally terminate the process with a GTMASSERT2 fatal error. [#348 (closed)]
Description
Below is a test case that demonstrates the issue.
> $ydb_dist/mumps -run soc
%YDB-F-GTMASSERT2, YottaDB r1.22 Linux x86_64 - Assert failed sr_port/iosocket_open.c line 167 for expression (sockwhich_connect == sockintr->who_saved)
> cat soc.m
parent ;
job child
set $ztrap="do ztrap"
set s="socket"
open s:(LISTEN="socket1:LOCAL")::"SOCKET" ; open a listening socket
use s
write /wait ; when this command returns, a connection has been accepted
use s
set $zmaxtptime=1 ; set TPTIME outofband to occur after 1 second inside the read command
tstart ():serial
read x
tcommit
quit
child ;
set s="socket"
open s:(CONNECT="socket1:LOCAL")::"SOCKET"
use s
hang 20 ; hang for longer than $ZMAXTPTIME of parent to make parent go to ztrap (due to tptimeout)
quit
ztrap ;
close s
open s::"SOCKET" ; try open of a socket which had been interrupted
quit
Draft Release Note
OPEN of a SOCKET device that was previously closed after a TPTIMEOUT error while in a READ command works fine. Previously this would abnormally terminate the process with a GTMASSERT2 fatal error.