Assertion failure: !sUser32BeforeBlocklist, at [snip]mozilla/mozglue/build/WindowsDllBlocklist.cpp:769 (Port bug 1285356 to TB, IM, SM)

RESOLVED FIXED in Thunderbird 50.0

Status

Thunderbird
General
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: Jorg K (GMT+2), Assigned: Jorg K (GMT+2))

Tracking

Trunk
Thunderbird 50.0

Thunderbird Tracking Flags

(thunderbird48 unaffected, thunderbird49 fixed, thunderbird50 fixed, thunderbird_esr45 unaffected)

Details

Attachments

(1 attachment)

(Assignee)

Description

11 months ago
Local debug builds don't start due to an assertion in WindowsDllBlocklist.cpp.
I can't see it in DXR, so it must be brand new (it is, see below):

First seen 2016-07-22:
https://treeherder.mozilla.org/#/jobs?repo=comm-central&revision=c5465a63afb3302b8272046adfe01e0109222e91

https://treeherder.mozilla.org/#/jobs?repo=comm-central&selectedJob=42534

This comes from here:
http://hg.mozilla.org/mozilla-central/log/tip/mozglue/build/WindowsDllBlocklist.cpp

Bug 1285356.

Aaron: TB doesn't start any more in debug mode due to the MOZ_ASSERT you added here:
http://hg.mozilla.org/mozilla-central/rev/4d06c9ff66cf#l6.39

Is that intentional ;-)
Flags: needinfo?(aklotz)
(Assignee)

Comment 1

11 months ago
Closer looking at http://hg.mozilla.org/mozilla-central/rev/4d06c9ff66cf it looks like TB needs to port a bit of that, for example:

+    DELAYLOAD_DLLS += [
+        'winmm.dll',
+        'user32.dll',
+    ]
+

or even the changes in main().

Aleth, would that be right?
Flags: needinfo?(aleth)

Comment 2

11 months ago
Yes, that's correct. The changes to browser/app/nsBrowserApp.cpp also need to be ported to the mail/app equivalent. Ditto for suite and im...
Flags: needinfo?(aleth)
(Assignee)

Updated

11 months ago
Flags: needinfo?(aklotz)
Summary: Assertion failure: !sUser32BeforeBlocklist, at [snip]mozilla/mozglue/build/WindowsDllBlocklist.cpp:769 → Assertion failure: !sUser32BeforeBlocklist, at [snip]mozilla/mozglue/build/WindowsDllBlocklist.cpp:769 (Port bug 1285356 to TB, IM, SM)
(Assignee)

Comment 3

11 months ago
Created attachment 8774226 [details] [diff] [review]
See whether this works.

As far as I can see, no changes are required in
mail/app/nsMailApp.cpp
suite/app/nsSuiteApp.cpp
im/app/nsMain.cpp
since

#ifdef HAS_DLL_BLOCKLIST
  DllBlocklist_Initialize();

#ifdef DEBUG
  // In order to be effective against AppInit DLLs, the blocklist must be
  // initialized before user32.dll is loaded into the process (bug 932100).
  if (GetModuleHandleA("user32.dll")) {
    fprintf(stderr, "DLL blocklist was unable to intercept AppInit DLLs.\n");
  }
#endif
#endif

is already at the top of main(). But I could be wrong ;-)
(Assignee)

Comment 4

11 months ago
Comment on attachment 8774226 [details] [diff] [review]
See whether this works.

With this patch applied, my local build starts up again. Let's see on try:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=75bb09056db2
Attachment #8774226 - Flags: review?(aleth)

Comment 5

11 months ago
Comment on attachment 8774226 [details] [diff] [review]
See whether this works.

Review of attachment 8774226 [details] [diff] [review]:
-----------------------------------------------------------------

You are right, but that's a sign that we have missed some bug(s) touching that file which need porting ;)
Attachment #8774226 - Flags: review?(aleth) → review+
(Assignee)

Comment 6

11 months ago
Landed:
https://hg.mozilla.org/comm-central/rev/38e7151af632

Sadly the try run results were orange. However, that seem to have been other failures, the 
  Assertion failure: !sUser32BeforeBlocklist
have all gone. I also checked that all 1141 Mozmill tests worked on Windows XP debug.

(In reply to aleth [:aleth] from comment #5)
> You are right, but that's a sign that we have missed some bug(s) touching
> that file which need porting ;)
Well, look at the difference here:
http://hg.mozilla.org/mozilla-central/rev/4d06c9ff66cf#l2.26
We don't have the sandbox stuff. The block of code mentioned in comment #3 moved from after this block we don't have to before it. Since we don't have the block, we didn't need to move anything.
Status: NEW → RESOLVED
Last Resolved: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 50.0
(Assignee)

Updated

11 months ago
Assignee: nobody → mozilla
(Assignee)

Comment 7

11 months ago
Comment on attachment 8774226 [details] [diff] [review]
See whether this works.

This needs uplift since bug 1285356 got uplifted.
Attachment #8774226 - Flags: approval-comm-aurora+
(Assignee)

Comment 8

11 months ago
Aurora (TB 49):
https://hg.mozilla.org/releases/comm-aurora/rev/8cd47fef0b2e
status-thunderbird48: --- → unaffected
status-thunderbird49: --- → fixed
status-thunderbird50: --- → fixed
status-thunderbird_esr45: --- → unaffected
You need to log in before you can comment on or make changes to this bug.