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
The StateLogger class in SQLancer suffers from serious resource leaks due to inadequate management of file handlers. File writers (logFileWriter, currentFileWriter, queryPlanFileWriter, reduceFileWriter) are created but never properly closed throughout the application lifecycle.
Problem
Multiple FileWriter instances are opened during testing operations, but their resources aren't systematically released when they're no longer needed. This leads to:
Accumulated open file descriptors during long test runs
Potential data loss from unflushed buffers
File locking issues that might prevent access to log files
Possible system resource exhaustion on extended testing sessions
Impact
Since SQLancer is designed to run for extended periods while testing database systems, these leaks can significantly impact system stability and test reliability. The longer SQLancer runs, the more resources are leaked, potentially causing the tool to fail after extended use.
Hi, I’d like to work on this issue if it’s still open.
My plan is to add an explicit lifecycle close() method to StateLogger
that safely flushes and closes all FileWriter instances, and ensure it is
invoked during shutdown to prevent resource leaks, without changing
existing logging behavior.
Please let me know if this approach aligns with the intended solution.
Activity
Saadmadni84 commentedon Jan 18, 2026
Hi, I’d like to work on this issue if it’s still open.
My plan is to add an explicit lifecycle
close()method toStateLoggerthat safely flushes and closes all FileWriter instances, and ensure it is
invoked during shutdown to prevent resource leaks, without changing
existing logging behavior.
Please let me know if this approach aligns with the intended solution.