question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CodeChecker store command silently corrupts data when storing with --trim-path-prefix

See original GitHub issue

CodeChecker version: 6.15-54-gcd94f9e3

I was wondering why there were no reports listed under a specific run, after CodeChecker store command reported success:

CodeChecker store /home/codechecker/codechecker_results/qtbase-dev-20201029-ec407916 \
    --trim-path-prefix /home/codechecker/qt/qtbase -n qtbase-dev-20201029-ec407916 \
    --url http://localhost:8001/qtbase-dev

But the web UI at http://localhost:8001/qtbase-dev/reports listing the reports under the run was empty, same as the output of this command:

CodeChecker cmd results --url http://localhost:8001/qtbase-dev  'qtbase*'

Please note that the server is running as a different system user, using sqlite, and has no filesystem access to the client-side source files. The debug log of the server printed tons of errors, ending like that:

{report} [43784] <139735032895232> - plist_parser.py:148 parse_plist_file() - Parsing plist: /tmp/tmp4ugsrpo4/reports/qendian.cpp_clang-tidy_8244643767f4a1c2e46f498b98565fe5.plist
{server} [43784] <139735032895232> - report_server.py:2552 __store_reports() - Failed to get file path id for 'src/corelib/global/qglobal.h'!
{server} [43784] <139735032895232> - report_server.py:2527 __store_reports() - Parsing input file 'qrect.cpp_clang-tidy_8fd767b3e7df4319fb6a801a5375c456.plist'
{report} [43784] <139735032895232> - plist_parser.py:148 parse_plist_file() - Parsing plist: /tmp/tmp4ugsrpo4/reports/qrect.cpp_clang-tidy_8fd767b3e7df4319fb6a801a5375c456.plist
{server} [43784] <139735032895232> - report_server.py:2552 __store_reports() - Failed to get file path id for 'src/corelib/tools/qsharedpointer_impl.h'!
{system} [43784] <139735032895232> - store_handler.py:394 finishCheckerRun() - Finishing checker run
{server} [43784] <139735032895232> - report_server.py:2949 massStoreRun() - 'Anonymous' stored results (219885 KB) to run 'qtbase-dev-20201029-ec407916' in 17.62 seconds.

It seems the problem happend because of --trim-path-prefix. Re-running the store command without it, results in reports being properly stored to the database.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
gyorbcommented, Oct 30, 2020

Thanks for reporting the issue, I’m working on the fix.

0reactions
jimiscommented, Nov 9, 2020

Store command seems to work well now, and results are visible both on the web interface and on the command line. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

User Guide - CodeChecker
store is used to save previously created machine-readable analysis results (such as plist files), usually previously generated by CodeChecker analyze to the ...
Read more >
codechecker/usage.md at master - GitHub
CodeChecker is an analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy - codechecker/usage.md at master ...
Read more >
CVE - Search Results - MITRE
The `/ajax/remove/` API is affected by a command injection vulnerability. ... CVE-2021-44217, In Ericsson CodeChecker through 6.18.0, a Stored Cross-site ...
Read more >
codecheckerHQ/Lobby - Gitter
The CodeChecker tool we develop, uses Clang Static Analyzer and clang-tidy for static ... "CodeChecker store" command has a flag named --trim-path-prefix.
Read more >
Changes from 8.1.0_r68 (OC) to 9.0.0_r1 (PPR1.180610.009)
9fcc3d5 : bmi160: fix step counter flush when spi command cannot be issued ... to save code space; 87aad73 : rockchip/rk3399: Remove unneeded...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found