Bug 185833 - glslideshow leaves lots of ZOMBIE process
glslideshow leaves lots of ZOMBIE process
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: xscreensaver (Show other bugs)
rawhide
All Linux
medium Severity high
: ---
: ---
Assigned To: Ray Strode [halfline]
:
Depends On:
Blocks: FC5Update
  Show dependency treegraph
 
Reported: 2006-03-19 01:32 EST by Mamoru TASAKA
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-04-04 15:05:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
pstree log text of glslideshow (1.11 KB, text/plain)
2006-03-19 01:32 EST, Mamoru TASAKA
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Novell 145173 None None None Never

  None (edit)
Description Mamoru TASAKA 2006-03-19 01:32:24 EST
Description of problem:
( I found this bug from https://bugzilla.novell.com/show_bug.cgi?id=145173 )
GLSlideshow leaves a zombie process each time a image is loaded.
This may fill the process table quickly.

Version-Release number of selected component (if applicable):
xscreensaver-gl-extras-4.24-1.1


How reproducible:
Always


Steps to Reproduce:
1. invoke /usr/libexec/xscreensaver/glslideshow or invoke xscreensaver-demo and
select GLSlideshow
2. Wait...
3.
  
Actual results:
GLSlideshow leaves lots of zombie process.

Expected results:
No zombie process...

Additional info:
Comment 1 Mamoru TASAKA 2006-03-19 01:32:25 EST
Created attachment 126319 [details]
pstree log text of glslideshow
Comment 2 Mamoru TASAKA 2006-03-19 01:37:06 EST
This problem still exists on xscreensaver version 5.00a11.
Comment 3 Jamie Zawinski 2006-03-19 20:38:00 EST
I think this should fix it -- let me know?


RCS file: /cvsroot/xscreensaver/utils/grabclient.c,v
retrieving revision 1.17
diff -u -r1.17 grabclient.c
--- grabclient.c	1 Mar 2006 11:35:52 -0000	1.17
+++ grabclient.c	20 Mar 2006 01:35:43 -0000
@@ -302,6 +302,7 @@
   FILE *read_pipe;
   FILE *write_pipe;
   XtInputId pipe_id;
+  pid_t pid;
 } grabclient_data;
 
 
@@ -350,7 +351,8 @@
                    (XtPointer) (XtInputReadMask | XtInputExceptMask),
                    finalize_cb, (XtPointer) data);
 
-  switch ((int) (forked = fork ()))
+  forked = fork ();
+  switch ((int) forked)
     {
     case -1:
       sprintf (buf, "%s: couldn't fork", progname);
@@ -379,6 +381,7 @@
     default:					/* parent */
       fclose (data->write_pipe);
       data->write_pipe = 0;
+      data->pid = forked;
       break;
     }
 }
@@ -405,6 +408,14 @@
   if (name) free (name);
 
   fclose (data->read_pipe);
+
+  if (data->pid)	/* reap zombies */
+    {
+      int status;
+      waitpid (data->pid, &status, 0);
+      data->pid = 0;
+    }
+
   memset (data, 0, sizeof (*data));
   free (data);
 }
Comment 4 Mamoru TASAKA 2006-03-22 02:33:13 EST
Okay. That patch works well for me ( and also xscreensaver 5.00a12).
Thanks!
Comment 5 Ray Strode [halfline] 2006-03-22 10:32:12 EST
Adding to the FC5Update tracker, so we can get this fix in as an FC5 update.
Comment 6 Ray Strode [halfline] 2006-03-27 15:50:26 EST
This should be pushed into updates-testing sometime today or tomorrow.
Comment 7 Mamoru TASAKA 2006-03-28 03:31:22 EST
For this problem, updates-testing rpm 4.24-2 works well for me.   
Comment 8 Ray Strode [halfline] 2006-03-28 11:53:44 EST
Great, i'll push it to -updates.  Thanks.

Note You need to log in before you can comment on or make changes to this bug.