https://cr.opensolaris.org/action/browse/caiman/wmsch/7073935/webrev/

The stress errors are due to database lookups on manifests and profiles that have been deleted during 'installadm list -p/-m'. For example, in AI_database.py:getNames(), the number of names (manifest or profile entries) is counted, then database queries are launched one at a time (a memory usage limitation feature for very large queries), which introduces a window during which the entry can be deleted, and the corresponding query fails.

The solution is to add checks that the rows exist in the query output before referencing them.

Stress-tested with this script and variations, looping, using 5 different profiles at a time, then launching the same script multiple times to compound the contention:

import sys
import subprocess
mysys = sys.argv[1]  # profile
mysvc = '167nightly'
mycp = ['installadm', 'create-profile', '-p', mysys, '-n', mysvc, '-f', mysys]
myls = ['installadm', 'list', '-p', '-n', mysvc]
mydp = ['installadm', 'delete-profile', '-p', mysys, '-n', mysvc]
subprocess.call(mycp)
subprocess.call(myls)
subprocess.call(mydp)

Calling code was checked for compatibility.

Related pyunit tests pass.
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to