codechecker icon indicating copy to clipboard operation
codechecker copied to clipboard

Cannot use `store` on Windows

Open Wraiyth opened this issue 7 months ago • 0 comments

Describe the bug Reports that have been created on Windows cannot be uploaded using codechecker store.

The error that occurs is as follows:

Process SpawnPoolWorker-1:
Traceback (most recent call last):
  File "c:\users\modio\appdata\local\programs\python\python38\lib\site-packages\multiprocess\process.py", line 315, in _bootstrap
    self.run()
  File "c:\users\modio\appdata\local\programs\python\python38\lib\site-packages\multiprocess\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "c:\users\modio\appdata\local\programs\python\python38\lib\site-packages\multiprocess\pool.py", line 114, in worker
    task = get()
  File "c:\users\modio\appdata\local\programs\python\python38\lib\site-packages\multiprocess\queues.py", line 361, in get
    return _ForkingPickler.loads(res)
  File "c:\users\modio\appdata\local\programs\python\python38\lib\site-packages\dill\_dill.py", line 303, in loads
    return load(file, ignore, **kwds)
  File "c:\users\modio\appdata\local\programs\python\python38\lib\site-packages\dill\_dill.py", line 289, in load
    return Unpickler(file, ignore=ignore, **kwds).load()
  File "c:\users\modio\appdata\local\programs\python\python38\lib\site-packages\dill\_dill.py", line 444, in load
    obj = StockUnpickler.load(self)
  File "c:\users\modio\appdata\local\programs\python\python38\lib\site-packages\dill\_dill.py", line 434, in find_class
    return StockUnpickler.find_class(self, module, name)
ModuleNotFoundError: No module named 'store'

I know that windows is not officially supported, but the change that seemingly caused this was introduced with https://github.com/Ericsson/codechecker/pull/4118

Reverting this change and not passing executor.map seems to resolve the issue.

Outside of that, the use of signal.SIGUSR1 in _timeout_watchdog is not supported on Windows. Switching this to SIGTERM (or some other signal that is valid on Windows) seems to resolve these issues.

That at least gets store running without errors, but I suspect that this fix doesn't actually resolve things. store succeeds, but then when I view the results in the server, it shows nothing actually being reported, even though the store summary shows there should be something

Number of analyzer reports | 136

image

I can store the exact same report from WSL - if I launch WSL and just change the filepaths to in the plist to /mnt/d/bla, it works and displays the errors successfully.

CodeChecker version 6.23.1

To Reproduce Steps to reproduce the behaviour:

  1. Run command 'codechecker analyze' on any codebase
  2. Run codechecker store on the report generated

Expected behaviour The report should be uploaded correctly

Desktop (please complete the following information)

  • OS: Windows
  • Browser: [e.g. Firefox, Chrome]
  • Version: [e.g. 22]

Additional context Add any other context about the problem.

Wraiyth avatar Jul 17 '24 05:07 Wraiyth