Skip Menu |

This queue is for tickets about the Sys-Statistics-Linux CPAN distribution.

Report information
The Basics
Id: 48458
Status: resolved
Priority: 0/
Queue: Sys-Statistics-Linux

People
Owner: Nobody in particular
Requestors: frequency [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.52
Fixed in: (no value)



Subject: Build Issues Related to wchan
Hi: On my system (Debian unstable), I'm having difficulty building your package because of empty files in /proc/*/wchan Basically, your module expects it to contain one or more lines, but if it doesn't, like on my system: $ cat /proc/1/wchan $ Then your module fails explosively. I'm really not even sure if this is a problem with my Debian environment or whether it is an issue with your module, and from my research I can't even tell what 'wchan' is for. Notably, 'man ps' has this explanation: wchan WCHAN name of the kernel function in which the process is sleeping, a "-" if the process is running, or a "*" if the process is multi-threaded and ps is not displaying threads. But the explanation doesn't mean a whole lot to me. Anyway, while packaging your module for Debian I found that the following patch fixes the build failures we have been having: --- a/lib/Sys/Statistics/Linux/Processes.pm +++ b/lib/Sys/Statistics/Linux/Processes.pm @@ -321,6 +321,9 @@ if (open my $fh, '<', "$file->{basedir}/$pid/$file->{wchan}") { $stats{$pid}{wchan} = <$fh>; + unless (defined $stats{$pid}{wchan}) { + $stats{$pid}{wchan} = ''; + } chomp($stats{$pid}{wchan}); } else { delete $stats{$pid}; Note that this fixes the issue noted in this Debian bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539984 Any help you could provide us to track down the cause of this issue would be great (and we would be tremendously appreciative), otherwise the above patch seems to "fix" things for us... Cheers, Jonathan
On Mi. 05. Aug. 2009, 13:25:28, FREQUENCY wrote: Show quoted text
> Then your module fails explosively. I'm really not even sure if this
is Show quoted text
> a problem with my Debian environment or whether it is an issue with
your Show quoted text
> module, and from my research I can't even tell what 'wchan' is for.
I don't think it's a problem with "the module". I think that you receive a error message like "Use of uninitialized value ..." or any other message that could happen if $sys{1}{wchan} is undefined. Right? What is the error message?
Hi, version 0.53_01 uploaded. Please tell me if the issue is fixed. Cheers
Hi: On Mon Aug 10 02:49:29 2009, BLOONIX wrote: Show quoted text
> Hi, > > version 0.53_01 uploaded. > > Please tell me if the issue is fixed.
Yes, it's fixed, all tests are passing perfectly now. Thanks! Show quoted text
> > Cheers