Bug#194762: Probably a problem in Text::ParseWords

2005-08-01 Thread Paul Hink
As the segfault of monshow(1) reported in bug #194762 did not occur
before the update from woody to sarge, the maximum number of characters
that parse_line() can process seems to have been changed by this
update.

Paul


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#194762: Probably a problem in Text::ParseWords

2005-07-31 Thread Paul Hink
The segfault is probably caused by Text::ParseWords->parse_line() as
described in bug #320727. parse_line() is indirectly invoked by
monshow(1):

(All line numbers are referring to the software versions shipped with
sarge.)

-  /usr/bin/monshow, line 155:
   | my ($e, $st) = get_client_status ($what);

-> /usr/bin/monshow, line 747 (function get_client_status):
   | %opstatus = $cl->list_opstatus (@list);

-> /usr/share/perl5/Mon/Client.pm, line 1133 (function
   Mon::Client->list_opstatus):
   | _list_opstatus ($self, "list opstatus " . join (" ", @l));

-> /usr/share/perl5/Mon/Client.pm, line 1932 (function
   Mon::Client->_list_opstatus):
   | foreach my $w (quotewords ('\s+', 0, $o)) {

-> /usr/share/perl/5.8/Text/ParseWords.pm, line 25 (function
   Text::ParseWords->quotewords):
   | @words = parse_line($delim, $keep, $line);

Text::ParseWords->parse_line() and therefore also monshow(1) segfaults
as soon as the value of $line happens to contain a "word" that is "too
long" (see bug #320727).

On a machine I am co-maintaining this reproducibly happens since the
system was updated from woody to sarge. After http.monitor has checked
a certain watch group at least once, its "last_detail" field (as found
in the output of `moncmd list opstatus`) exceeds the maximum number of
characters that parse_line() can process.

Between the (re)start of the mon daemon and the end of the first run of
this monitor plugin monshow(1) works as expected (because there is no
very long "last_detail" field yet). This might explain the reports of
monshow(1) working normally during the "first minute".

Paul


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]