Skip Menu |

This queue is for tickets about the IO-Async CPAN distribution.

Report information
The Basics
Id: 70247
Status: resolved
Priority: 0/
Queue: IO-Async

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

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



Subject: (in cleanup) Can't call method "time" on an undefined value at /opt/perl/lib/perl5/IO/Async/Internals/TimeQueue.pm line 150 during global destruction.
The (AnyEvent) program at http://ue.tst.eu/2dee5c3ecb2dc8e8de12da65ab167777.txt results in: (in cleanup) Can't call method "time" on an undefined value at /opt/perl/lib/perl5/IO/Async/Internals/TimeQueue.pm line 150 during global destruction. Since AnyEvent only uses documented functionality, and the error happens deeply in undocumented parts, I decided to report it as-is. TimeQueue probably fails to account for the mark&sweep gc in perl (i.e. an ordering problem during global destruction) and should either add a check, or use eval.
Oops, forgot to mention that this is with a version of IO::Async patched against the "canceling timers unrelated random other timers" patch (extract_top), but that shouldn't make a difference.
On Sat Aug 13 13:48:57 2011, MLEHMANN wrote: Show quoted text
> The (AnyEvent) program at > http://ue.tst.eu/2dee5c3ecb2dc8e8de12da65ab167777.txt > results in: > > (in cleanup) Can't call method "time" on an undefined value at > /opt/perl/lib/perl5/IO/Async/Internals/TimeQueue.pm line 150 during > global destruction.
OK, an interesting looking case. I'm off on holiday all next week so I'm unlikely to get a chance to look into it too much in the next 9 days or so, but I'll take a look the week after next. Thanks, -- Paul Evans
For reference, the test code is: #!/opt/bin/perl use AnyEvent; my $e = AE::timer 3, 0, my $quit = AE::cv; for (0..2040) { my $n = AE::now; my $d = 1 + $_ / 1024; push @t, AE::timer $d, 0, sub { my $t = AE::now; my $x = $t - $n - $d; if ($n + $d >= $t) { printf "delay %g expected %19.17g actual %19.17g diff %19.17g\n", $d, $n + $d, $t, $x; } }; } $quit->recv;
On Sat Aug 13 19:17:16 2011, PEVANS wrote: Show quoted text
> For reference, the test code is: > > #!/opt/bin/perl > > use AnyEvent; > > my $e = AE::timer 3, 0, my $quit = AE::cv; > > for (0..2040) { > my $n = AE::now; > my $d = 1 + $_ / 1024; > push @t, AE::timer $d, 0, sub { > my $t = AE::now; > my $x = $t - $n - $d; > if ($n + $d >= $t) { > printf "delay %g expected %19.17g actual %19.17g diff > %19.17g\n", $d, $n + $d, $t, $x; > } > }; > } > > $quit->recv;
With IO::Async 0.52 + AnyEvent 7.01 (perl-5.16.0, no threads, x64/Linux) this code no longer displays any output, suspect this was fixed a few versions back? cheers, Tom
I'll close it then :) -- Paul Evans