Consequences of not calling CefShutdown on SIGKILL?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Consequences of not calling CefShutdown on SIGKILL?

Postby snowp » Wed Jan 27, 2016 4:10 pm

I've got an application where under certain circumstances we're forced to kill the entire process (using SIGKILL on windows), which immediately terminates the process without calling into our shutdown logic (which includes CefShutdown). Is CEF expected to handle this situation gracefully? Is there any risk of CEF leaving any persistent data (e.g. the disk cache) in a corrupted state?
snowp
Newbie
 
Posts: 2
Joined: Fri Sep 11, 2015 5:39 pm

Re: Consequences of not calling CefShutdown on SIGKILL?

Postby magreenblatt » Wed Jan 27, 2016 4:26 pm

snowp wrote:Is CEF expected to handle this situation gracefully?

No, how could it?

snowp wrote:Is there any risk of CEF leaving any persistent data (e.g. the disk cache) in a corrupted state?

Yes.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: Consequences of not calling CefShutdown on SIGKILL?

Postby snowp » Wed Jan 27, 2016 4:54 pm

magreenblatt wrote:
snowp wrote:Is CEF expected to handle this situation gracefully?

No, how could it?


I was thinking it might be able to detect the improper shutdown and deal with it when it was relaunched, but in retrospect that seems like it would be pretty difficult.

What kind of consequence would you see in a fresh instance of CEF using the same cache following a SIGKILL (or a crash)? Are we just dealing with potential cache misses in the new browser, or would it be best to manually wipe the cache to ensure that the potentially corrupted state affects the new instance?
snowp
Newbie
 
Posts: 2
Joined: Fri Sep 11, 2015 5:39 pm

Re: Consequences of not calling CefShutdown on SIGKILL?

Postby magreenblatt » Wed Jan 27, 2016 5:01 pm

snowp wrote:What kind of consequence would you see in a fresh instance of CEF using the same cache following a SIGKILL (or a crash)? Are we just dealing with potential cache misses in the new browser, or would it be best to manually wipe the cache to ensure that the potentially corrupted state affects the new instance?

I wouldn't expect any serious issues (e.g. crashes) or restart. You might loose cookies, localstorage, etc., if they weren't successfully persisted to disk before the process terminated -- that's something Web apps should be designed to recover from. If any cache files become corrupt the browser should be reasonably good at replacing or recovering them.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 21 guests