Closed Bug 1668706 Opened 4 years ago Closed 4 years ago

"[GPU ..., Renderer] WARNING: Failed to duplicate file handle for current process!" flooding windows terminal running local debug build

Categories

(Core :: Graphics: WebRender, defect)

Unspecified
Windows 10
defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- unaffected
firefox82 --- wontfix
firefox83 --- fixed

People

(Reporter: mozbugz, Assigned: sotaro)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

For a little while now, when I'm running a local m-c build on Windows 10, I'm getting the following warning tens to hundreds of times per second:

[GPU 2271172, Renderer] WARNING: Failed to duplicate file handle for current process!: file c:/mozilla-source/mozilla-central/ipc/glue/FileDescriptor.cpp, line 124

This floods my terminal, it's quite distracting (to me) when I'm trying to do something in Firefox, and I may miss more important log messages. Is this warning really useful?

In any case, moz-regression gave me this range:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a7975fa65a251e8e4e6631666c09d3fc4737f43d&tochange=0de10c26da552953484a56f0fbdb3ab70196988e
The most likely culprit would be bug 1658684. Though it's for Android, it adds some platform-independent code.

I was able to capture a stack at the first warning:

Assertion failure: false (Failed to duplicate file handle for current process!), at c:/mozilla-source/mozilla-central/ipc/glue/FileDescriptor.cpp:124
#01: mozilla::wr::RenderThread::UpdateAndRender (c:\mozilla-source\mozilla-central\gfx\webrender_bindings\RenderThread.cpp:521)
#02: mozilla::wr::RenderThread::HandleFrameOneDoc (c:\mozilla-source\mozilla-central\gfx\webrender_bindings\RenderThread.cpp:331)
#03: mozilla::detail::RunnableMethodImpl<mozilla::wr::RenderThread ,void (mozilla::wr::RenderThread::)(mozilla::wr::WrWindowId, bool),1,mozilla::RunnableKind::Standard,mozilla::wr::WrWindowId,bool>::Run (c:\mozilla-source\obj-mc-dbg\dist\include\nsThreadUtils.h:1243)
#04: MessageLoop::RunTask (c:\mozilla-source\mozilla-central\ipc\chromium\src\base\message_loop.cc:466)

This confirms that the source of the warning is code that was modified in bug 1658684.
Sotaro, could you please have a look, see if there's a way to silence this warning on Windows (and maybe other non-Android platforms, I haven't tried)?
It's probably not high priority because it wouldn't affect end users, but it would be nice to lessen the visual burden for us devs, thanks! 😉

Thanks for the report! I take a bug.

Assignee: nobody → sotaro.ikeda.g

It seems that FileDescriptor::Clone() was called for std::move() and FileDescriptor::Clone() expects that file descriptor is valid.

(In reply to Sotaro Ikeda [:sotaro] from comment #3)

It seems that INVALID_HANDLE_VALUE is not used for invalid file descriptor on Windows.

nullptr is used on current gecko.

It seemed to be changed by Bug 1534780.

Set release status flags based on info from the regressing bug 1658684

Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/90c91aaebe61
Fix invalid handle handling of FileDescriptor::Clone() on Windows r=jld
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: