Closed Bug 1798357 Opened 2 years ago Closed 2 years ago

crash-firefox doesn't produce crash reports some of the time?

Categories

(Toolkit :: Crash Reporting, defect)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: jrmuizel, Unassigned)

References

Details

Blocks: 1798099

I've not been able to reproduce this locally. It works fine for me.

Blocks: 1798050

I've also been looking into how to crash a process with CreateRemoteThread (for bug 1793525), and I also had some issues with nullptr not working reliably. I've been advised to jump to DbgBreakPoint instead, and I'm told that that's in a “known DLL” so it's safe to assume it will be at the same address in every process, but I haven't tried that yet. (My current prototype uses a function in xul.dll that does a MOZ_CRASH, and that works in practice, but it's unsafe to assume that it won't be relocated in case of address conflict.)

Note that using a non-null bad address as the entry point won't work, because we block that. We also have an internal tool called crashinject which does something weird by making the thread entry point be LoadLibrary and doing subtle things in the library initializer, but actually that's broken because we also block that trick (Nightly-only for now).

Bob, can you try changing crash-firefox to use DbgBreakPoint instead of null?

Flags: needinfo?(bhood)

If I understand things correctly, crash-firefox is just a thin graphical shell over the underlying command line utility crashfirefox-intentionally (by Benjamin Smedberg). This utility has not been maintained since 2015, which probably explains why it has drifted away from FF. If I am correct, then it is the author of the latter to be contacted.

Sorry, you are actually incorrect. The project uses the same approach as the original project (that of using CreateThreadRemote to start a thread on the target process at address 0x0), but does not utilize the original program at all. Entirely separate from it.

Have a look at the thunderbolt.cpp module in the project.

Flags: needinfo?(bhood)
Flags: needinfo?(bhood)

New release of crash-firefox which uses NtDll::DbgBreakPoint as the entry point for the thread instead of 0x0. Please give it a try.

https://github.com/b0bh00d/crash-firefox/releases/tag/Windows-64-1.2

Flags: needinfo?(bhood)

I can confirm that I do get FF crash reports now, with the modified crash-firefox. This bug report can probably be closed now.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.