Project

General

Profile

Bug #6052

Proposed patch to address a problem with autorepl.py

Added by Xin Li about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Currently autorepl.py does not waitpid() the 'zfs send' process that does the sending work. When there are a lot of replication happen in one run (with less replication tasks, this is less of a problem as init(8) would eventually wait() the processes when it adopts the orphaned zombies), this would result in one zombie per each replication.

The proposed patch tries to address this by doing an explicit waitpid() after the piped command is completed or when the pipe is broken. While I'm there also take advantage of the saved os.fork() result to eliminate an unneeded getpid() call and transfer the task of writing pid down to the parent.

autorepl.diff (1.53 KB) autorepl.diff Proposed patch Xin Li, 09/09/2014 06:20 AM

Associated revisions

Revision 508310da (diff)
Added by William Grzybowski about 6 years ago

Address zombie process in the replication by using waitpid Submitted by: delphij Ticket: #6052

Revision 705bcf0b (diff)
Added by William Grzybowski about 6 years ago

Address zombie process in the replication by using waitpid Submitted by: delphij Ticket: #6052 (cherry picked from commit 7b1438e2920fb2b8e44f8a690c6334d868da869a)

History

#1 Updated by William Grzybowski about 6 years ago

  • Status changed from Fix In Progress to Resolved

Also available in: Atom PDF