Skip Menu |

This queue is for tickets about the Net-Daemon CPAN distribution.

Report information
The Basics
Id: 27981
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Net-Daemon

People
Owner: MNOONING [...] cpan.org
Requestors: m.nooning [...] comcast.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.43
Fixed in: (no value)



Subject: Leftover mappings from thread creation
---------paste mnooning repy Hello Kevin, I suspect you are correct. I also suspect I am about to be the bearer of bad news. You see, I do not know thread programming. I have accepted baton in maintaining Net::Daemon because the maintainer before me at already left the project, and bugs were cropping up that needed fixed, and the original author was no longer working with it either. One of the prior problems, now fixed thanks to some industrious and knowledgeable others, was with threads programming. I contacted the original author who wrote me that the threads portion was put in after he left the project. So .... I am going to enter this as a bug at rt.cpan.org and hope that someone (like you?) plus others, will come up with ideas to fix it. The last three bugs I fixed were really fixed because other people wrote in ideas. I just put it together. I hope this will happen again here. Thanks ---------end paste ------- paste: Kevin Vincent Sheehan wrote: M, First off, let me praise Net::Daemon in no uncertain terms. It let me set up a daemon to monitor 150 lab systems for temperature, performance and let me control idling them to keep our A/C from going out. I'm not even a good Perl programmer, and it only took me 2 days. :-) Secondly, I think I've found a bug. Running the daemon for some time creates a very large VM footprint that consists of leftover mappings from thread creation. (The daemon is contacted every 10 minutes). I believe that the Daemon code fails to do a ->join() or ->detach() on the created threads. Under 3 different distros (RHEL3, FC4, rPath) I see the thread exit (which cleans it up as far as the kernel is concerned) but I don't see the mappings torn down, so they collect over time. I simulated the problem with threads alone and see the same behavior. ChildFunc for these distros uses the 'ithreads' method, which means that threads()->new() is called. I don't see the thread saved, and I don't see ->join() called anywhere. ->detach() might be sufficient to acheive the desired effect, but I've not tried it out on our systems. ------- end paste
Subject: [rt.cpan.org #27981] Leftover mappings from thread creation
Date: Wed, 06 Feb 2008 11:11:40 -0700
To: bug-Net-Daemon [...] rt.cpan.org
From: Matej Vela <Matej.Vela [...] carnet.hr>
I can confirm that calling ->detach() is the correct solution since the return value isn't used. Here's a patch, with corresponding tests. Thanks, Matej

Message body is not shown because sender requested not to inline it.

From: m.nooning [...] comcast.net
Once again I am indebted for the work of others. Thanks Matej! I probably will not able to get to this maybe for a few weeks. However, I do plan on incorporating your work, testing on Windows and Linux, and then releasing a new version. Thanks to all of you out there for your work. And also, thanks to any cpan tester who may be reading this. I can only feel confident of my work when a number of you, on different platforms, have reported passing test results. Thanks again, mnooning
Subject: Re: [rt.cpan.org #27981] Leftover mappings from thread creation
Date: Sat, 23 Feb 2008 17:48:28 -0500
To: bug-Net-Daemon [...] rt.cpan.org
From: mnooning <m.nooning [...] comncast.net>
Hello Matej Vela, I am using Perl 5.8.8 from ActiveState. I installed the latest threads - 1.69, and threads::shared - 1.17. Are the tests supposed to run on a Windows 2K or above machine? Neither ithread-detach.t, nor thread-detach, seem to work on Windows. Do you have access to a Windows 2000 or XP machine? The tests start, but give errors that I did not try to discern since I don't know threads programming, and I don't know if you intended them to be able to run on Windows. Thanks
RT-Send-CC: Matej.Vela [...] carnet.hr
Please try Net-Daemon-0.46 I tried Net-Daemon-0.46 on Windows, Fedora Linux from a few months ago, then updated the Fedora and it still passes, so it looks like version 0.46 is a winner. Thank you very much for taking the time to report the bug.
RT-Send-CC: Matej.Vela [...] carnet.hr
Please try Net-Daemon-0.46 I tried Net-Daemon-0.46 on Windows, Fedora Linux from a few months ago, then updated the Fedora and it still passes, so it looks like version 0.46 is a winner. Thank you very much for taking the time to report the bug.
On Tue Mar 01 11:49:24 2011, MNOONING wrote: Show quoted text
> Please try Net-Daemon-0.46 > > I tried Net-Daemon-0.46 on Windows, Fedora Linux from a few months ago, > then updated the Fedora and it still passes, so it looks like version > 0.46 is a winner. Thank you very much for taking the time to report the > bug. >
By the way, the patch you submitted still cause various failures, so I did not incorporate your patch. I did not the patch on Linux.
Ticket migrated to github as https://github.com/toddr/Net-Daemon/issues/12