Closed
Bug 7308
Opened 25 years ago
Closed 25 years ago
THREADING: xpcom FindFactory() randomly fails.
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
VERIFIED
FIXED
M8
People
(Reporter: dp, Assigned: dp)
References
Details
Intl guys have code that proves that FindFactory() randomly fails. Here is a
patch that lets you put a breakpoint and see it happen.
Index: nsCharsetConverterManager.cpp
===================================================================
RCS file: /cvsroot/mozilla/intl/uconv/src/nsCharsetConverterManager.cpp,v
retrieving revision 1.16
diff -r1.16 nsCharsetConverterManager.cpp
185a186
> CreateMapping();
269c270,275
< if (NS_FAILED(res)) goto reduceArray;
---
> if (NS_FAILED(res)) {
> #if 1
> printf(" get charest info FindFactory failed %d %x", aIndex, res);
> #endif
> goto reduceArray;
> }
273c279,284
< if (NS_FAILED(res)) goto reduceArray;
---
> if (NS_FAILED(res)) {
> #if 1
> printf(" get charest info QI failed %d %x", aIndex, res);
> #endif
> goto reduceArray;
> }
282c293
< for (i=aIndex; i<*aSize;) aArray[i] = aArray[i++];
---
> for (i=aIndex; i<*aSize;) aArray[i] = aArray[++i];
I analyzed the xpcom log file and here is what I see:
FindFactory({379c2771-ec77-11d2-8aac-00600811a836})
not found in factory cache. Looking in registry
-->another thread-->ProgIDToCLSID(application/x-unknown-content-type)->[FAILED]
FindFactory() FAILED
FindFactory({379c2771-ec77-11d2-8aac-00600811a836})
not found in factory cache. Looking in registry
nsComponentManager: Found in mDllStore
"D:/seamonkey/mozilla/dist/WIN32_D.OBJ/bin/components/ucvcn.dll".
found in registry.
FindFactory() succeeded
So the same call to FindFactory() fails at one point and passes at another. The
only difference is the ProgIDToCLSID() calls from another thread. Need to
investigate if this is xpcom or registry.
Assignee | ||
Updated•25 years ago
|
Assignee | ||
Updated•25 years ago
|
Target Milestone: M7 → M8
Assignee | ||
Comment 1•25 years ago
|
||
Non one is hitting this yet. The code that hits it has changed. So fixing this
along with other threading bugs in M8.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M8 → M7
Assignee | ||
Comment 2•25 years ago
|
||
Checked in a course level fix. Keeping it open to checkin the real full fix.
The problem is a member mErr of nsRegistry. When multiple threads access
nsRegistry, mErr is getting overwritten causing some of the functions to return
error even when they really passed.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M7 → M8
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 3•25 years ago
|
||
Fix checked in morning of 6/22
Cathleen wang and Peterl was seeing these crashes. Could you guys try out the
latest builds.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 4•25 years ago
|
||
marking as verified
You need to log in
before you can comment on or make changes to this bug.
Description
•