ros2 / sros2

tools to generate and distribute keys for SROS 2
Apache License 2.0
90 stars 45 forks source link

:woman_farmer: Windows debug `Windows fatal exception: access violation` build regression #316

Closed claraberendsen closed 4 months ago

claraberendsen commented 4 months ago

Bug report

Required Info:

Steps to reproduce issue

Run a windows debug build on ci.ros2.org.

Expected behavior

For the build to pass unstable

Actual behavior

Build fails

Additional information

Reference build: https://ci.ros2.org/view/nightly/job/nightly_win_deb/3095/ Failing since May 16th. Due to the timing and content of the merged PR we think #311 introduced this build regression.

Error:

04:05:34 test\sros2\commands\security\verbs\test_create_permission.py .           [ 65%]

04:05:34 Windows fatal exception: access violation
04:05:34 
04:05:34 Current thread 0x00002c94 (most recent call first):
04:05:34   File "C:\ci\ws\src\ros2\sros2\sros2\sros2\verb\generate_artifacts.py", line 44 in main
fujitatomoya commented 4 months ago

@mikaelarguedas error message does not give us good information like stack trace, do you have any thoughts?

mikaelarguedas commented 4 months ago

Windows debug :disappointed:, it looks like it's failing in the generate_artifacts verb itself so potentially that command never worked on Windows Debug and was rooted out by the newly added test.

Looks like it fails in this fonction but doesn't tell us where in it.

I dont have a Windows Debug setup to test it in details but I'll have a look

claraberendsen commented 4 months ago

@mikaelarguedas if it's helpful here is the full error message from the reference build. I see in the thread this line File "C:\ci\ws\src\ros2\sros2\sros2\sros2\verb\generate_artifacts.py", line 44 so it might be failing on https://github.com/ros2/sros2/blob/fb22661623426fadcc60804e10a964664330d98e/sros2/sros2/api/_artifact_generation.py#L44 Full Error:

``` 08:05:34 Windows fatal exception: access violation 08:05:34 08:05:34 Current thread 0x00002c94 (most recent call first): 08:05:34 File "C:\ci\ws\src\ros2\sros2\sros2\sros2\verb\generate_artifacts.py", line 44 in main 08:05:34 File "C:\ci\ws\src\ros2\sros2\sros2\sros2\command\security.py", line 36 in main 08:05:34 File "C:\ci\ws\install\Lib\site-packages\ros2cli\cli.py", line 91 in main 08:05:34 File "C:\ci\ws\src\ros2\sros2\sros2\test\sros2\commands\security\verbs\test_generate_artifacts.py", line 111 in test_cli_policies_args 08:05:34 File "C:\Python38\lib\site-packages\_pytest\python.py", line 183 in pytest_pyfunc_call 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_callers.py", line 103 in _multicall 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_manager.py", line 120 in _hookexec 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_hooks.py", line 513 in __call__ 08:05:34 File "C:\Python38\lib\site-packages\_pytest\python.py", line 1641 in runtest 08:05:34 File "C:\Python38\lib\site-packages\_pytest\runner.py", line 162 in pytest_runtest_call 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_callers.py", line 103 in _multicall 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_manager.py", line 120 in _hookexec 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_hooks.py", line 513 in __call__ 08:05:34 File "C:\Python38\lib\site-packages\_pytest\runner.py", line 255 in 08:05:34 File "C:\Python38\lib\site-packages\_pytest\runner.py", line 311 in from_call 08:05:34 File "C:\Python38\lib\site-packages\_pytest\runner.py", line 254 in call_runtest_hook 08:05:34 File "C:\Python38\lib\site-packages\_pytest\runner.py", line 215 in call_and_report 08:05:34 File "C:\Python38\lib\site-packages\_pytest\runner.py", line 126 in runtestprotocol 08:05:34 File "C:\Python38\lib\site-packages\pytest_rerunfailures.py", line 608 in pytest_runtest_protocol 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_callers.py", line 103 in _multicall 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_manager.py", line 120 in _hookexec 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_hooks.py", line 513 in __call__ 08:05:34 File "C:\Python38\lib\site-packages\_pytest\main.py", line 348 in pytest_runtestloop 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_callers.py", line 103 in _multicall 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_manager.py", line 120 in _hookexec 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_hooks.py", line 513 in __call__ 08:05:34 File "C:\Python38\lib\site-packages\_pytest\main.py", line 323 in _main 08:05:34 File "C:\Python38\lib\site-packages\_pytest\main.py", line 269 in wrap_session 08:05:34 File "C:\Python38\lib\site-packages\_pytest\main.py", line 316 in pytest_cmdline_main 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_callers.py", line 103 in _multicall 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_manager.py", line 120 in _hookexec 08:05:34 File "C:\Python38\lib\site-packages\pluggy\_hooks.py", line 513 in __call__ 08:05:34 File "C:\Python38\lib\site-packages\_pytest\config\__init__.py", line 162 in main 08:05:34 File "C:\Python38\lib\site-packages\_pytest\config\__init__.py", line 185 in console_main 08:05:34 File "C:\Python38\lib\site-packages\pytest\__main__.py", line 5 in 08:05:34 File "C:\Python38\lib\runpy.py", line 87 in _run_code 08:05:34 File "C:\Python38\lib\runpy.py", line 194 in _run_module_as_main ```
clalancette commented 4 months ago

I ended up poking at this a bit, and it is a doozy. See #317, which fixes the issue for me locally.