-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Describe the bug
sinol-make run kończy się błędem:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.12/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/parys/.venvs/sinol-make/lib/python3.12/site-packages/sinol_make/commands/run/__init__.py", line 364, in compile
compile.compile(source_file, output, self.compilers, compile_log, self.args.compile_mode,
File "/home/parys/.venvs/sinol-make/lib/python3.12/site-packages/sinol_make/helpers/compile.py", line 50, in compile
compiled_exe = check_compiled(program, compilation_flags, use_fsanitize)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/parys/.venvs/sinol-make/lib/python3.12/site-packages/sinol_make/helpers/cache.py", line 45, in check_compiled
info = get_cache_file(file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/parys/.venvs/sinol-make/lib/python3.12/site-packages/sinol_make/helpers/cache.py", line 25, in get_cache_file
return CacheFile.from_dict(data)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/parys/.venvs/sinol-make/lib/python3.12/site-packages/sinol_make/structs/cache_structs.py", line 79, in from_dict
time_limit=v["time_limit"],
~^^^^^^^^^^^^^^
KeyError: 'time_limit'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/parys/.venvs/sinol-make/lib/python3.12/site-packages/sinol_make/__init__.py", line 100, in main
main_exn()
File "/home/parys/.venvs/sinol-make/lib/python3.12/site-packages/sinol_make/__init__.py", line 87, in main_exn
command.run(args)
File "/home/parys/.venvs/sinol-make/lib/python3.12/site-packages/sinol_make/commands/run/__init__.py", line 980, in run
results, all_results = self.compile_and_run(solutions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/parys/.venvs/sinol-make/lib/python3.12/site-packages/sinol_make/commands/run/__init__.py", line 486, in compile_and_run
compilation_results = self.compile_solutions(solutions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/parys/.venvs/sinol-make/lib/python3.12/site-packages/sinol_make/commands/run/__init__.py", line 333, in compile_solutions
compilation_results = pool.starmap(self.compile, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/multiprocessing/pool.py", line 375, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/multiprocessing/pool.py", line 774, in get
raise self._value
KeyError: 'time_limit'
Sprawdziłem gdzie tego klucza brakuje i widzę, że plik .cache/md5sums/rpk1.cpp kończy się w taki sposób:
4fa94993d7554bf151af61ee19de9ba4:
memory_limit: 524288
result:
Cmdline: '"/home/parys/.local/bin/sio2jail" -f 3 --mount-namespace off --pid-namespace
off --uts-namespace off --ipc-namespace off --net-namespace off --capability-drop
off --user-namespace off --instruction-count-limit 20000M --rtimelimit 161000ms
--memory-limit 524288K --output-limit 51200K --output oiaug --stderr -- "/home/parys/o2/wer/rozwiazanie-pokojowe/.cache/executables/rpk1.cpp.e"
3> "/home/parys/o2/wer/rozwiazanie-pokojowe/.cache/executions/rpk1.cpp/8w.res"'
Comment: ''
Error: null
ExitSignal: 0
Fail: false
Memory: 6488
Points: 100.0
Status: OK
Stderr: []
Time: 1
time_limit: 10000
time_tool: sio2jail
51481176d3dff44e7ae4329c36b938e9:
memory_limit: 524288
result:
Cmdline:
czyli jest ucięty - zapewne w wyniku wciśnięcia Ctrl-C przy poprzednim uruchomieniu.
To Reproduce
- Jak mam ten ucięty plik cache, to wystarczy wykonać
sinol-make run
- Nie umiem celowo wyprodukować takiego uciętego pliku - zapewne wymaga wciśnięcia Ctrl-C akurat w trakcie jego tworzenia.
Expected behavior
Fajnie gdyby sinol-make usuwał taki ucięty plik cache, zamiast się wykrzaczać. Albo przynajmniej wypisywał jakiś sensowny błąd "błąd przy wczytywaniu pliku [nazwa_pliku]" - to by wystarczyło. Chwilę mi zajęło zanim zrozumiałem, że trzeba ręcznie ten cache usunąć.
Metadata
Metadata
Assignees
Labels
No labels