Bug 185833 - glslideshow leaves lots of ZOMBIE process
Summary: glslideshow leaves lots of ZOMBIE process
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xscreensaver
Version: rawhide
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC5Update
TreeView+ depends on / blocked
 
Reported: 2006-03-19 06:32 UTC by Mamoru TASAKA
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-04-04 19:05:55 UTC
Type: ---
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Novell 145173 0 None None None Never

Description Mamoru TASAKA 2006-03-19 06:32:24 UTC
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 06:32:25 UTC
Created attachment 126319 [details]
pstree log text of glslideshow

Comment 2 Mamoru TASAKA 2006-03-19 06:37:06 UTC
This problem still exists on xscreensaver version 5.00a11.


Comment 3 Jamie Zawinski 2006-03-20 01:38:00 UTC
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 07:33:13 UTC
Okay. That patch works well for me ( and also xscreensaver 5.00a12).
Thanks!

Comment 5 Ray Strode [halfline] 2006-03-22 15:32:12 UTC
Adding to the FC5Update tracker, so we can get this fix in as an FC5 update.

Comment 6 Ray Strode [halfline] 2006-03-27 20:50:26 UTC
This should be pushed into updates-testing sometime today or tomorrow.

Comment 7 Mamoru TASAKA 2006-03-28 08:31:22 UTC
For this problem, updates-testing rpm 4.24-2 works well for me.   

Comment 8 Ray Strode [halfline] 2006-03-28 16:53:44 UTC
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.