Bug 13191 - zcat multiple gz files will generate zombie processes
Summary: zcat multiple gz files will generate zombie processes
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.31.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-09 13:29 UTC by xiechengliang
Modified: 2020-10-19 13:40 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:


Attachments
zcat multiple gz files will generate zombie processes (820 bytes, application/octet-stream)
2020-09-09 13:29 UTC, xiechengliang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xiechengliang 2020-09-09 13:29:06 UTC
Created attachment 8581 [details]
zcat multiple gz files will generate zombie processes

When I use zcat to view the contents of several compressed packages, these come from the community,some zombie processes will be generated before the zcat task is completed。
For example:
  $ zcat attr-2.4.48.tar.gz iproute2-5.5.0.tar.gz libffi-3.3.tar.gz

 I use the ps command to view the process status, the result is as follows:
  $ ps -ef | grep zcat
  root       12583    9689  0 20:50 pts/5    00:00:00 zcat attr-2.4.48.tar.gz iproute2-5.5.0.tar.gz libffi-3.3.tar.gz
  root       12584   12583  0 20:50 pts/5    00:00:00 [zcat] <defunct>
  root       12587   12583  0 20:50 pts/5    00:00:00 [zcat] <defunct>

  When the zcat task ends, the zombie process is recycled, when the compressed package is relatively large, the zombie process will exist for a period of time.

  When viewing each compressed package, will fork a child, but the parent process does not reclaim resources after the child ends. 
  Should the resource be reclaimed when the child process exits?The attachment provides a repair plan for reference.
Comment 1 Denys Vlasenko 2020-10-07 14:25:38 UTC
Each zombie takes only ~12 kb on x86-64, irrespective of its memory use prior to death. I don't feel it's worth fixing.
Dio you disagree?
Comment 2 xiechengliang 2020-10-19 13:40:40 UTC
(In reply to Denys Vlasenko from comment #1)
Although the impact is small, it is a problem.