Handling SIGBUS for Memory Mapped Files

82 views
Skip to first unread message

Brian White

unread,
May 1, 2017, 10:41:54 AM5/1/17
to chromium-dev
Disk errors, specifically disk-full conditions, can cause crashes when using memory mapped files.  This is an issue, especially on Android with its limited storage, for persistent metrics and activity tracking (aka "breadcrumbs").

The PersistentMemoryManager is designed to be fault-tolerant so could be easily adapted to recognize and handle SIGBUS errors (or the equivalent Windows exception) in a reasonable way (i.e. doesn't crash).

Here's the design.  Comments?  (Use your @chromium account to access.)

https://docs.google.com/a/chromium.org/document/d/1pn_xc9JnSVUReIMM2awkMtBVkEFy1NjHCxzi3dq3D2g/edit?usp=sharing

  Brian
  bcw...@google.com
-----------------------------------------------------------------------------------------
Treat someone as they are and they will remain that way.
Treat someone as they can be and they will become that way.

Primiano Tucci

unread,
May 2, 2017, 7:34:05 AM5/2/17
to bcw...@google.com, chromium-dev
I cannot talk for other platforms, but doing custom userspace signal trapping on Android outside of breakpad/crashpad is something that makes me quite nervous because of the associated stability risks. This is unfortunately due to the evolution of bugs around signal handling on various Android platforms.
We had a large variety of signal handling bugs in the last years, some examples on top of my head: crbug.com/448968, crbug.com/483399, crbug.com/481420, crbug.com/477444, crbug.com/473973 .
we spent quite a lot of time in the last years unveiling all these platform bugs and adding all sort of workarounds to breakpad. I would really like to avoid having >1 code paths (i.e. one in chrome, one in breakpad) that do signal handling, because that is just too painful to maintain and It is already extremely hard to try to get it right in one place. 


--
--
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/CAB8qB%2Bv9ws%3DZO-P1dzLM2e_eEfV%2B2J2qP%3DuTy-JWFG2L6N0f3g%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages