Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ctrl+c exception #689

Open
rumpelsepp opened this issue Feb 28, 2025 · 0 comments
Open

ctrl+c exception #689

rumpelsepp opened this issue Feb 28, 2025 · 0 comments

Comments

@rumpelsepp
Copy link
Member

Catched during running the bats test during developing #688 and randomly hitting ctrl+c; this seems to be a bug that is not related to the changes in #688.

./tests/bats/run_bats.sh
001-invocation.bats
 ✓ invoke gallia without parameters
 ✓ invoke gallia without config
 ✓ invoke gallia with config
 ✓ invoke gallia -h
 ✓ invoke hr -h
 ✓ invoke netzteil -h
 ✓ invoke cursed-hr -h
002-scans.bats
 ✓ scan services
 ✓ scan services with database
1|gallia.commands.scan.uds.services.ServicesScanner|{"init_kwargs":null,"verbose":0,"volatile_info":true,"trace_log":false,"pre_hook":null,"post_hook":null,"hooks":true,"lock_file":null,"db":"test_scan_services_with_database.sqlite","artifacts_dir":null,"artifacts_base":"/tmp/gallia","dumpcap":false,"target":"unix-lines:///tmp/vecu.sock","power_supply":null,"power_cycle":false,"power_cycle_sleep":5.0,"ecu_reset":1,"oem":"default","timeout":2.0,"max_retries":3,"ping":true,"tester_present_interval":0.5,"tester_present":true,"properties":true,"compare_properties":true,"sessions":[1,2],"check_session":true,"scan_response_ids":false,"auto_reset":false,"skip":{}}|1740754456.24712|CET||||/tmp/gallia/services_scanner/run-20250228-155416.242152|0
 ✓ scan sessions
 ✓ scan sessions thorough
 ✓ scan identifiers sid 0x22
 ✓ scan identifiers sid 0x2e
 ✓ scan identifiers sid 0x31
 ✗ scan reset
   (in test file tests/bats/002-scans.bats, line 1)
     `#!/usr/bin/env bats' failed with status 130
   Feb 28 15:54:27.402 gallia.command.uds: ECUReset failed: subFunctionNotSupported
   Feb 28 15:54:27.402 gallia.command.uds: Switching to default session
   Feb 28 15:54:27.404 gallia.command.uds: ECUReset in session 0x01 failed: subFunctionNotSupported
Feb 28 15:54:27.913 gallia.commands.scan.uds.reset [result]: 0x03: reset level found!
Feb 28 15:54:28.420 gallia.commands.scan.uds.reset: Could not reboot ECU after testing reset level 0x03
Feb 28 15:54:28.447 gallia.commands.scan.uds.reset [result]: 0x18: reset level found!
Feb 28 15:54:28.791 gallia.command.base: Stored artifacts at /tmp/gallia/reset_scanner/run-20250228-155427.395454
Traceback (most recent call last):and.base: Syncing log files…
     File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
       return self._loop.run_until_complete(task)
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
     File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
       return future.result()
              ~~~~~~~~~~~~~^^
     File "/home/steff/Projects/work/gallia/src/gallia/command/base.py", line 346, in entry_point
       exit_code = await self.run()
                   ^^^^^^^^^^^^^^^^
     File "/home/steff/Projects/work/gallia/src/gallia/command/base.py", line 424, in run
       await self.main()
     File "/home/steff/Projects/work/gallia/src/gallia/commands/scan/uds/reset.py", line 47, in main
       if not await self.perform_scan():
              ^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/steff/Projects/work/gallia/src/gallia/commands/scan/uds/reset.py", line 111, in perform_scan
       await self.ecu.wait_for_ecu()
     File "/home/steff/Projects/work/gallia/src/gallia/services/uds/ecu.py", line 350, in wait_for_ecu
       await asyncio.wait_for(self._wait_for_ecu_endless_loop(0.5), timeout=timeout)
     File "/usr/lib/python3.13/asyncio/tasks.py", line 507, in wait_for
       return await fut
              ^^^^^^^^^
     File "/home/steff/Projects/work/gallia/src/gallia/services/uds/ecu.py", line 323, in _wait_for_ecu_endless_loop
       await asyncio.sleep(sleep_time)
     File "/usr/lib/python3.13/asyncio/tasks.py", line 718, in sleep
       return await future
              ^^^^^^^^^^^^
   asyncio.exceptions.CancelledError
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "/home/steff/Projects/work/gallia/.venv/bin/gallia", line 10, in <module>
       sys.exit(main())
                ~~~~^^
     File "/home/steff/Projects/work/gallia/src/gallia/cli/gallia.py", line 314, in main
       parse_and_run(
       ~~~~~~~~~~~~~^
           gallia_commands,
           ^^^^^^^^^^^^^^^^
       ...<6 lines>...
           show_help_on_zero_args=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       )
       ^
     File "/home/steff/Projects/work/gallia/src/gallia/cli/gallia.py", line 187, in parse_and_run
       sys.exit(asyncio.run(get_command(config).entry_point()))
                ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run
       return runner.run(main)
              ~~~~~~~~~~^^^^^^
     File "/usr/lib/python3.13/asyncio/runners.py", line 123, in run
       raise KeyboardInterrupt()
   KeyboardInterrupt

   Received SIGINT, aborting ...

   bats warning: Executed 15 instead of expected 37 tests

37 tests, 1 failure, 22 not run

./tests/bats/run_bats.sh: line 1: kill: 1028519
1028521: arguments must be process or job IDs
./tests/bats/run_bats.sh: line 1: kill: 1028519
1028521: arguments must be process or job IDs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant