Ticket #722 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

buildbot.db leaks threads

Reported by: dustin Owned by:
Priority: blocker Milestone: 0.8.0
Version: master Keywords:
Cc:

Description

I got well into the hundreds of threads just running 'dev trial'. I expect there's a threadpool reference leak somewhere.

I'm trying to find a test that triggers this but doesn't suck in its own right.

Change History

comment:1 Changed 3 years ago by dustin

This is because none of the tests clean up their db's when finished. The code to clean up DB's fails, because of per-thread restrictions on Sqlite objects, which is presumably why the tests don't call it.

comment:2 Changed 3 years ago by Dustin J. Mitchell

  • Status changed from new to closed
  • Resolution set to fixed

fix thread leak, fix sqlite errors on shutdown, add tests

This fixes a major thread leak, by ensuring that the ConnectionPool?'s close() method always gets called (fixes #722). That method was triggering spurious errors from sqlite, but passing check_same_thread=False fixes that (and fixes #714). This also represents further work on #725 by adding new, well-isolated tests

Changeset: 5d41eef3718b79c034cab533f18354ad87f30f31

comment:3 Changed 3 years ago by Dustin J. Mitchell

fix thread leak, fix sqlite errors on shutdown, add tests

This fixes a major thread leak, by ensuring that the ConnectionPool?'s close() method always gets called (fixes #722). That method was triggering spurious errors from sqlite, but passing check_same_thread=False fixes that (and fixes #714). This also represents further work on #725 by adding new, well-isolated tests

Changeset: 5d41eef3718b79c034cab533f18354ad87f30f31

Note: See TracTickets for help on using tickets.