vscode-codeql: Error running query: Pending response rejected since connection got disposed (codeQL.runQueryContextEditor)

Describe the bug

Well, I have a set up as follows:

  • Digital Ocean instance connected using remote SSH VSCode extension.
  • in the instance, there is a a CodeQL cli installed.
  • codeql created a database in the instance.
  • wanna run a query from my machine (client) via Remote SSH VSCode to the instance so that the computation is performed in the DO instance.

Version

  • CodeQL extension version: 1.9.2 CodeQL CLI version: 2.15.0 Platform: linux x64

To reproduce

reproduce a similar setup and try to run QL query.

Expected behavior A clear and concise description of what you expected to happen. You would get the following error each time

Error running query: Pending response rejected since connection got disposed (codeQL.runQueryContextEditor)

Additional context

I am willing to provide details right away this weekend and the starting of the next week

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

sure, no problem.

The source is set to any(DataFlow::Node n) and state ...

That is most likely what’s going wrong. Setting your source to be any node in the database will never work on any database larger than a “hello world” project since that will make CodeQL follow dataflow starting at all dataflow nodes in the entire database.

So you need to restrict your isSource somehow. You can read more about how to write a dataflow query at https://codeql.github.com/docs/codeql-language-guides/analyzing-data-flow-in-ruby/#.

It is this ruby ql query https://github.com/github/codeql/pull/12992/files#diff-8c993937eef8b8df6969f780265e623d0231fa9c9e1d819f0c66ab9ccc984e89

On a database generated from https://github.com/shirasagi/shirasagi commit f249ce3f06f6bfbc0017b38f5c13de424334c3ea

The source is set to any(DataFlow::Node n) and state ...

PS: I remain available for further details.

It is definitely related to some limiting factor either instance CPU overload or instance bandwidth limitation.

Check this case in Github Codespace:

Capture d'écran 2023-10-17 181457

Go query was run successfully one time in the remote setup previously mentioned. The ruby query run failed twice. I thought it was because, during the query running, I fired a local terminal ssh connection to the same instance… I am still investigating on my side.