Open sylvestre opened 4 years ago
@sylvestre Could you please run your store command in debug mode (--verbose debug
) and send us your output.
I did it and it took more than 13h to get this error:
[DEBUG][2020-05-25 07:52:04] {system} [15707] <140713747179328> - store.py:366 assemble_zip() - Copying file '/var/lib/jenkins/workspace/firefox-codechecker/codechecker-results/DecryptJob.cpp_clang-tidy_9ee326367450416a9885397e67a737f1.plist' to ZIP assembly dir...
[INFO][2020-05-25 08:09:14] {system} [15707] <140713747179328> - store.py:646 main() - Storage failed: Can't close the ZIP file while there is an open writing handle on it. Close the writing handle before closing the zip.
Exception ignored in: <function ZipFile.__del__ at 0x7ffa7842fea0>
Traceback (most recent call last):
File "/usr/lib/python3.7/zipfile.py", line 1789, in __del__
self.close()
File "/usr/lib/python3.7/zipfile.py", line 1798, in close
raise ValueError("Can't close the ZIP file while there is "
ValueError: Can't close the ZIP file while there is an open writing handle on it. Close the writing handle before closing the zip.
which is of course different ... :)
My codechecker-results directory is 257 Go. I am trying to run it again if I get the same error again
Could the current way of extracting the zip file on the server side cause this problem?
It it written out to the disk and immediately read back for extraction.
https://github.com/Ericsson/codechecker/blob/9b25c841942b8992a808bda831f8eee8eab137f1/web/server/codechecker_server/api/report_server.py#L505-L525
Probably the name should be used to open for read:
with zipfile.ZipFile(zip_file.name, 'r', allowZip64=True) as zipf:
Based on the documentation on Unix platforms it can be opened a second time again.
Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later).
@sylvestre on which platform do you try run it?
I tried again in Debug and yeah, same pb again with zip.
on which platform do you try run it?
@gyorb on Debian
@gyorb did something change in "CodeChecker store" recently? It used to be pretty fast. Now, it has been running for more 10 hours (and still running)
In the latest release v6.12.0 there were some clang-tidy configuration changes to show results from the header files.
It can increase the found reports. Are there a lot more reports after that change?
You can switch back to the old behavior with this analyzer configuration:
CodeChecker analyze compile_command.json --analyzer-config clang-tidy:HeaderFilterRegex=\"\"
Could you try to run an analysis with this configuration?
I faced with it. Seems codechecker/web/client/codechecker_client/cmd/store.py:324
if sc_handler.has_source_line_comments(file_path, report_line):
file_hash_with_review_status.add(file_hash)
reading every single file takes a long.
That part was not touched recently but maybe the increased report count causes to check a lot more files than before.
We will need to check what can be improved there.
I'm working on some performance improvements for the store
command.
@gyorb sorry it took forever for me to get back to this (as it takes almost a full day to run) Using
CodeChecker analyze compile_command.json --analyzer-config clang-tidy:HeaderFilterRegex=\"\"
indeed made the build completed.
I will try to run store
in verbose mode but it takes several days to run :/
@sylvestre there were some performance improvements done for the store did you have time to try it out?
Describe the bug codechecker store fails with
CodeChecker version
To Reproduce
Happy to help debugging
(it would be nice to show the backtrace)