Closed Bug 588298 Opened 14 years ago Closed 14 years ago

During mochitest-5 SSL mixedcontent tests, we spam tons of "###!!! ASSERTION: QueryInterface needed: 'query_result.get() == mRawPtr'" in nsCOMPtr<nsIX509Cert>::Assert_NoQueryNeeded

Categories

(Core :: Security: PSM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- final+

People

(Reporter: dholbert, Assigned: mayhemer)

References

()

Details

(Keywords: assertion, regression)

Attachments

(1 file)

We spam tons of this assertion-failure during SSL-mixedcontent mochitests:
> ###!!! ASSERTION: QueryInterface needed: 'query_result.get() == mRawPtr', file ../../../../dist/include/nsCOMPtr.h, line 544

These are all from this mochitest directory:
  security/ssl/mixedcontent/

For example, the (green) mochitest log linked in URL field contains 896 instances of this assertion-failure.

I don't have a lot of experience with this particular assertion, but it looks a bit scary to me (and probably easily fixable...).

Here's a sample backtrace of the failure:
{
###!!! ASSERTION: QueryInterface needed: 'query_result.get() == mRawPtr', file ../../../../dist/include/nsCOMPtr.h, line 544
nsCOMPtr<nsIX509Cert>::Assert_NoQueryNeeded [nsCOMPtr.h:544]
nsCOMPtr<nsIX509Cert>::operator= [nsCOMPtr.h:665]
nsNSSSocketInfo::Read [security/manager/ssl/src/nsNSSIOLayer.cpp:710]
nsBinaryInputStream::ReadObject [xpcom/io/nsBinaryStream.cpp:768]
NS_DeserializeObject [netwerk/base/src/nsSerializationHelper.cpp:106]
nsDiskCacheEntry::CreateCacheEntry [netwerk/cache/nsDiskCacheEntry.cpp:90]
nsDiskCacheDevice::FindEntry [netwerk/cache/nsDiskCacheDevice.cpp:484]
nsCacheService::SearchCacheDevices [netwerk/cache/nsCacheService.cpp:1369]
nsCacheService::ActivateEntry [netwerk/cache/nsCacheService.cpp:1273]
nsCacheService::ProcessRequest [netwerk/cache/nsCacheService.cpp:1153]
nsCacheService::OpenCacheEntry [netwerk/cache/nsCacheService.cpp:1238]
nsCacheSession::OpenCacheEntry [netwerk/cache/nsCacheSession.cpp:98]
nsHttpChannel::OpenCacheEntry [netwerk/protocol/http/nsHttpChannel.cpp:1865]
nsHttpChannel::Connect [netwerk/protocol/http/nsHttpChannel.cpp:217]
nsHttpChannel::AsyncOpen [netwerk/protocol/http/nsHttpChannel.cpp:3245]
nsURILoader::OpenURI [uriloader/base/nsURILoader.cpp:863]
nsDocShell::DoChannelLoad [docshell/base/nsDocShell.cpp:8862]
nsDocShell::DoURILoad [docshell/base/nsDocShell.cpp:8704]
nsDocShell::InternalLoad [docshell/base/nsDocShell.cpp:8374]
nsDocShell::LoadURI [docshell/base/nsDocShell.cpp:1414]
nsLocation::SetURI [dom/base/nsLocation.cpp:317]
nsLocation::SetHrefWithBase [dom/base/nsLocation.cpp:591]
nsLocation::Assign [dom/base/nsLocation.cpp:871]
}

Despite the mention of "nsNSSIOLayer.cpp:710" in the backtrace, I'm pretty sure it's the line of code before that one (line 706) that triggers the failure.  (I caught an instance of this assertion failure, and stepping up put me at that line.):

>706  mCert = reinterpret_cast<nsNSSCertificate*>(serializable.get());
http://mxr.mozilla.org/mozilla-central/source/security/manager/ssl/src/nsNSSIOLayer.cpp?mark=706-706#706

This is in a block of code added just last week in bug 570616.
blocking2.0: --- → ?
(In reply to comment #0)
> (I caught an instance of this assertion failure, and stepping up
(caught it in GDB, I mean)
-> me
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
blocking2.0: ? → final+
I get zillions of these while I'm dogfooding debug builds. It's super-annoying. Please fix!
Very very simple fix.
Attachment #469160 - Flags: review?(kaie)
Comment on attachment 469160 [details] [diff] [review]
v1 [Check-in comment 6]

r=kaie Thanks Honza
Attachment #469160 - Flags: review?(kaie) → review+
Comment on attachment 469160 [details] [diff] [review]
v1 [Check-in comment 6]

http://hg.mozilla.org/mozilla-central/rev/d906347e3a36
Attachment #469160 - Attachment description: v1 → v1 [Check-in comment 6]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: