Open Bug 1053508 Opened 7 years ago Updated 4 years ago

fatal Assertion failure: !"_pr_loadmap and lib->refCount inconsistent" at shutdown


(Firefox Build System :: General, defect)

Not set


(Not tracked)


(Reporter: karlt, Unassigned)



(Keywords: regression)


(1 file, 2 obsolete files)

Assertion failure: !"_pr_loadmap and lib->refCount inconsistent", at /mnt/ssd1/karl/moz/dev/nsprpub/pr/src/linking/prlink.c:1039

"/mnt/sda11/karl/obj/dist/bin/" is the library involved at

#8  0x00007fb0d2d18c22 in PR_UnloadLibrary (lib=0x7fb0a107a8b0)
    at /mnt/ssd1/karl/moz/dev/nsprpub/pr/src/linking/prlink.c:1039
#9  0x00007fb0d2c31263 in SECMOD_UnloadModule (mod=0x7fb0a0da5c20)
    at pk11load.c:592
#10 0x00007fb0d2c4eaff in SECMOD_SlotDestroyModule (module=0x7fb0a0da5c20, 
    fromSlot=0) at pk11util.c:852
#11 0x00007fb0d2c4e9a1 in SECMOD_DestroyModule (module=0x7fb0a0da5c20)
    at pk11util.c:813
#12 0x00007fb0d2c4eb71 in SECMOD_DestroyModuleListElement (
    element=0x7fb0a0e342f0) at pk11util.c:869
#13 0x00007fb0d2c4ebb1 in SECMOD_DestroyModuleList (list=0x7fb0a0e342f0)
    at pk11util.c:885
#14 0x00007fb0d2c4d738 in SECMOD_Shutdown () at pk11util.c:72
#15 0x00007fb0d2c01883 in nss_Shutdown () at nssinit.c:1089
#16 0x00007fb0d2c019a8 in NSS_Shutdown () at nssinit.c:1147
#17 0x00007fb0cf476461 in nsNSSComponent::ShutdownNSS (this=0x7fb0a10e57e0)
    at /mnt/ssd1/karl/moz/dev/security/manager/ssl/src/nsNSSComponent.cpp:1077
#18 0x00007fb0cf477c44 in nsNSSComponent::DoProfileBeforeChange (
    this=0x7fb0a10e57e0, aSubject=0x0)
    at /mnt/ssd1/karl/moz/dev/security/manager/ssl/src/nsNSSComponent.cpp:1480

ac_add_options --enable-application=browser
mk_add_options MOZ_OBJDIR=/mnt/sda11/karl/obj
export LDFLAGS="-B/home/karl/bin/gold"
mk_add_options MOZ_MAKE_FLAGS=-j8
ac_add_options --disable-optimize --enable-debug --disable-installer
ac_add_options --with-system-jpeg=/usr
ac_add_options --with-system-zlib=/usr
ac_add_options --with-system-bz2
ac_add_options --with-system-icu
ac_add_options --with-system-libvpx
ac_add_options --enable-system-hunspell
ac_add_options --enable-system-pixman
ac_add_options --enable-system-ffi
ac_add_options --enable-system-sqlite
ac_add_options --with-system-png=/usr
ac_add_options --enable-startup-notification

This prevents running mochitests locally, but I guess I can just remove the assert.
regression from
Requires clobber to pick up the difference.
Keywords: regression
Version: unspecified → Trunk
Builds from do not reproduce on my system but local builds from the same revision bf5cbb36f4d2 do, so I guess something in my build config is triggering this.
Removing --enable-system-sqlite removes the error. does have a dependency on sqlite, but I don't know why that would be relevant here.
Bobby Holley had the same problem today, and after looking at his build, it turns out the problem for him was that nspr was statically linked into nss. I'm curious to know how this happened.
Flags: needinfo?(mh+mozilla)
I got the error when i was running mochitests in firefox in Ubuntu 14.04 in my vmware.
In my .mozconfig file,i have:
ac_add_options --enable-debug
ac_add_options --disable-optimize
If you can reproduce more or less reliably, what would be interesting is a full build log (from mach build -v), preferably from a build from scratch.
Flags: needinfo?(mh+mozilla)
Attached file Build log (obsolete) —
Added a full build log.
(In reply to Harsh Vardhan [:royalharsh95] from comment #8)
> Created attachment 8526615 [details]
> Build log
> Added a full build log.

That's a mach build log, not mach build -v :(
Attached file build -v (obsolete) —
oops..sorry , this time its ./mach build -v >out.txt 2>&1.
Attachment #8526615 - Attachment is obsolete: true
(In reply to Harsh Vardhan [:royalharsh95] from comment #10)
> Created attachment 8528154 [details]
> build -v
> oops..sorry , this time its ./mach build -v >out.txt 2>&1.

Try again after removing /home/royalharsh95/mozilla-central/obj-x86_64-unknown-linux-gnu/security/nss/lib/nss/ because your build is incremental and not doing much. (But check the assertion still happens because it might fix it)
This time after removing , I got this:

royalharsh95@ubuntu:~/mozilla-central$ ./mach mochitest-browser --debugger=gdb browser/base/content/test/general/browser_bug422590.js
From _tests: Kept 21030 existing; Added/updated 0; Removed 0 files and 0 directories.
testpath: browser/base/content/test/general
SUITE-START | Running 1 tests
/home/royalharsh95/mozilla-central/obj-x86_64-unknown-linux-gnu/dist/bin/certutil: /usr/lib/x86_64-linux-gnu/ version `NSS_3.16.2' not found (required by /home/royalharsh95/mozilla-central/obj-x86_64-unknown-linux-gnu/dist/bin/certutil)
0 ERROR TEST-UNEXPECTED-FAIL | | Certificate integration failed
TEST-INFO | checking window state
Browser Chrome Test Summary
	Passed: 0
	Failed: 0
	Todo: 0
*** End BrowserChrome Test Results ***
SUITE-END | took 0s
Should I build from scratch ?
Added full build log from scratch :)
Attachment #8528154 - Attachment is obsolete: true
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.