Bug#632700: [perl] just a simplest AnyEvent script, tooks up almost 100% cpu of my laptop, but it works well on perl 5.14.1
Niko Tyni
ntyni at debian.org
Fri Jul 8 15:20:46 UTC 2011
On Tue, Jul 05, 2011 at 01:59:26PM +0800, anders lee wrote:
> Package: perl
> Version: 5.12.4-1
> Severity: normal
>
> use AnyEvent;
>
> my $cv = AnyEvent->condvar;
>
> my $count = 0;
>
> my $w; $w = AnyEvent->timer(
> after => 1,
> interval => 2,
> cb => sub {
> $count++;
> warn "\$count = $count";
> if ($count >= 10) {
> undef $w;
> say "exiting...\n";
> exit;
> }
> );
>
> $cv->recv;
On Tue, Jul 05, 2011 at 03:01:29PM +0800, anders lee wrote:
> Error Message
>
> EV: error in callback (ignoring)
>
> and cannot exit AnyEvent loop, the cpu is took almost 100%
Unfortunately I can't reproduce this, though I only had
an i386 chroot available and not a real one.
I note that your test script has a trivial syntax error, so
could you please check that it's not missing anything else?
Are you aware of this passage in AnyEvent::FAQ :
Why do some backends use a lot of CPU in "AE::cv->recv"?
It suggests that the 100% usage might be normal behaviour; the "error
in callback" suggests this might be something else though.
Which backend are you using? Could you please send the output of
running your test with PERL_ANYEVENT_VERBOSE=8 in the environment?
FWIW, I did install EV from CPAN to test this but still no change.
Thanks for the report,
--
Niko Tyni ntyni at debian.org
More information about the Perl-maintainers
mailing list