Bart Smaalders wrote:
Tom Mueller wrote:
Bart,
The use of the global variable in the os_unix.py file would seem to introduce a potential concurrency issue if multiple threads are using this code. Consider the case where separate threads are operating on separate user images simultaneously. Currently, the pkg(5) code handles this, but with this fix, there could be a problem with accessing the __been_here dictionary.

Instead of checking on every call, can't the module just call the offending get group name method once as it is loaded? And maybe that call should be in os_sunos.py rather than os_unix.py is that it is only done for Solaris?

This is a temporary work around; the fix is destined for libc soon.
What happens in the multi-threaded case is out of scope right now;
we don't have a MT client or any test cases for one.  I think the
initialization would need to be done per thread.

Do you folks have a MT front end that's using pkg(5) code?
Yes. The software update part of our tool has the ability to take a list of user images and run a check to see if updates are available for any of them. It uses a separate thread to check each image.

Hopefully the libc fix will get in soon.
Tom


- Bart







begin:vcard
fn:Tom Mueller
n:Mueller;Tom
org:Sun Microsystems, Inc.;Update Center Software
adr:;;21915 Hillandale Dr;Elkhorn;NE;68022;USA
email;internet:[email protected]
title:Senior Staff Engineer
tel;work:877-250-4011
tel;fax:877-250-4011
tel;home:402-916-9943
x-mozilla-html:TRUE
version:2.1
end:vcard

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to