Hi, While hacking on the code, I noticed a problem with auxiliary process resource owners. Sorting and bulk release leave stale entries in the owner’s hash table, but ReleaseAuxProcessResources() resets the flags to allow reuse without clearing them.
On reuse, stale entries can be mistaken for resources acquired in the current cycle and released again. They can also leave the table with no empty slots, causing insertion to loop indefinitely while searching for one. The attached patch clears the entire hash table after resource release, before allowing the auxiliary owner to be reused. This also removes stale copies left beyond the sorted prefix. I think this was introduced by b8bff07daa8. Any comments on this fix? --- Regards, Jingtang
v1-aux-resource-owner-reuse.patch
Description: Binary data
