Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coredump: avoid deadlock when passing processed backtrace data
We would deadlock when passing the data back from the forked-off process that was doing backtrace generation back to the coredump parent. This is because we fork the child and wait for it to exit. The child tries to write too much data to the output pipe, and and after the first 64k blocks on the parent because the pipe is full. The bug surfaced in Fedora because of a combination of four factors: - 8770778 was backported to v251.5, which allowed coredump processing to be successful. - 1a0281a was NOT backported, so the output was very verbose. - Fedora has the ELF package metadata available, so a lot of output can be generated. Most other distros just don't have the information. - gnome-calendar crashes and has a bazillion modules and 69596 bytes of output are generated for it. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2135778. The code is changed to try to write data opportunistically. If we get partial information, that is still logged. In is generally better to log partial backtrace information than nothing at all.
- Loading branch information