Open Bug 1409039 Opened 7 years ago Updated 10 months ago

Crashfirefox.exe fails with "Could not create remote thread." when Firefox is hung

Categories

(Toolkit :: Crash Reporting, defect)

Unspecified
Windows
defect

Tracking

()

Tracking Status
firefox57 --- affected

People

(Reporter: skywalker333, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

Sometimes crashfirefox.exe does not work properly. 
I receive the error message, "Could not create remote thread."
This occurs even when I specify the process ID. Like crashfirefox 8168. 

In these instances when firefox is hung and crashfirefox.exe does not work I have to close firefox by clicking X and having it crash, with Windows sometimes "attempting to solve the problem" or windows will "Close the program" for me. I can also just go into the task manager and close the firefox processes manually. 

I'm not sure if this "Could not create remote thread." error is the expected operation of crashfirefox.exe or if it's a bug in that program, or in firefox? It is preventing users from being able to generate a crash report when firefox is hung. Very useful program when it works.
"Could not create remote thread."
Windows error, "Firefox is not responding. Close Program."
No new crash reports generated from this crash.
See Also: → 1374915
See Also: → 1327319
Blocks: 1416078
This is probably a limitation of crashfirefox.exe's use of CreateRemoteThread. That API has to do some work under the hood that might not be possible in a hung process.

As a more forceful approach, perhaps we could use SetThreadContext to mess with a victim thread's instruction pointer: http://blogs.microsoft.co.il/pavely/2017/09/05/dll-injection-with-setthreadcontext/

Where does this code live nowadays? Is it still bsmedberg's github?
Summary: Crashfirefox.exe does not work. Error, "Could not create remote thread." → Crashfirefox.exe fails with "Could not create remote thread." when Firefox is hung
Yes: https://github.com/bsmedberg/crashfirefox-intentionally

The nice thing about using `CreateRemoteThread` is that it doesn't muck with the other threads in the process so you get an accurate view of what was happening in the hung process. Having a fallback path that tries `SetThreadContext` if creating a thread fails seems reasonable though, since it's better to get a crash report out than just fail.
See Also: → 1457615

In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.

Severity: major → --

The severity field is not set for this bug.
:gsvelto, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(gsvelto)
Severity: -- → S4
Flags: needinfo?(gsvelto)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: