Unnamed repository
Resolves: RHEL-144738
Upstream: makedumpfile
Conflict: None
commit 65bf4c9ef0fd0cbf2fb99b60e15b00d984b391b8
Author: Tao Liu <ltao@redhat.com>
Date: Wed Jun 25 14:23:44 2025 +1200
[PATCH v2] Fix a data race in multi-threading mode (--num-threads=N)
A vmcore corrupt issue has been noticed in powerpc arch [1]. It can be
reproduced with upstream makedumpfile.
When analyzing the corrupt vmcore using crash, the following error
message will output:
crash: compressed kdump: uncompress failed: 0
crash: read error: kernel virtual address: c0001e2d2fe48000 type:
"hardirq thread_union"
crash: cannot read hardirq_ctx[930] at c0001e2d2fe48000
crash: compressed kdump: uncompress failed: 0
If the vmcore is generated without num-threads option, then no such
errors are noticed.
With --num-threads=N enabled, there will be N sub-threads created. All
sub-threads are producers which responsible for mm page processing, e.g.
compression. The main thread is the consumer which responsible for
writing the compressed data into file. page_flag_buf->ready is used to
sync main and sub-threads. When a sub-thread finishes page processing,
it will set ready flag to be FLAG_READY. In the meantime, main thread
looply check all threads of the ready flags, and break the loop when
find FLAG_READY.
page_flag_buf->ready is read/write by main/sub-threads simultaneously,
but it is unprotected and unsafe. I have tested both mutex and atomic_rw
can fix this issue. This patch takes atomic_rw for its simplicity.
[1]: https://github.com/makedumpfile/makedumpfile/issues/15
Resolves: https://github.com/makedumpfile/makedumpfile/issues/15
Tested-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Tao Liu <ltao@redhat.com>
Signed-off-by: Pingfan Liu <piliu@redhat.com>
|
||
|---|---|---|
| spec | ||
| tests | ||
| .editorconfig | ||
| .gitignore | ||
| 60-fadump.install | ||
| 60-kdump.install | ||
| 92-crashkernel.install | ||
| 98-kexec.rules | ||
| 98-kexec.rules.ppc64 | ||
| 99-kdump.conf | ||
| crashkernel-howto.txt | ||
| dracut-early-kdump-module-setup.sh | ||
| dracut-early-kdump.sh | ||
| dracut-fadump-init-fadump.sh | ||
| dracut-fadump-module-setup.sh | ||
| dracut-kdump-capture.service | ||
| dracut-kdump-emergency.service | ||
| dracut-kdump-emergency.target | ||
| dracut-kdump.sh | ||
| dracut-kexec-crypt-setup.sh | ||
| dracut-module-setup.sh | ||
| dracut-monitor_dd_progress | ||
| early-kdump-howto.txt | ||
| fadump-howto.txt | ||
| gating.yaml | ||
| gen-kdump-conf.sh | ||
| kdump-dep-generator.sh | ||
| kdump-in-cluster-environment.txt | ||
| kdump-lib-initramfs.sh | ||
| kdump-lib.sh | ||
| kdump-logger.sh | ||
| kdump-migrate-action.sh | ||
| kdump-restart.sh | ||
| kdump-udev-throttler | ||
| kdump.conf.5 | ||
| kdump.service | ||
| kdump.sysconfig | ||
| kdump.sysconfig.aarch64 | ||
| kdump.sysconfig.i386 | ||
| kdump.sysconfig.ppc64 | ||
| kdump.sysconfig.ppc64le | ||
| kdump.sysconfig.s390x | ||
| kdump.sysconfig.x86_64 | ||
| kdumpctl | ||
| kdumpctl.8 | ||
| kexec_file-add-kexec_file-flag-to-support-debug-prin.patch | ||
| kexec-kdump-howto.txt | ||
| kexec-tools-2.0.29-makedumpfile-Fix-a-data-race-in-multi-threading-mode-num.patch | ||
| kexec-tools.spec | ||
| kexec-update-manpage-with-explicit-mention-of-clean-.patch | ||
| live-image-kdump-howto.txt | ||
| mkdumprd | ||
| mkdumprd.8 | ||
| mkfadumprd | ||
| README | ||
| sources | ||
| supported-kdump-targets.txt | ||
| zanata-notes.txt | ||
Adding a patch to kexec-tools ============================= There is a mailing list kexec@lists.fedoraproject.org where all the dicussion related to fedora kexec-tools happen. All the patches are posted there for inclusion and committed to kexec-tools after review. So if you want your patches to be included in fedora kexec-tools package, post these to kexec@lists.fedoraproject.org. One can subscribe to list and browse through archives here. https://admin.fedoraproject.org/mailman/listinfo/kexec