Project

General

Profile

Actions

Bug #6273

open

TTCN3 tests keep suffering from race conditions on shutdown

Added by daniel 3 months ago. Updated 3 months ago.

Status:
Feedback
Priority:
Normal
Assignee:
Target version:
-
Start date:
11/24/2023
Due date:
% Done:

30%

Spec Reference:

Description

This has come up time and again, we tried various fixes and workarounds, such as (trying to) do "proper" shutdown once a test passes. We brought this up on the TTCN-3 forums, but nothing really came from it, see https://www.eclipse.org/forums/index.php/m/1848572

Rereading that again there was a suggestion of "alive" components:

Also the DTE during the shutdown can be avoided to use alive type components. The test ports of the alive components are not disconnected/unmapped when the component finished only when killed or the MTC terminated.

laforge did we ever try that and conclude it wasn't enough to fix our issues?

Actions #1

Updated by daniel 3 months ago

For reference here is the latest example of such a "failure":

09:08:58.196898 311 - Function f_bssgp_bvc_main was stopped. PTC remains alive and is waiting for next start.
09:08:58.199006 mtc GBProxy_Tests.ttcn:497 PTC with component reference 311 was stopped.
09:08:58.199132 mtc GBProxy_Tests.ttcn:497 Stopping PTC with component reference 314.
09:08:58.199313 314 BSSGP_Emulation.ttcnpp:1355 Stop was requested from MC.
09:08:58.199406 314 BSSGP_Emulation.ttcnpp:1355 Stopping test component execution.
09:08:58.200123 314 - Function f_bssgp_bvc_main was stopped. PTC remains alive and is waiting for next start.
09:08:58.200329 mtc GBProxy_Tests.ttcn:497 PTC with component reference 314 was stopped.
09:08:58.200442 mtc Misc_Helpers.ttcn:32 setverdict(pass): none -> pass reason: ""GBProxy_Tests.ttcn:674 : "", new component reason: ""GBProxy_Tests.ttcn:674 : "" 
09:08:58.200530 mtc Misc_Helpers.ttcn:35 Stopping testcase execution from "GBProxy_Tests.ttcn":674
09:08:58.200586 mtc Misc_Helpers.ttcn:40 Stopping all components.
09:08:58.200769 260 NS_Emulation.ttcnpp:1035 Kill was requested from MC.
09:08:58.200774 255 IPA_Emulation.ttcnpp:734 Kill was requested from MC.
[...]
09:08:58.216540 296 FrameRelay_Emulation.ttcn:395 Kill was requested from MC.
09:08:58.216599 296 FrameRelay_Emulation.ttcn:395 Terminating test component execution.
09:08:58.216760 290 NS_Emulation.ttcnpp:1035 Kill was requested from MC.
09:08:58.216816 290 NS_Emulation.ttcnpp:1035 Terminating test component execution.
09:08:58.216933 315 FrameRelay_Emulation.ttcn:424 Receive operation on port FR succeeded, message from system(): @FrameRelay_Types.FrameRelayFrame : { hdr := { dlci := 23, c_r := false, fecn := false, becn := false, de := false }, payload := '0B'O ("\v") } id 38
09:08:58.216998 315 FrameRelay_Emulation.ttcn:424 Message with id 38 was extracted from the queue of FR.
09:08:58.217046 315 FrameRelay_Emulation.ttcn:431 Sent on CLIENT to GbProxy_Test-NS(PCU[2])-NSVCI8-NSVCemu8-provFR(313) @FrameRelay_Types.FrameRelayFrame : { hdr := { dlci := 23, c_r := false, fecn := false, becn := false, de := false }, payload := '0B'O ("\v") }
09:08:58.217100 315 FrameRelay_Emulation.ttcn:431 Dynamic test case error: Sending data on the connection of port CLIENT to 313:FR failed. (Broken pipe)
09:08:58.217193 315 FrameRelay_Emulation.ttcn:431 setverdict(error): none -> error
09:08:58.217281 315 FrameRelay_Emulation.ttcn:431 Performing error recovery.
09:08:58.217990 315 - Function main finished with an error. PTC terminates.

First we setverdict(pass) and stop testcase execution. Then shortly after when some components are shut down and others still running an outside message or timer in one of our still running components triggers a message on a port that is not connected anymore/where the target component is shut down. This results in a Dynamic test case error.

Actions #2

Updated by daniel 3 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 30

Let's see if the gbproxy tests still fail after https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35228 has now been merged.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)