Skip to content

Commit

Permalink
Bumping the sleep again
Browse files Browse the repository at this point in the history
  • Loading branch information
quirkey committed Dec 2, 2014
1 parent ca20d56 commit 1ad2fc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cef/cef.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func Initialize(settings Settings) int {
ret := C.cef_initialize(_MainArgs, settings.ToCStruct(), _AppHandler, _SandboxInfo)
// Sleep for 1500ms to let cef _really_ initialize
// https://code.google.com/p/cefpython/issues/detail?id=131#c2
time.Sleep(1500 * time.Millisecond)
time.Sleep(2500 * time.Millisecond)

return int(ret)
}
Expand Down

8 comments on commit 1ad2fc8

@cztomczak
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, this issue still returns. I've come up with an idea to disable the gpu process to solve this issue. Try passing the --disable-gpu and --disable-gpu-sandbox flags. You can do this programmatically in the OnBeforeCommandLineProcessing callback. When passing flags in this callback it should be without the "--" prefix. It should also be possible to pass these flags from command line when launching executable.

@quirkey
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @CzarekTomczak - I tried your suggestion and even spent a bunch of time stracing the processes to try to see whats going on. At least in my case, the problem seems to be with the chromium zygote process not the GPU process. What I see is in successful runs the zygote process is fully initialized and waiting for messages on an FD before RunMessageLoop() is invoked in the main thread. In failed runs, it seems like the zygote process is busy loading a bunch of files (at least in my simple testing - it looks like TZ Info files) when RunMessageLoop is invoked. At this point, RunMessageLoop just returns immediately.

Not sure if theres a callback that gets invoked when the zygote process is done launching. Any ideas?

@cztomczak
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@quirkey
Found here that you can get rid of the zygote process by passing the --renderer-cmd-prefix flag.

You might add the info you've researched to the CEF Issue 1362.

Btw. I recall you've been asking on how to update CEF to a newer version. Have you managed to do it? Maybe this issue was fixed in later Chrome versions.

@quirkey
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CzarekTomczak Posted: https://code.google.com/p/chromiumembedded/issues/detail?id=1362#c1

I'm going to try the zygote flags now.

@quirkey
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried a lot of variations of both, but looks like no matter what it still tries launching the zygote process.

@quirkey
Copy link
Author

@quirkey quirkey commented on 1ad2fc8 Feb 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CzarekTomczak havent tried updating the cef version but I might try now.

@cztomczak
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@quirkey Initially I wrote to try disable GPU with the --disable-gpu and --disable-gpu-sandbox flags. These flags weren't quite right, the latter flag should be --disable-gpu-compositing. However as you've mentioned the issue is the zygote process and not the gpu process, so it should not matter, but still it's worth clarifying.

@cztomczak
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thing that could be done is to get a meaningful stack trace by using the CEF Debug configuration binaries. The stack trace in CEF issue 1362 doesn't include any meaningful CEF/Chromium symbols.

Please sign in to comment.