+++ This bug was initially created as a clone of Bug #1402931 +++ Description of problem: The Oracle version of lock_counts.pkb fails to lock the server-row 'for update', which kind of defeats the whole purpose iof the proc. Fix this.
Created attachment 1229606 [details] lock_counts.ora 'for update' lock_counts needs to have 'for update' added to the ORA version, to correctly lock the server-row
There is a further hole in the erratum that released lock_counts - specifically, the unsubscribe_server path WAS NOT COVERED, in either postgresql or oracle. This is fixed in rhn_channel.pkb in both dialects.
Tested on both Oracle and Postgresql with satellite-schema-5.7.0.27-1-sat using the reproducer scripts from BZ 1388160. After upgrade, there are no deadlocks anymore. VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2017-0236.html