You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chromium database much smaller than it should be #8755
I've created a CodeQL database of Chromium. I've used the official tutorial from Google (https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md).
When it came to building Chromium, I've swapped the command autoninja -C out/Default chrome by codeql database create chromium-database --language=cpp --command="autoninja -C out/Default chrome" -J-Xmx26034M.
EDIT: Just to be clear, I've started compiling from scratch.
Everything built just fine but when I took a look at the final database, it looked a lot smaller that I think it should be (a folder of 268 items for 762MB).
I've opened the resulting DB in VSCode and sure enough plenty of files were missing.
I've included a picture of the available files/folders present when opening the DB in VSCode.
Can you point out a way to have a more complete database? Thanks
Thanks for the report @Ludgershall . To help debugging this issue, could you have a look in the log/build-tracer.log file for error messages that could explain what's going wrong? The file is probably too large to post as an attachment. It may also contain sensitive data (user name, paths) you might not want to share. Could you look for the phrases intercepted , /extractor and catastrophic error . This should give an idea of which processes were intercepted by CodeQL. For the analysis the work CodeQL needs to intercept all compiler calls (eg clang, gcc) and invoke the CodeQL C/C++ extractor from each of them to extract the information from the compiled source files and store them in the CodeQL database. The phrase catastrophic error usually indicates something going very wrong causing CodeQL to skip some source files. If you can post any error messages or other relevant information to this issue that would be greatly appreciated. Make sure to redact any sensitive information (in file paths) you don't want to share. Thanks!
Thanks @pooneh-nb . I see there are over 35000 catastrophic error messages like language modes specified are incompatible. I'll pass the log file on to the team so they can have a closer look.
@Ludgershall could you have a look at the build-tracer.log on your system as well and check if you're seeing a similar failure pattern?
A quick update; I added a few arguments in the process of making ninja files using gn. So instead of running gn gen out/Default, I ran gn gen out/Default --args="is_component_build = false is_debug = false enable_nacl = false symbol_level = 0 blink_symbol_level = 0 v8_symbol_level = 0". Then created the codeql database codeql database create chromium-database --language=cpp --command="autoninja -C out/Default chrome”
The result changes significantly. Now instead of 3k files, I have 85K files but it is still much less than the original number of files in the chromium source code. Here is the comparison:
I've recently experienced the same outcome. Is there any update on the situation? I can also share the error logs if it helps.
Edit 1: I switched to CodeQL CLI 2.8.2 and add a few build arguments to chromium (is_debug=false is_component_build=false dcheck_always_on=false) and it seems to be generating the right amount of output, but I still experienced some catastrophic errors. I will try a few more combinations of CodeQL version and build configs to see what works and what doesn't. The first combination that didn't work was v2.10.1 (latest) with default build configuration from gn gen out/Default.
Hi all, the problem with language modes specified are incompatible should be fixed in CodeQL 2.12.2, which will be released in a few weeks time. I'm closing this issue, but feel free to re-open if you spot more language modes specified are incompatible problems. Please open new issues for any other problems related to missing files.
Activity
aibaars commentedon Apr 18, 2022
Thanks for the report @Ludgershall . To help debugging this issue, could you have a look in the log/build-tracer.log file for error messages that could explain what's going wrong? The file is probably too large to post as an attachment. It may also contain sensitive data (user name, paths) you might not want to share. Could you look for the phrases
intercepted,/extractorandcatastrophic error. This should give an idea of which processes were intercepted by CodeQL. For the analysis the work CodeQL needs to intercept all compiler calls (eg clang, gcc) and invoke the CodeQL C/C++extractorfrom each of them to extract the information from the compiled source files and store them in the CodeQL database. The phrasecatastrophic errorusually indicates something going very wrong causing CodeQL to skip some source files. If you can post any error messages or other relevant information to this issue that would be greatly appreciated. Make sure to redact any sensitive information (in file paths) you don't want to share. Thanks!pooneh-nb commentedon Apr 18, 2022
I can share the build-tracer.log here. It's uploaded to my github.
aibaars commentedon Apr 19, 2022
Thanks @pooneh-nb . I see there are over 35000 catastrophic error messages like
language modes specified are incompatible. I'll pass the log file on to the team so they can have a closer look.@Ludgershall could you have a look at the build-tracer.log on your system as well and check if you're seeing a similar failure pattern?
Ludgershall commentedon Apr 19, 2022
I've got plenty of errors like the following
pooneh-nb commentedon Apr 24, 2022
A quick update; I added a few arguments in the process of making ninja files using
gn. So instead of runninggn gen out/Default, I rangn gen out/Default --args="is_component_build = false is_debug = false enable_nacl = false symbol_level = 0 blink_symbol_level = 0 v8_symbol_level = 0". Then created the codeql databasecodeql database create chromium-database --language=cpp --command="autoninja -C out/Default chrome”The result changes significantly. Now instead of 3k files, I have 85K files but it is still much less than the original number of files in the chromium source code. Here is the comparison:
ducphanduyagentp commentedon Jul 23, 2022
I've recently experienced the same outcome. Is there any update on the situation? I can also share the error logs if it helps.
Edit 1: I switched to CodeQL CLI 2.8.2 and add a few build arguments to chromium (
is_debug=false is_component_build=false dcheck_always_on=false) and it seems to be generating the right amount of output, but I still experienced some catastrophic errors. I will try a few more combinations of CodeQL version and build configs to see what works and what doesn't. The first combination that didn't work was v2.10.1 (latest) with default build configuration fromgn gen out/Default.xeroskim commentedon Dec 30, 2022
Are there any updates on this problem? I'm facing the same issue.
jketema commentedon Jan 27, 2023
Hi all, the problem with
language modes specified are incompatibleshould be fixed in CodeQL 2.12.2, which will be released in a few weeks time. I'm closing this issue, but feel free to re-open if you spot morelanguage modes specified are incompatibleproblems. Please open new issues for any other problems related to missing files.