Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
1.1.7
-
None
-
2019-05
Description
PackageHandler::synchTableAccess() is a kludge to serialize DML against a single table, but allow parallel processing against different tables. This kludge is required because the vss can't accept transaction ID's out of numerical order on a single table, and asserts if they're not in order. If there are multiple transactions running on multiple threads, there's no guarantee of order.
Something occasionally breaks if ctrl+c is hit while processing DML. The internal tables and synch conditions of synchTableAccess() can get out of whack. This has caused two catastrophic events. In one case, DMLProc segfaulted while accessing the synchro map (27656), and in other cases, DML statements block indefinitely.
When CTRL+C is hit, the query is removed from the queue that keeps track of the queries for this table and the query is marked as cancelled. The query, running in a different thread, begins cleaning up stuff and removes the top item (should be the running item) from the queue. Of course he's not in there so the queue gets corrupted. Different, but similar, breakage occurs when the query is waiting.
A query that blocks doesn't log anything yet, as it's blocked before the normal logging occurs. This led to significant confusion trying to analyze this. Added logging when a query blocks here.