commit | 7f2f8027b013c39e28da6b3e1e10f6ddc7d3d042 | [log] [tgz] |
---|---|---|
author | Jayanth Othayoth <ojayanth@in.ibm.com> | Fri Sep 22 11:22:25 2017 -0500 |
committer | Jayanth Othayoth <ojayanth@in.ibm.com> | Thu Oct 12 06:14:17 2017 -0500 |
tree | 0a40c26a5ee9ea7b8a1ca3d2022ef8c3a835778c | |
parent | 3108597441bf178bca34c9bf93fb061c56e26068 [diff] |
Fix for missing core file in the ApplicationCored type BMC dump During application core, Systemd-coredump creates a temporary core file first, compresses the file and renames it to systemd-coredump name format. dreport relies on inotify notifications to initiate the core dump collection. Usually inotify generates IN_MOVED_TO events followed by IN_CLOSE_WRITE event on creation of system-coredump file. In UBI filesystem, inotify notification events behave differently as summarized below: -------------------------------------------------------------------- Inotifiy Event : UBI FS : COW -------------------------------------------------------------------- - IN_MOVED_TO : _NA_ : notification event : : structure provides the : : name of the core file. : : - IN_CREATE : notification event : _NA_ : structure provides : : the name of the core : : file. : : : - IN_CLOSE_NOWRITE : notification triggers: _NA_ : directory level and : : size of name field : : shows zero. : : : : : - IN_CLOSE_WRITE : notification event : notification event : structure provides : structure provides the : the INODE number : name of the core file. : instead of name of : : the core file. : ---------------------------------------------------------------------- Current implementation relies on inotify IN_CLOSE_WRITE event with the name of the core file to trigger the dump collection. However, in UBI FS, the inode number is sent in the inotify instead of the name of the core file. Hence the copying of the core file during the dump collection process fails due to lack of the file name information. While IN_CLOSE_WRITE is the appropriate event, IN_CREATE is the closest match for UBI FS. Hence the *workaround* published by this patch watches for IN_CREATE event for the UBI FS based systems. One possible side effect is premature handling of large systemd-core file resulting in an incomplete file. However, this was _not_ observed during testing due to the time interval between the inotify and dreport consuming the file. A more generic fix may be explored for issue #2287. Resolves openbmc/openbmc#2240 Change-Id: Id88181c62a34c05646eed4ac7e67d9b37a523733 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Phosphor Debug Collector provides mechanisms to collect various log files and system parameters. Used to troubleshoot problems in OpenBMC based systems.
To build this package, do the following steps: 1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make To clean the repository run `./bootstrap.sh clean`.