Electrolysis/Logging

From MozillaWiki
< Electrolysis
Revision as of 22:10, 13 May 2016 by JLD (talk | contribs) (Add some notes about sandboxing.)
Jump to navigation Jump to search

Logging Support

  • need to sort out current state of MOZ logging and other forms of IPC related logging
  • Sandboxing. Approaches to writing logs from sandboxed child processes include:
    • Open files early, either during startup or from a sandboxing-specific hook, rather than opening lazily on first use. Not ideal for log files that might not be used at all.
    • Have the parent open file descriptors and send them to the child; see PCycleCollectWithLogs for one example. Works well with code using stdio or NSPR, and less well with C++ iostreams.
    • Send the data in chunks over IPC messages (e.g., using bug 1093357 once that lands); note that Gecko IPC has no flow control, so OOM is a possibility if the receiver can't keep up. Also problematic if logging is to be done from multiple threads.
  • Logging.h
  • bug 881389 (OneLogger) Improve Gecko's logging story

Open Bugs

  • bug 1272704 NSPR logging appears to be broken on Windows from Content processes
  • bug 1014407 Failure when setting stdout or stderr on the Windows process sandboxing policy should be reported as a warning
  • bug 1055227 Make sandbox logging (security/sandbox/chromium/base/shim/base/logging*) actually emit log messsages
  • bug 1198475 Mochitest log file opened directly in content process