Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Issue 1137833003: Attempt to fix a CloseHandle crasher in the renderer process. The crash is triggered by Nacl. (Closed)

Created:
5 years, 7 months ago by ananta
Modified:
5 years, 7 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Attempt to fix a CloseHandle crasher in the renderer process. The crash is triggered by Nacl. Based on the crash dump, the crash occurs while loading a Nacl module in the renderer process. The Nacl translate thread has a valid file handle which is created by the Nacl host in the browser. It then calls into the Nacl loader to load the module which fails. The Nacl loading code in LaunchSelLdr function is closing the file handle which is passed in. Based on comments in the PnaclTranslateThread class, ownership of the file handle is only transferred on success. Thus when the call returns the PnaclTranslateThread code tries to close the file handle which is already closed. In the meantime the Windows handle is reused to something else which is tracked by our handle tracker. The second CloseHandle attempt causes a CHECK to fire because we are closing a handle which is being tracked. Fix is to not close the file handle in the PnaclTranslateThread class as ownership is transferred on call to LaunchSelHdr. BUG=426582, 475872 Committed: https://crrev.com/ae9c454b37f91d1578a4f9e25ee2d03915059f9a Cr-Commit-Position: refs/heads/master@{#329251}

Patch Set 1 #

Patch Set 2 : Change PnaclTranslateThread to not close the file handle as ownership is transferred implicitly to the LaunchSelHdr function #

Patch Set 3 : Reverted changes to ppb_nacl_private_impl.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -6 lines) Patch
M components/nacl/renderer/plugin/plugin.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M components/nacl/renderer/plugin/pnacl_translate_thread.cc View 1 2 chunks +2 lines, -6 lines 0 comments Download

Messages

Total messages: 16 (5 generated)
ananta
5 years, 7 months ago (2015-05-08 23:05:23 UTC) #2
ananta
+bbudge for nacl owners
5 years, 7 months ago (2015-05-08 23:06:37 UTC) #4
bbudge
LaunchSelLdr is also called when loading a nexe (not invoking the PNaCl translator.) Does this ...
5 years, 7 months ago (2015-05-08 23:58:37 UTC) #6
ananta
On 2015/05/08 23:58:37, bbudge wrote: > LaunchSelLdr is also called when loading a nexe (not ...
5 years, 7 months ago (2015-05-09 01:29:18 UTC) #7
Mark Seaborn
+jvoung, who is more familiar with the PNaCl code paths than me. Whichever way you ...
5 years, 7 months ago (2015-05-11 15:25:42 UTC) #9
jvoung (off chromium)
On 2015/05/09 01:29:18, ananta wrote: > On 2015/05/08 23:58:37, bbudge wrote: > > LaunchSelLdr is ...
5 years, 7 months ago (2015-05-11 16:59:44 UTC) #10
ananta
On 2015/05/11 16:59:44, jvoung wrote: > On 2015/05/09 01:29:18, ananta wrote: > > On 2015/05/08 ...
5 years, 7 months ago (2015-05-11 20:51:56 UTC) #11
jvoung (off chromium)
LGTM thanks
5 years, 7 months ago (2015-05-11 21:09:11 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1137833003/40001
5 years, 7 months ago (2015-05-11 21:27:27 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 7 months ago (2015-05-11 22:24:08 UTC) #15
commit-bot: I haz the power
5 years, 7 months ago (2015-05-11 22:24:51 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ae9c454b37f91d1578a4f9e25ee2d03915059f9a
Cr-Commit-Position: refs/heads/master@{#329251}

Powered by Google App Engine
This is Rietveld 408576698