HomeFreeBSD

Fixes for i/o during coredumping:

Description

Fixes for i/o during coredumping:

  • Do not dump into system files.
  • Do not acquire write reference to the mount point where img.core is written, in the coredump(). The vn_rdwr() calls from ELF imgact request the write ref from vn_rdwr(). Recursive acqusition of the write ref deadlocks with the unmount.
  • Instead, take the range lock for the whole core file. This prevents parallel dumping from two processes executing the same image, converting the useless interleaved dump into sequential dumping, with second core overwriting the first.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

Details

Provenance
kibAuthored on
Parents
rS272534: Add IO_RANGELOCKED flag for vn_rdwr(9), which specifies that vnode is
Branches
Unknown
Tags
Unknown

Event Timeline