Skip to content

Some backend stubs are being lost and never closed on exit #134

@seblund

Description

@seblund

When running the GUI, often many engine processes are left running when the application closes. When debugging through the closeAllBackends calls you notice that the BackendDriver.openBackendConnections and QueryHandler.connections do not have as many BackendConnections as the GUI has started (it should be the same as they are only ever closed on exit or backend change).

This is clear if you explicitly keep a list of all BackendConnections started in BackendDriver.tryStartNewBackendConnection, and close them at exit, no processes are left hanging and all is good. While this may be an easy fix, it doesn't solve the underlying issue of BackendConnections disappearing. If they disappear we can't reuse them.

I can't really figure out where in the code the BackendConnections are lost since the connections move around a lot, but i haven't done a lot of debugging.

How to reproduce:

  • Either add a debug variable in BackendDriver.tryStartNewBackendConnection or use Task Manager to count the number of started processes/connections.
  • Add a breakpoint in setOnCloseRequest
  • Run the gui with a debugger attached.
  • Open the university example
  • Click the run all queries button to start a bunch of connections.
  • Close the GUI
  • Use debugger to check the number of processes/connections backendDriver and queryHandler have compared to the actual number of processes.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions