Sometimes execution hangs after reports being generated and doesn't exit until aborted

Sometimes execution hangs after reports being generated and doesn’t exit until aborted
robotframework version - 5.0.1
python 3.10.7
platform - windows server 2019

14:07:45 ------------------------------------------------------------------------------ 14:07:45 RobotFrameworkSVG.TestCases.HO.HO :: IODT HO | PASS | 14:07:45 1 test, 1 passed, 0 failed 14:07:45 ============================================================================== 14:07:45 RobotFrameworkSVG.TestCases.HO | PASS | 14:07:45 1 test, 1 passed, 0 failed 14:07:45 ============================================================================== 14:07:45 RobotFrameworkSVG.TestCases | PASS | 14:07:45 1 test, 1 passed, 0 failed 14:07:45 ============================================================================== 14:07:45 RobotFrameworkSVG | PASS | 14:07:45 1 test, 1 passed, 0 failed 14:07:45 ============================================================================== 14:07:45 Debug: C:\jenkins\workspace\RobotFrameworkSVG\debugfile.txt 14:07:45 Output: \\192.168.127.231\AutomationResults\old_runs\ASIL-SATURN\7122\results\results_SIR-44201\output.xml 14:07:51 Log: \\192.168.127.231\AutomationResults\old_runs\ASIL-SATURN\7122\results\results_SIR-44201\log.html **14:07:51** Report: \\192.168.127.231\AutomationResults\old_runs\ASIL-SATURN\7122\results\results_SIR-44201\report.html **15:27:17** Build was aborted

End of debugfile:

`20220919 14:07:45.097 - INFO - ±------- END KEYWORD: RobotFrameworkSVGInfra.ElasticSearchPackage.ElasticSearchReporter.Create Execution (171)
20220919 14:07:45.097 - INFO - ±------ END TRY: (172)
20220919 14:07:45.097 - INFO - ±------ START EXCEPT:
20220919 14:07:45.098 - INFO - ±------- START KEYWORD: RobotLogs.Infra Log [ Create Execution failed ]
20220919 14:07:45.098 - INFO - ±------- END KEYWORD: RobotLogs.Infra Log (0)
20220919 14:07:45.098 - INFO - ±------ END EXCEPT: (1)
20220919 14:07:45.098 - INFO - ±----- END TRY/EXCEPT ROOT: (173)
20220919 14:07:45.099 - INFO - ±----- START KEYWORD: RobotFrameworkSVGInfra.ResetAllObjects.ObjectsKiller.Kill Objects
20220919 14:07:45.099 - INFO - ±----- END KEYWORD: RobotFrameworkSVGInfra.ResetAllObjects.ObjectsKiller.Kill Objects (0)
20220919 14:07:45.099 - INFO - ±---- END TEARDOWN: TestTearDown.Create Test Results Execution (447760)

20220919 14:07:45.100 - INFO - ±— END TEST: Handovers SVGA-21135: SIR-44201 - Xn Inter Frequency Handover by Iperf 1 UEs - 15 Min (4118498)

20220919 14:07:45.102 - INFO - ±-- END SUITE: RobotFrameworkSVG.TestCases.HO.HO (4125012)

20220919 14:07:45.104 - INFO - ±- END SUITE: RobotFrameworkSVG.TestCases.HO (4125018)

20220919 14:07:45.105 - INFO - ± END SUITE: RobotFrameworkSVG.TestCases (4125021)

20220919 14:07:45.106 - INFO - + END SUITE: RobotFrameworkSVG (4125062)
==============================================================================`

We running robot with:
p = subprocess.Popen(command, shell=True)
p.wait(timeout)

typically execution hang means that:

  1. you have started a process and its still running.
  2. you have open file handles that are not closed
  3. you have started a process and its output havent been “read” untill the whole output buffer’s end.

And these happen particularry in windows.

For scenario 1. I’ve had issues with certain applications that spawn child processes … Normal Robot Framework process stopping did not kill the child processes and i had to come up with my own keyword: robotframework-seleniumtestability/__init__.py at master · MarketSquare/robotframework-seleniumtestability · GitHub

Do check against any of these ?

1 Like

Hi,
i also run into this Problem but I dont have any processes started or similair. Did you come up with a solution?

Recently noticed that on windows – if you have the existing report.html or log.html open in (at least) Edge browser - edge will lock that html file and RF keeps waiting before the browser or that particular tab is closed …