bugGNU Octave - Bugs: bug #34595, print command creates zombie...

 
 

bug #34595: print command creates zombie processes

Submitter:  Daisuke TAKAGO <takago>
Submitted:  Wed 19 Oct 2011 02:16:30 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Works For Me Assigned to:  bpabbott
Originator Name:  Daisuke TAKAGO Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 08 Sep 2013 09:08:36 PM UTC, comment #14: 

killing the zombie bug.  Let's just hope it's not truly undead...

Rik <rik5>
Group administrator
Sun 08 Sep 2013 02:47:47 AM UTC, comment #13: 

I don't get the zombie processes either.  Ok to close?

Ben Abbott <bpabbott>
Group Member
Thu 29 Aug 2013 02:34:15 AM UTC, comment #12: 

Ping.  Can someone who had a problem with zombie processes try the development version.  Using hg id 91691d74845d I no longer seem to get zombies.

Rik <rik5>
Group administrator
Mon 12 Mar 2012 07:53:25 AM UTC, comment #11: 

probably this issue is caused by the following commit of mine:

http://hg.savannah.gnu.org/hgweb/octave/rev/2f0d1e12806d?revcount=32

Konstantinos Poulios <logari81>
Mon 20 Feb 2012 03:02:24 AM UTC, comment #10: 

Ben,

your example code does not hang up in my Devian environment....

>> close all
>> graphics_toolkit gnuplot
>> plot (rand (3))
>> graphics_toolkit fltk
>> figure (2)
>> plot (rand (3))
>> print junk.png

Daisuke TAKAGO <takago>
Sat 18 Feb 2012 05:35:40 PM UTC, comment #9: 

The following results in a hang.


close all
graphics_toolkit gnuplot
plot (rand (3))
graphics_toolkit fltk
figure (2)
plot (rand (3))
print junk.png


I assume waidpid() is "waiting" for gnuplot to terminate.

I'm going to revert this changeset. We need a way to identify the pid's associated with the print() command.

Ben Abbott <bpabbott>
Group Member
Sat 18 Feb 2012 01:10:54 AM UTC, comment #8: 

I changed the TODO -> FIXME and pushed the changeset.

http://hg.savannah.gnu.org/hgweb/octave/rev/688e19ca262b

If there are problems this can be reopened

Ben Abbott <bpabbott>
Group Member
Sat 18 Feb 2012 12:05:03 AM UTC, comment #7: 

It's probably a good idea to avoid any weirdness on MinGW.  Is there any problem with Cygwin as well?

From the Tips and Guidelines appendix, "The preferred comment mark for places that may need further attention is FIXME."  Maybe you can change TODO to FIXME in the patch?

Rik <rik5>
Group administrator
Fri 17 Feb 2012 11:21:51 PM UTC, comment #6: 

I thought it wise to avoid changing the behavior of mingw, so I've modified the changeset. The 2nd version has been attached.

(file #25078)

Ben Abbott <bpabbott>
Group Member
Fri 17 Feb 2012 04:58:26 AM UTC, comment #5: 

The patch works for me as well on Kubuntu 10.04 (A Debian derivative).

Ben, to check for zombie processes you should have some sort of process table viewer.  Otherwise, you can do it from the command line using the 'ps' command.

For example, pre-patch


./run-octave
graphics_toolkit fltk
plot (1:10);
print -depsc2 test.eps

Now go to another command line shell window.
ps -eo stat,pid,ppid,cmd | grep '^Z'

Lines that start with 'Z' are zombie processes.  The third column is the parent process id (ppid).  Try the following where PPID is replaced by the numerical value from the line above to see who owns the zombie process.

ps -eo pid,cmd | grep PPID

Sample results from my computer were
Z+   14112 13913 [sh] <defunct>

and
13913 /home/rik/wip/Projects_Mine/octave-dev/src/.libs/lt-octave

which is "run-octave"


Rik <rik5>
Group administrator
Fri 17 Feb 2012 04:23:35 AM UTC, comment #4: 

the patch works well in my Debian environment.

octave 3.7.0+
Debian 6(i686)
libfltk 1.1
------

Daisuke TAKAGO <takago>
Fri 17 Feb 2012 04:21:30 AM UTC, comment #3: 

t works in my Debian environment.



octave 3.7.0+
Debian 6(i686)
libfltk 1.1
------

Daisuke TAKAGO <takago>
Fri 17 Feb 2012 12:44:23 AM UTC, comment #2: 

I've attached a changeset.

Either I don't know how or I don't see the zombie processes, so i'm not sure this is a working solution. I won't push until I have confirmation.

If someone can tell me how to check on the zombie processes that would helpful as well (I'm on MacOS, but can check on Ubuntu as well)

(file #25073)

Ben Abbott <bpabbott>
Group Member
Wed 26 Oct 2011 03:48:09 AM UTC, comment #1: 

This is confirmed on the development branch.  Multiple print commands also produce multiple zombies.  The proposed solution of using "waitpid (0)" also works.

Rik <rik5>
Group administrator
Wed 19 Oct 2011 02:16:30 AM UTC, original submission:  

In fltk backend(not gnuplot backend), the "print" command generates a zombie process.

>> plot(1:100);
>> print -depsc2 test.eps


To clear the zombie process, it needs to call the "waidpid" command manually, like this.

>> waitpid(0)    


Is this a bug?


Daisuke TAKAGO <takago>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #25078:  changeset.patch added by bpabbott (766B - application/octet-stream - second attempt)
file #25073:  changeset.patch added by bpabbott (564B - application/octet-stream - changeset #1)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by logari81 (Posted a comment)
  • -email is unavailable- added by bpabbott (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by takago (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-08 rik5 StatusNeed Info Works For Me
        Open/ClosedOpen Closed
    2013-08-29 rik5 StatusPostponed Need Info
    2012-02-18 bpabbott StatusFixed Postponed
        Open/ClosedClosed Open
    2012-02-18 bpabbott StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2012-02-17 bpabbott Attached File- Added changeset.patch, #25078
    2012-02-17 bpabbott StatusConfirmed Ready For Test
        Assigned toNone bpabbott
    2012-02-17 bpabbott Attached File- Added changeset.patch, #25073
    2011-10-26 rik5 StatusNone Confirmed
        Summary&quot;print command&quot; and zombie processes print command creates zombie processes

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code