Undebuggable workers?

24 views
Skip to first unread message

Eric Uhrhane

unread,
Oct 22, 2010, 5:48:05 PM10/22/10
to Chromium-dev
I'm accustomed to debugging workers by putting a breakpoint in WorkerProcessHost::OnProcessLaunched, then attaching to the worker process once I hit it.
Today I'm finding that whenever I do this, the worker script just doesn't start up.  There's no error...it just never responds.  Resource tracking indicates that the script gets read, but it never seems to launch.

If I disable the breakpoint, the worker script runs just fine [up until it hits the error I want to debug].

Is there some sort of a timer that's checking to see that the script starts up within a certain delay, that my breakpoint is messing up?  Was there a recent change to worker startup?

This is on Vista64 on Visual Studio 2005, in case it matters.

Thanks,

     Eric

Drew Wilson

unread,
Oct 22, 2010, 6:45:11 PM10/22/10
to er...@google.com, Chromium-dev, Dmitry Titov
I'm not aware of any changes in this area. Dmitry?

-atw

--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Dmitry Titov

unread,
Oct 25, 2010, 2:29:51 PM10/25/10
to Drew Wilson, er...@google.com, Chromium-dev
I usually use the command-line switches that start worker process in a debugger automatically. Something like this:

For ui_test harness:
out/Debug/ui_tests --gtest_filter="WorkerTest.FLAKY_WorkerClonePort" --extra-chrome-flags="--debug-children=worker --browser-subprocess-path=/usr/local/google/chrome/src/out/Debug/chrome"
(the second flag is needed on Linux so the browser starts the gdb properly)

That automagically prepends "gdb --args" to the starting command line for the worker process.

Dmitry

Drew Wilson

unread,
Oct 25, 2010, 2:49:02 PM10/25/10
to Dmitry Titov, er...@google.com, Chromium-dev
It is disturbing that putting a breakpoint at WPH::OnProcessLaunched() causes the worker script to not run. Eric, do you know if the worker process itself goes away?

-atw

Dmitry Titov

unread,
Oct 25, 2010, 4:08:44 PM10/25/10
to Drew Wilson, er...@google.com, Chromium-dev
AFAIK there is no timers on the worker level specifically. Workers may start years after created (for example, because they are stuffed into a queue waiting for a worker process limit to be cleared up). Do you get worker process started up, and can you get any breakpoints in the worker process to be hit?

Eric Uhrhane

unread,
Oct 25, 2010, 5:07:46 PM10/25/10
to Dmitry Titov, Drew Wilson, Chromium-dev
The process starts up [I can attach to it with Visual Studio], but I never hit any breakpoints in it, and it never starts running the script passed to the worker. If I then break all in the debugger, I get a message that says  "The process appears to be deadlocked (or is not running any user-mode code).  All threads have been stopped.".  After I clear that dialog, the worker process is gone.

Incidentally, this afternoon I can debug a worker the *first* time I run one.  If I hit reload, I get the failure, and if I stop and restart the executable, it works for one run again.

Dmitry Titov

unread,
Oct 25, 2010, 5:37:26 PM10/25/10
to Eric Uhrhane, Drew Wilson, Chromium-dev
That "one time" may sound like something not initialized? Please let us know if you find the culprit!

Drew Wilson

unread,
Oct 25, 2010, 5:59:15 PM10/25/10
to Dmitry Titov, Eric Uhrhane, Chromium-dev
It'd be interesting to see if WorkerThread::OnChannelError() is getting invoked for some reason - that's the only thing that should cause the worker process to shutdown AFAICT.

-atw

Eric Uhrhane

unread,
Oct 25, 2010, 6:03:41 PM10/25/10
to Drew Wilson, Dmitry Titov, Chromium-dev
Nope; no call that I can detect.
Reply all
Reply to author
Forward
0 new messages