Clean up the "frecon <defunct>" zombie process |
||||
Issue descriptionChrome OS Version: R70-10931.0.0 Chrome OS Platform: any Steps To Reproduce: (1) Boot test image (1) ps aux | grep frecon Expected Result: One live frecon process. Actual Result: root 253 0.7 0.1 18960 4940 ? Ss 16:43 0:00 frecon --daemon --clear 0xfffefefe --frame-interval 25 --dev-mode --enable-osc --enable-vts --pre-create-vts --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame01.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame02.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame03.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame04.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame05.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame06.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame07.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame08.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame09.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame10.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame11.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame12.png --image-hires /usr/share/chromeos-assets/images_200_percent/boot_splash_frame13.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame01.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame02.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame03.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame04.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame05.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame06.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame07.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame08.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame09.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame10.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame11.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame12.png --image /usr/share/chromeos-assets/images_100_percent/boot_splash_frame13.png root 262 0.0 0.0 0 0 ? Zs 16:43 0:00 [frecon] <defunct> How frequently does this problem reproduce? (Always, sometimes, hard to reproduce?) Always? This is not new. From issue 793537#2 (Dec 16 2017) I see a "[frecon] <defunct>". It is also not critical, but something we should probably clean up.
,
Aug 3
seems like an easy fix would be to just do signal(SIGCHLD, SIG_IGN) in the frecon parent
,
Aug 3
https://chromium-review.googlesource.com/c/chromiumos/platform/frecon/+/1162924 frecon: Don't leave zombies behind when children are killed
,
Aug 5
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/frecon/+/c6036a87a1914ea95caf47a9c1b6a5766502bdb9 commit c6036a87a1914ea95caf47a9c1b6a5766502bdb9 Author: Daniel Kurtz <djkurtz@chromium.org> Date: Sun Aug 05 06:46:37 2018 frecon: Don't leave zombies behind when children are killed Frecon creates child processes for terminals using fork(). For interactive terminals, these forked processes use fork()/execve(), for non-interactive terminals, the forked process stays in an infinite sleep. If the non-interactive terminal's infinite-sleeping child process receives SIGHUP it will die, but since frecon isn't paying attention, the process will remain a zombie. We can use sigaction to set the SA_NOCLDWAIT flag on the SIG_DFL handler to keep such children from becoming zombies. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> BUG= chromium:870485 TEST=stop ui pkill frecon frecon --daemon ps -ef | grep frecon => No "[frecon] <defunct>" Change-Id: I41d19d05e7b18ed1e154f4023006ef95954abaa8 Reviewed-on: https://chromium-review.googlesource.com/1162924 Commit-Ready: Daniel Kurtz <djkurtz@chromium.org> Tested-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/c6036a87a1914ea95caf47a9c1b6a5766502bdb9/main.c
,
Aug 6
,
Sep 21
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/frecon/+/fbd668b02214a81e304732e1703ae9909271e04e commit fbd668b02214a81e304732e1703ae9909271e04e Author: Rajat Jain <rajatja@chromium.org> Date: Fri Sep 21 07:51:15 2018 Revert "frecon: Don't leave zombies behind when children are killed" This reverts commit c6036a87a1914ea95caf47a9c1b6a5766502bdb9. Reason for revert: For unknown reasons this CL causes a blank out of 2-3 seconds on multiple platforms. I tried alternate ways to do the cleanup this CL was doing (https://buganizer.corp.google.com/issues/115927088#comment13) but none works. Lets revert this cleanup CL to avoid a functional regression. Original change's description: > frecon: Don't leave zombies behind when children are killed > > Frecon creates child processes for terminals using fork(). > For interactive terminals, these forked processes use fork()/execve(), > for non-interactive terminals, the forked process stays in an infinite > sleep. > > If the non-interactive terminal's infinite-sleeping child process receives > SIGHUP it will die, but since frecon isn't paying attention, the process > will remain a zombie. > > We can use sigaction to set the SA_NOCLDWAIT flag on the SIG_DFL handler > to keep such children from becoming zombies. > > Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> > > BUG= chromium:870485 > TEST=stop ui > pkill frecon > frecon --daemon > ps -ef | grep frecon > => No "[frecon] <defunct>" > > Change-Id: I41d19d05e7b18ed1e154f4023006ef95954abaa8 > Reviewed-on: https://chromium-review.googlesource.com/1162924 > Commit-Ready: Daniel Kurtz <djkurtz@chromium.org> > Tested-by: Daniel Kurtz <djkurtz@chromium.org> > Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> > Reviewed-by: Mike Frysinger <vapier@chromium.org> Bug: chromium:870485 , b:115927088 Change-Id: Ie839709f7941d673d1013a7516c3b08c04f1594e Reviewed-on: https://chromium-review.googlesource.com/1237331 Commit-Ready: Rajat Jain <rajatja@chromium.org> Tested-by: Rajat Jain <rajatja@chromium.org> Reviewed-by: Rajat Jain <rajatja@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> [modify] https://crrev.com/fbd668b02214a81e304732e1703ae9909271e04e/main.c
,
Sep 21
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/frecon/+/7f3e574c5de80ad5196616e3a89a42fa607de95c commit 7f3e574c5de80ad5196616e3a89a42fa607de95c Author: Rajat Jain <rajatja@chromium.org> Date: Fri Sep 21 23:42:27 2018 Revert "frecon: Don't leave zombies behind when children are killed" This reverts commit c6036a87a1914ea95caf47a9c1b6a5766502bdb9. Reason for revert: For unknown reasons this CL causes a blank out of 2-3 seconds on multiple platforms. I tried alternate ways to do the cleanup this CL was doing (https://buganizer.corp.google.com/issues/115927088#comment13) but none works. Lets revert this cleanup CL to avoid a functional regression. Original change's description: > frecon: Don't leave zombies behind when children are killed > > Frecon creates child processes for terminals using fork(). > For interactive terminals, these forked processes use fork()/execve(), > for non-interactive terminals, the forked process stays in an infinite > sleep. > > If the non-interactive terminal's infinite-sleeping child process receives > SIGHUP it will die, but since frecon isn't paying attention, the process > will remain a zombie. > > We can use sigaction to set the SA_NOCLDWAIT flag on the SIG_DFL handler > to keep such children from becoming zombies. > > Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> > > BUG= chromium:870485 > TEST=stop ui > pkill frecon > frecon --daemon > ps -ef | grep frecon > => No "[frecon] <defunct>" > > Change-Id: I41d19d05e7b18ed1e154f4023006ef95954abaa8 > Reviewed-on: https://chromium-review.googlesource.com/1162924 > Commit-Ready: Daniel Kurtz <djkurtz@chromium.org> > Tested-by: Daniel Kurtz <djkurtz@chromium.org> > Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> > Reviewed-by: Mike Frysinger <vapier@chromium.org> Bug: chromium:870485 , b:115927088 Change-Id: Ie839709f7941d673d1013a7516c3b08c04f1594e Reviewed-on: https://chromium-review.googlesource.com/1237331 Commit-Ready: Rajat Jain <rajatja@chromium.org> Tested-by: Rajat Jain <rajatja@chromium.org> Reviewed-by: Rajat Jain <rajatja@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> (cherry picked from commit fbd668b02214a81e304732e1703ae9909271e04e) Reviewed-on: https://chromium-review.googlesource.com/1238848 Commit-Queue: Rajat Jain <rajatja@chromium.org> Trybot-Ready: Rajat Jain <rajatja@chromium.org> [modify] https://crrev.com/7f3e574c5de80ad5196616e3a89a42fa607de95c/main.c |
||||
►
Sign in to add a comment |
||||
Comment 1 by djkurtz@chromium.org
, Aug 3