Skip to content

Fatal Error: Tuple [...] has incorrect number of columns in C# CodeQL #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Sella-GH opened this issue Jan 23, 2025 · 4 comments
Closed
Assignees

Comments

@Sella-GH
Copy link

Following log files being shown with the error (and some debug lines)

2025-01-21T13:10:06.2758939Z Starting evaluation of codeql/csharp-queries/API Abuse/CallToGCCollect.ql.
2025-01-21T13:10:06.2768064Z Starting evaluation of codeql/csharp-queries/API Abuse/CallToObsoleteMethod.ql.
2025-01-21T13:10:06.2769474Z Starting evaluation of codeql/csharp-queries/API Abuse/ClassDoesNotImplementEquals.ql.
2025-01-21T13:10:06.2797175Z Starting evaluation of codeql/csharp-queries/API Abuse/ClassImplementsICloneable.ql.
2025-01-21T13:10:06.2817513Z Starting evaluation of codeql/csharp-queries/API Abuse/DisposeNotCalledOnException.ql.
2025-01-21T13:10:06.2819123Z Starting evaluation of codeql/csharp-queries/API Abuse/FormatInvalid.ql.
2025-01-21T13:10:06.2827921Z Starting evaluation of codeql/csharp-queries/API Abuse/InconsistentEqualsGetHashCode.ql.
2025-01-21T13:10:10.0185233Z [1/194 eval 3.7s] Evaluation done; writing results to codeql/csharp-queries/API Abuse/CallToGCCollect.bqrs.
2025-01-21T13:10:10.4471096Z [2/194 eval 4.2s] Evaluation done; writing results to codeql/csharp-queries/API Abuse/CallToObsoleteMethod.bqrs.
2025-01-21T13:10:10.8126847Z [3/194 eval 4.5s] Evaluation done; writing results to codeql/csharp-queries/API Abuse/ClassImplementsICloneable.bqrs.
2025-01-21T13:10:12.8573439Z Starting evaluation of codeql/csharp-queries/API Abuse/IncorrectCompareToSignature.ql.
2025-01-21T13:10:12.8738760Z Starting evaluation of codeql/csharp-queries/API Abuse/IncorrectEqualsSignature.ql.
2025-01-21T13:10:14.4805367Z [4/194 eval 1.6s] Evaluation done; writing results to codeql/csharp-queries/API Abuse/IncorrectCompareToSignature.bqrs.
2025-01-21T13:10:14.4836806Z Starting evaluation of codeql/csharp-queries/API Abuse/NoDisposeCallOnLocalIDisposable.ql.
2025-01-21T13:10:14.6180164Z A fatal error occurred: A tuple in a data extension for the extensible predicate 'sourceModel' has an incorrect number of columns. Expected 10, but was 9.
2025-01-21T13:10:15.6847658Z ##[error]Error running analysis for csharp: Encountered a fatal error while running "/opt/hostedtoolcache/CodeQL/2.20.1/x64/codeql/codeql database run-queries --ram=14567 --threads=4 /home/runner/work/_temp/codeql_databases/csharp --expect-discarded-cache --min-disk-free=1024 -v --intra-layer-parallelism". Exit code was 2 and error was: A fatal error occurred: A tuple in a data extension for the extensible predicate 'sourceModel' has an incorrect number of columns. Expected 10, but was 9. See the logs for more details.
2025-01-21T13:10:15.6894812Z ##[debug]Sending status report: {"action_name":"finish","action_oid":"unknown","action_ref":"b6a472f63d85b9c78a3ac5e89422239fc15e9b3c","action_started_at":"2025-01-21T13:09:38.538Z","action_version":"3.28.1","analysis_key":".github/workflows/codeql.yml:analyze","build_mode":"manual","commit_oid":"849ce79dee3ef79ee7e50a21d03913f98a4b4972","first_party_analysis":true,"job_name":"analyze","job_run_uuid":"00b5dc4b-9b9b-4048-99c1-aedbb8b7b3aa","ref":"refs/heads/main","runner_os":"Linux","started_at":"2025-01-21T13:07:41.332Z","status":"failure","steady_state_default_setup":false,"testing_environment":"","workflow_name":"CodeQL","workflow_run_attempt":2,"workflow_run_id":12887566233,"actions_event_name":"push","languages":"csharp","runner_available_disk_space_bytes":21452361728,"runner_total_disk_space_bytes":77851254784,"cause":"Encountered a fatal error while running \"/opt/hostedtoolcache/CodeQL/2.20.1/x64/codeql/codeql database run-queries --ram=14567 --threads=4 /home/runner/work/_temp/codeql_databases/csharp --expect-discarded-cache --min-disk-free=1024 -v --intra-layer-parallelism\". Exit code was 2 and error was: A fatal error occurred: A tuple in a data extension for the extensible predicate 'sourceModel' has an incorrect number of columns. Expected 10, but was 9. See the logs for more details.","exception":"Error: Encountered a fatal error while running \"/opt/hostedtoolcache/CodeQL/2.20.1/x64/codeql/codeql database run-queries --ram=14567 --threads=4 /home/runner/work/_temp/codeql_databases/csharp --expect-discarded-cache --min-disk-free=1024 -v --intra-layer-parallelism\". Exit code was 2 and error was: A fatal error occurred: A tuple in a data extension for the extensible predicate 'sourceModel' has an incorrect number of columns. Expected 10, but was 9. See the logs for more details.\n    at runCli (/home/runner/work/_actions/github/codeql-action/b6a472f63d85b9c78a3ac5e89422239fc15e9b3c/lib/codeql.js:763:63)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.databaseRunQueries (/home/runner/work/_actions/github/codeql-action/b6a472f63d85b9c78a3ac5e89422239fc15e9b3c/lib/codeql.js:478:13)\n    at async runQueries (/home/runner/work/_actions/github/codeql-action/b6a472f63d85b9c78a3ac5e89422239fc15e9b3c/lib/analyze.js:343:13)\n    at async run (/home/runner/work/_actions/github/codeql-action/b6a472f63d85b9c78a3ac5e89422239fc15e9b3c/lib/analyze-action.js:196:24)\n    at async runWrapper (/home/runner/work/_actions/github/codeql-action/b6a472f63d85b9c78a3ac5e89422239fc15e9b3c/lib/analyze-action.js:268:9)","completed_at":"2025-01-21T13:10:15.687Z","matrix_vars":"{\n  \"language\": \"csharp\",\n  \"build-mode\": \"manual\"\n}","runner_arch":"X64","runner_os_release":"6.5.0-1025-azure","codeql_version":"2.20.1","runner_image_version":"20250120.2.0","analyze_failure_language":"csharp","scanned_language_extraction_duration_ms":3,"trap_import_duration_ms":11845}
2025-01-21T13:10:15.8313927Z ##[debug]Node Action run completed with exit code 1
2025-01-21T13:10:15.8316092Z ##[debug]CODEQL_ACTION_FEATURE_MULTI_LANGUAGE='false'
2025-01-21T13:10:15.8316540Z ##[debug]CODEQL_ACTION_FEATURE_SANDWICH='false'
2025-01-21T13:10:15.8317235Z ##[debug]CODEQL_ACTION_FEATURE_SARIF_COMBINE='true'
2025-01-21T13:10:15.8317632Z ##[debug]CODEQL_ACTION_FEATURE_WILL_UPLOAD='true'
2025-01-21T13:10:15.8317993Z ##[debug]CODEQL_ACTION_VERSION='3.28.1'
2025-01-21T13:10:15.8318456Z ##[debug]CODEQL_ACTION_SARIF_RESULTS_OUTPUT_DIR='sarif-results'
2025-01-21T13:10:15.8319120Z ##[debug]CODEQL_ACTION_JOB_STATUS='JOB_STATUS_FAILURE'
2025-01-21T13:10:15.8323168Z ##[debug]Save intra-action state persisted_inputs = [["INPUT_CATEGORY","/language:csharp"],["INPUT_OUTPUT","sarif-results"],["INPUT_UPLOAD","failure-only"],["INPUT_CHECK_NAME",""],["INPUT_CLEANUP-LEVEL","brutal"],["INPUT_RAM",""],["INPUT_ADD-SNIPPETS","false"],["INPUT_SKIP-QUERIES","false"],["INPUT_THREADS",""],["INPUT_CHECKOUT_PATH","/home/runner/work/AzzyBot/AzzyBot"],["INPUT_REF",""],["INPUT_SHA",""],["INPUT_UPLOAD-DATABASE","true"],["INPUT_WAIT-FOR-PROCESSING","true"],["INPUT_TOKEN","***"],["INPUT_MATRIX","{\n  \"language\": \"csharp\",\n  \"build-mode\": \"manual\"\n}"],["INPUT_EXPECT-ERROR","false"]]
2025-01-21T13:10:15.8328322Z ##[debug]Finishing: Perform CodeQL Analysis

My CodeQL configuration:

https://github.com/Sella-GH/AzzyBot/blob/main/.github/workflows/codeql-csharp.yml
https://github.com/Sella-GH/AzzyBot/blob/main/.github/codeql/codeql-config.yml

This issue was recreated in this repo because at first I did it on the codeql-action one github/codeql-action#2706. However it looks like it's an issue occuring from here because when I disabled the extension packs it worked fine.

@michaelnebel
Copy link
Collaborator

Thank you for reporting this! We will look into!

@michaelnebel
Copy link
Collaborator

This will be fixed here - and then we will re-publish the pack(s): #106

@GeekMasher
Copy link
Contributor

This should be ready to go, please let us know @Sella-GH if updating to v0.2.1 fixes your problem.

@Sella-GH
Copy link
Author

Works flawlessly again, thanks for the quick fix! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants