Windows Sandbox failures

419 views
Skip to first unread message

Robert Jamieson

unread,
Aug 22, 2024, 4:19:54 PM8/22/24
to Chromium-dev
Hi,

I'm in the process of updating our project from Chromium 124 to 128. We have a handful of modifications, spanning different areas of the codebase. When running my modified 128 version I see the following error:

ERROR:main_dll_loader_win.cc(138)] Failed to load Chrome DLL from C:\chromium\src\out\debug_x64\chrome.dll: A dynamic link library (DLL) initialization routine failed. (0x45A)

The error is coming from the failed call to LoadLibraryExW.

I see this for all sandboxed processes. Running with --no-sandbox everything works as expected.

Does anyone have any advice for debugging which dependency is failing to load inside the sandbox?

So far I have,
  • enabled loader snaps, but I don't see any issues 
  • used dependency walker to rule out any missing dependencies (--no-sandbox already proved that to be the case). Unfortunately I can't run it 
  • used procmon to see any access failures, but it also shows nothing of interest
Any ideas would be welcomed.

Thanks,
Robert

Will Harris

unread,
Aug 22, 2024, 7:01:51 PM8/22/24
to rjam...@all-turtles.com, Chromium-dev
It sounds like you've tried several good things already including loader snaps, and so I'm surprised that hasn't already led you to a root cause - it's the things I would have suggested you do for a case like this.

ERROR_DLL_INIT_FAILED could be coming from one of the dependent DLLs for chrome.dll - so it might be worth stepping through in a debugger to see exactly which DLL loading causes this to happen (turn on load module break with `sxe ld` to step through the dll loads). None of chrome's DllMains return anything but true so it doesn't sound like it could be this.

Perhaps you could try `dumpbin /imports` on your chrome.dll and compare it with a chrome.dll from the same version of Google Chrome and see if you notice any differences in the imports?

Will

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/a1e40419-a277-4267-9109-6a5fd5428c9cn%40chromium.org.

Robert Jamieson

unread,
Aug 23, 2024, 5:46:22 PM8/23/24
to Chromium-dev, Robert Jamieson
Thankfully, I managed to resolve my issue.

I ended up removing my dependencies one by one until the processes would load, and then analysing the dependency that caused the issue. It was using Shell32.dll. In the end it was a simple fix.

However, I would still love to hear if anyone has any good tips for debugging the sandbox violations.

Thanks,
Robert
Reply all
Reply to author
Forward
0 new messages