[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OSSTEST PATCH 29/60] parallel by fork: Disconnect $dbh_tests as well as undefing it


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Fri, 14 Aug 2020 18:21:34 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 14 Aug 2020 17:26:36 +0000
  • Ironport-sdr: mt2cdu9oNkD8xicT9fbKvliQ7A3TX45j3aCLdnPz5GAglhXZhphN5SIeIVjMX23WqG1ZqrWqk0 jyZrJH8rGukQPspN49o847UUVUmOM+/0nh0rQgRtHecmCtvPKdmIq2gV0LHt4W5xI0NO6AvUhy Tus+KnbGK9nIYqzYELKs44iCbUJxtIOJ10PemoNxBVoSdqfgdBoA+IxL2WTE/WhKxwliMYSFNq 6sQRRK9/n20WzhR0BwjaAU9YNMgZvvtK+/Pp/Q5j1d7OgxqeRsKzgMHAo0c1q8XH0ACIIehyph 9LY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

If the caller is buggy and has statement handles still open, they can
still "work" even if we have thrown away the db handle.

Where, after forking, "work" means "use the same connection in
multiple processes simultaneously, without locking".  This could
result in arbitrary crazy nbehaviour (eg, TLS crypto failures).

No functional change with existing callers since they don't have this
bug.

Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Osstest/HistoryReport.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Osstest/HistoryReport.pm b/Osstest/HistoryReport.pm
index 0b206de4..f0571189 100644
--- a/Osstest/HistoryReport.pm
+++ b/Osstest/HistoryReport.pm
@@ -245,6 +245,7 @@ sub parallel_by_fork ($$$$) {
     # db is reopened in each child.
 
     $whoami = $set_whoami;
+    $dbh_tests->disconnect();
     undef $dbh_tests;
 
     foreach my $task (@$tasks) {
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.