Re: unexpected Apache::VMonitor output

[prev] [thread] [next] [Date index for 2005/01/29]

From: Stas Bekman
Subject: Re: unexpected Apache::VMonitor output
Date: 02:18 on 29 Jan 2005
Todd Finney wrote:
> At 08:37 PM 1/21/2005 -0500, Stas Bekman wrote:
> 
>> Todd Finney wrote:
>>
>>> Unlikely.  The errant processes all seem to be daemontools programs 
>>> like supervise and svcscanboot.  Those processes are started long 
>>> before apache starts, and they exist until after it goes away.
>>
>>
>> Understood. In which case I don't know what the problem is. I'd have 
>> been more helpful if I could reproduce it here.
> 
> 
> Can you give this a try?
> 
> ------------------------------------------
> #!/usr/bin/perl -w
> use strict;
> $|++;
> use Apache::Scoreboard;
> my $image=Apache::Scoreboard->fetch("[a scoreboard location]");
> for (my $parent = $image->parent; $parent; $parent = $parent->next) {
>     my $pid = $parent->pid;
>     print $pid,': ',(`/bin/ps --no-headers $pid` || "Process Not 
> Found\n" );
> }

Yup, it works perfectly fine for me. Only httpd procs are printed and they 
all exist. I'm in the process of writing a test suite for 
Apache-Scoreboard 1.x, so one can just write 'make test' if they have a 
problem.

So I'm not sure why do you see a different behavior.

> ------------------------------------------
> (How is this different from iterating @{$image->pids()}?)

You can't do much with pids after you get them. But if that's all you want 
to get, it should be the same.

> Unless I'm completely misunderstanding the man page for 
> Apache::Scoreboard, this should spit out a list of Apache processes.  
> I'm getting stuff like this instead:
> 
> (incomplete listing...)
> 51825: Process Not Found
> 17057: 17057 ?        S      0:01 
> /usr/local/apache-perl-1.3.33_5.8c/bin/httpd
> 51581: Process Not Found
> 17139: 17139 ?        S      0:01 
> /usr/local/apache-perl-1.3.33_5.8c/bin/httpd
> 52940: Process Not Found
> 16615: Process Not Found
> 51785: Process Not Found
> 16632: Process Not Found
> 47713: Process Not Found
> 16633: Process Not Found
> 47502: Process Not Found
> 16673: 16673 ?        S      0:02 
> /usr/local/apache-perl-1.3.33_5.8c/bin/httpd
> 46439: Process Not Found
> 16493: Process Not Found
> 46848: Process Not Found

But it's consistent with the above loop, right? (i.e. it spits the same 
non-existing procs)

>>> VMonitor 2.02's `make test` is complaining loudly most of the time, 
>>> failing tests 3-6.  It managed to succeed once, though.   If I go 
>>> ahead and install it anyway, pulling up the VMonitor page causes the 
>>> process to segfault.
>>
>>
>> Ouch. Most likely it was introduced by Apache-Scoreboard's last 
>> change. Please try with this patch:
> 
> 
> I'm not sure if it's related, but this:
> 
> ------------------------------------------
> #!/usr/bin/perl -w
> use strict;
> $|++;
> use Apache::Scoreboard;
> my $image=Apache::Scoreboard->fetch("[a scoreboard url]");
> for (my $parent = $image->parent; $parent; $parent = $parent->next) {
>     my $server = $parent->server; #Apache::ServerScore object
>     print $server->vhost,"\n";
> }
> ------------------------------------------
> 
> still segfults on my machine.  VMonitor is working fine, though.

Yup, I get it too. Blame the lack of the test suite. Hopefully we will 
gradually create one. I'm starting with your test cases that you've reported.

        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

(message missing)

Re: unexpected Apache::VMonitor output
Todd Finney 10:38 on 14 Jan 2005

Re: unexpected Apache::VMonitor output
Stas Bekman 22:30 on 21 Jan 2005

Re: unexpected Apache::VMonitor output
Todd Finney 01:07 on 22 Jan 2005

Re: unexpected Apache::VMonitor output
Stas Bekman 01:37 on 22 Jan 2005

Re: unexpected Apache::VMonitor output
Todd Finney 01:54 on 22 Jan 2005

Re: unexpected Apache::VMonitor output
Stas Bekman 02:00 on 22 Jan 2005

Re: unexpected Apache::VMonitor output
Todd Finney 02:02 on 26 Jan 2005

Re: unexpected Apache::VMonitor output
Stas Bekman 02:18 on 29 Jan 2005

Re: unexpected Apache::VMonitor output
Todd Finney 02:43 on 29 Jan 2005

Re: unexpected Apache::VMonitor output
Stas Bekman 02:53 on 29 Jan 2005

Re: unexpected Apache::VMonitor output
Todd Finney 03:08 on 29 Jan 2005

Re: unexpected Apache::VMonitor output
Stas Bekman 03:16 on 29 Jan 2005

Re: unexpected Apache::VMonitor output
Stas Bekman 02:42 on 29 Jan 2005

Re: unexpected Apache::VMonitor output
Stas Bekman 02:48 on 29 Jan 2005

Generated at 12:39 on 05 Feb 2005 by mariachi v0.52