Closed Bug 1668057 Opened 5 years ago Closed 5 years ago

MOZ_ASSERT_UNREACHABLE: Unrecognized opcode sequence, at mozilla/interceptor/PatcherDetour.h:1262 from xpcshell trying to run httpd for tests - Can't run any mochitests on Windows 10 with a debug build

Categories

(Core :: mozglue, defect)

defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: Gijs, Assigned: handyman)

References

Details

Attachments

(1 file)

Cloned this from bug 1649279 because I'm seeing it again.

+++ This bug was initially created as a clone of Bug #1649279 +++

STR:

  1. win10 x64 machine
  2. mozconfig:
mk_add_options MOZ_DEBUG=1
mk_add_options MOZ_OBJDIR="d:/builds/frontend-debug/"

ac_add_options --disable-compile-environment
ac_add_options --enable-debug
ac_add_options --enable-artifact-builds
  1. ./mach build && ./mach package
  2. ./mach mochitest --appname=dist browser/base/content/test/performance/browser_startup.js (or any other test in this dir, AFAICT)

ER:

test runs

AR:

DLL blocklist was unable to intercept AppInit DLLs.
Assertion failure: false (MOZ_ASSERT_UNREACHABLE: Unrecognized opcode sequence), at /builds/worker/workspace/obj-build/dist/include/mozilla/interceptor/PatcherDetour.h:1310

Running with ./mach run works fine.

I gotta run out soon but I'll get a full (non-artifact) debug build going and hopefully I can share the right info. I'm seeing this after updating to Windows 10 Insider Preview 20221.1000 (rs_prerelease) - but I don't run debug very often so it's possible this has been out there for a little while.

(In reply to :Gijs (he/him) from bug 1649279 comment #4)

In case it's helpful, I commented out the assert and replaced it with:

          printf("Got 0x%x followed by 0x%x\n", (*origBytes), (origBytes[1]));

This nets me:

Got 0xba followed by 0x70

again (output was the same in 1649279).

:handyman, can I do something else to figure this out?

Flags: needinfo?(davidp99)

I'll go one better -- ran your STR and mine bails out toward the end of the packaging step (and in running the test):

[...]
2:29.80 Creating archive: C:/Users/DAVIDP~1/AppData/Local/Temp/tmp8pz3owvd/app.7z                                                                                  
2:29.80                                                                                                                                                            
2:29.80 Add new data to archive: 10 folders, 82 files, 305166079 bytes (292 MiB)                                                                                   
2:29.80                                                                                                                                                            
2:29.80                                                                                                                                                            
2:29.80 Files read from disk: 82                                                                                                                                   
2:29.80 Archive size: 74151929 bytes (71 MiB)                                                                                                                      
2:29.80 Everything is Ok                                                                                                                                           
2:30.10 mozmake.EXE[3]: Leaving directory 'c:/mozilla-src/mozilla-unified/obj-1668057/browser/installer/windows'                                                   
2:30.33 DLL blocklist was unable to intercept AppInit DLLs.                                                                                                        
2:30.33 Assertion failure: false (MOZ_ASSERT_UNREACHABLE: Unrecognized opcode sequence), at /builds/worker/workspace/obj-build/dist/include/mozilla/interceptor/PatcherDetour.h:1331                                                                                                                                                   
2:56.90 mozmake.EXE[2]: *** [c:/mozilla-src/mozilla-unified/toolkit/mozapps/installer/packager.mk:114: make-package] Error 3                                       
2:56.90 mozmake.EXE[2]: Leaving directory 'c:/mozilla-src/mozilla-unified/obj-1668057/browser/installer'                                                           
2:56.91 mozmake.EXE[1]: *** [c:/mozilla-src/mozilla-unified/config/rules.mk:384: default] Error 2                                                                  
2:56.91 mozmake.EXE[1]: Leaving directory 'c:/mozilla-src/mozilla-unified/obj-1668057/browser/installer'                                                           
2:56.91 mozmake.EXE: *** [c:/mozilla-src/mozilla-unified/browser/build.mk:6: package] Error 2                                                                      
2:56.91 mozmake.EXE: Leaving directory 'c:/mozilla-src/mozilla-unified/obj-1668057'                        

I'm working with a later build from the Windows 10 Pro Insider Preview fast track (v 20226.1000). Without having looked into it, I assume this is a change to the Windows x64 code that we are patching, as usual. I'll know more soon.

Flags: needinfo?(davidp99)
Assignee: nobody → davidp99

The latest Windows Insider Preview (version 20226.1000) changes the machine code for BaseThreadInitThunk to have a preamble like the following:

00007FFDBF244C40 48 83 EC 28 sub rsp,28h
00007FFDBF244C44 85 C9 test ecx,ecx
00007FFDBF244C46 75 25 jne 00007FFDBF244C6D
00007FFDBF244C48 49 BA 70 A2 DC 12 6A 97 99 B0 mov r10,0B099976A12DCA270h

This patch adds "MOV r64, imm64" capability to the DLL interceptor so that we can hook this.

Pushed by daparks@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0fe2a7dc580c Allow DLL interceptor to patch 64-bit immediate MOVs r=tkikuchi
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: