Embedded Chromium: detecting or automatically restarting if "Aw Snap" screen?

1,842 views
Skip to first unread message

Daniel Griscom

unread,
Oct 12, 2015, 2:48:51 PM10/12/15
to Chromium-dev
I'm working on an embedded system that uses Chromium to drive the front panel display. Once in a long while a customer will report an "Aw snap" display on the front panel, showing where some portion of Chromium crashed. Obviously it would be best to prevent such crashes; just as obviously it would be a bear to find and cure the cause, as Chromium is running a fairly complex web app.

A close second best would be to have Chromium automatically restart if it ever has an "Aw Snap" event. I've looked for a configuration flag that would do just that, but have had no success. Third choice would be a way to externally detect if Chromium has had an event; I could then write a script to watch Chromium and restart it if there's a crash.

Is there any sort of command line flag that would tell Chromium to restart itself if a portion crashes? Or, is there a way to detect if a portion of Chromium has crashed?


Thanks,
Dan

Primiano Tucci

unread,
Oct 12, 2015, 8:08:55 PM10/12/15
to dtgr...@gmail.com, Chromium-discuss
-chromium-dev, +chromium-discuss

> Obviously it would be best to prevent such crashes
If it happens systematically after some time, it's very likely due to the content (JS / DOM) causing an OOM. Did you try using devtools profiling?

Is there any sort of command line flag that would tell Chromium to restart itself if a portion crashes? Or, is there a way to detect if a portion of Chromium has crashed?
You might be able to  achieve that using a chrome extension using the chrome.process API. A quick search on a search engine points out to examples like this

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

Daniel Griscom

unread,
Oct 12, 2015, 8:28:13 PM10/12/15
to Chromium-dev, dtgr...@gmail.com, chromium...@chromium.org


On Monday, October 12, 2015 at 8:08:55 PM UTC-4, Primiano Tucci wrote:
> Obviously it would be best to prevent such crashes
If it happens systematically after some time, it's very likely due to the content (JS / DOM) causing an OOM. Did you try using devtools profiling?

I have, but probably due to inexperience I've had little success. I do have a script watching Chromium as a whole for memory leaks by running it within a memory cgroup, restarting it if it hits a limit. That seems to be quite successful, although perhaps it isn't catching all cases.
 
Is there any sort of command line flag that would tell Chromium to restart itself if a portion crashes? Or, is there a way to detect if a portion of Chromium has crashed?
You might be able to  achieve that using a chrome extension using the chrome.process API. A quick search on a search engine points out to examples like this

That looks like a great idea. How would I tell if chrome.process is available in my version of Chromium? (We're using 30.0.1599.66; we have so much runtime on this we don't want to update, and as we're using a captive UI we don't have to worry about new cases.)


Thanks,
Dan

Thiago Farina

unread,
Oct 12, 2015, 8:43:50 PM10/12/15
to dtgr...@gmail.com, chromium...@chromium.org
Primiano moved chromium-dev to bcc for a reason. Please, don't move it back to CC.

--
Thiago Farina

Suwaibith Suhail

unread,
Sep 18, 2017, 7:58:29 AM9/18/17
to Chromium-dev
Hi Daniel,

I came across your post while trying to find a similar solution to the same problem (using chromium in an embedded board, and try relaunching in the case of "Aw Snap" page) you have experienced, I am wondering what you did to resolve to over come this and very much appreciate it if you could share your solution and insights with regard to the solution. Have a good day! 

Thank you,
Suhail

Frederick Eyland

unread,
Feb 20, 2018, 11:41:56 AM2/20/18
to Chromium-dev
Someone found a solution?

Op maandag 12 oktober 2015 20:48:51 UTC+2 schreef Daniel Griscom:

Avi Drissman

unread,
Feb 20, 2018, 11:45:54 AM2/20/18
to free...@gmail.com, Chromium-dev
There are several extensions on the CWS that offer auto-reloading of crashed tabs. I found one in a search. I can't vouch for it but give it a try.

--
--
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 view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/7d0c8c6c-78df-40ef-92d5-612a1bd0a265%40chromium.org.

Reply all
Reply to author
Forward
0 new messages