summaryrefslogtreecommitdiff
path: root/Userland/Services/CrashDaemon
AgeCommit message (Collapse)Author
2022-06-03Services: Use Core::Process::spawn() for common process spawn patternMacDue
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2021-11-28Everywhere: Use default execpromises argument for Core::System::pledgeBrian Gianforcaro
2021-11-24CrashDaemon: Port to LibMain :^)Andreas Kling
2021-11-23LibCore+AK: Move MappedFile from AK to LibCoreAndreas Kling
MappedFile is strictly a userspace thing, so it doesn't belong in AK (which is supposed to be user/kernel agnostic.)
2021-11-20CrashReporter: Unlink coredump file on exitItamar
Previously, when the --unlink flag was passed to CrashReporter, it unlinked the coredump file immediately after reading it. This change makes it so the coredump file is deleted when CrashReporter exits.
2021-11-08AK: Use ErrorOr<T> for MappedFile factoriesAndreas Kling
Replace Result<T, E> with ErrorOr<T> and propagate the error to callers.
2021-10-08CrashDaemon: Stop automatically compressing coredumpsAndreas Kling
This was a nice idea in theory, but in practice it makes big crashes (e.g WebContent) even more CPU intensive. Let's disable this for now (but keep the ability for CrashReporter to open compressed coredumps.)
2021-09-21CrashDaemon+CrashReporter: Streamline crash reporting a little bitAndreas Kling
Before this patch, this is what would happen after something crashed: 1. CrashDaemon finds a new coredump in /tmp 2. CrashDaemon compresses the new coredump (gzip) 3. CrashDaemon parses the uncompressed coredump and prints a backtrace 4. CrashDaemon launches CrashReporter 5. CrashReporter parses the uncompressed coredump (again) 6. CrashReporter unlinks the uncompressed coredump 7. CrashReporter displays a GUI This was taking quite a long time when dealing with large programs crashing (like Browser's WebContent processes.) The new flow: 1. CrashDaemon finds a new coredump in /tmp 2. CrashDaemon mmap()'s the (uncompressed) coredump 3. CrashDaemon launches CrashReporter 4. CrashDaemon goes to sleep for 3 seconds (hack alert!) 5. CrashReporter parses the (uncompressed) coredump 6. CrashReporter unlinks the (uncompressed) coredump 7. CrashReporter displays a GUI 8. CrashDaemon wakes up (after step 4) 9. CrashDaemon compresses the coredump (gzip) TL;DR: we no longer parse the coredumps twice, and we also prioritize launching the CrashReporter GUI immediately when a new coredump shows up, instead of compressing and parsing it in CrashDaemon first. The net effect of this is that you get a backtrace on screen much sooner. That's pretty nice. :^)
2021-08-23Everywhere: Core dump => CoredumpAndreas Kling
We all know what a coredump is, and it feels more natural to refer to it as a coredump (most code already does), so let's be consistent.
2021-07-22CrashDaemon: Remove BACKTRACE_DEBUG debugging codeAndreas Kling
This thing seems to work fine, no need to hang on to old debug code.
2021-06-19LibCoreDump: Include source locations of inlined functions in backtraceItamar
2021-06-17Everywhere: Add component declarationsGunnar Beutner
This adds component declarations so that users can select to not build certain parts of the OS.
2021-05-18CrashDaemon: Fix CrashReporter argument orderLinus Groh
For compressed coredumps, CrashReporter's argv were in this order: CrashReporter path --unlink Core::ArgsParser doesn't like that at all and would immediately exit from main(), causing the crash reporter to never display.
2021-05-12Userland+LibCore: Update FileWatcher + its users for InodeWatcher 2.0sin-ack
With the new InodeWatcher API, the old style of creating a watcher per inode will no longer work. Therefore the FileWatcher API has been updated to support multiple watches, and its users have also been refactored to the new style. At the moment, all operations done on a (Blocking)FileWatcher return Result objects, however, this may be changed in the future if it becomes too obnoxious. :^) Co-authored-by: Gunnar Beutner <gunnar@beutner.name>
2021-05-12LibCore+Everywhere: Move OpenMode out of IODeviceAli Mohammad Pur
...and make it an enum class so people don't omit "OpenMode".
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-03-28LibCoreDump+CrashDaemon: Compress coredumpsIdan Horowitz
Most coredumps contain large amounts of consecutive null bytes and as such are a prime candidate for compression. This commit makes CrashDaemon compress files once the kernel finishes emitting them, as well as adds the functionality needed in LibCoreDump to then parse them.
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-11LibCore: Added FileWatcher, a binding for the watch_file syscallDexesTTP
This wrapper abstracts the watch_file setup and file handling, and allows using the watch_file events as part of the event loop via the Core::Notifier class. Also renames the existing DirectoryWatcher class to BlockingFileWatcher, and adds support for the Modified mode in this class.
2021-01-15LibCoreDump+Crash{Daemon,Reporter}: Make backtraces thread-specificLinus Groh
We want to show an individual backtrace for each thread, not one containing backtrace entries from all threads. Fixes #4778.
2021-01-12Services: Move to Userland/Services/Andreas Kling