I'm holding my head over this one. A combination of Event-0.86 and
BSD::Resource 1.15 coredumps with the following test.pl script:
# -*- perl -*-
use BSD::Resource;
use Event qw(loop unloop sweep);
$Event::DebugLevel = 4;
$count = 0;
Event->timer(interval=> "1",
cb=>sub{$count++;
print STDERR join(":",(getrusage())[2],$count) .
"\n";});
Event::loop;
With the following output (with it as test.pl):
PERL_DL_NONLAZY=1 /usr/sbin/perl -Iblib/arch -Iblib/lib
-I/usr/share/lib/perl5/5.6.0/IP32-irix -I/usr/share/lib/perl5/5.6.0 test.pl
creating Event::timer desc='?? test.pl:13'
Event::Watcher::init('Event::timer=HASH(0x10172758)', 'HASH(0x10233524)')
called at blib/lib/Event/timer.pm line 46
Event::timer::new('Event::timer', 'interval', 1, 'cb', 'CODE(0x101e7200)')
called at blib/lib/Event/Watcher.pm line 21
Event::Watcher::__ANON__('Event', 'interval', 1, 'cb', 'CODE(0x101e7200)')
called at test.pl line 13
Event: active ON '?? test.pl:13'
at test.pl line 13
Event: multiplex 0.9858s
at test.pl line 15
Event: queue '?? test.pl:13' prio=4
at test.pl line 15
Event: [0]invoking '?? test.pl:13' (prio 4)
at test.pl line 15
Event=0x101f0640 '?? test.pl:13' wrapped with SV=0x10237a80 at test.pl line 15
2664:1
Event: completed '?? test.pl:13'
at test.pl line 15
gmake: *** [test_dynamic] Segmentation fault (core dumped)
The change that I'm guessing is responsible (although I really don't know
how) is:
/usr/bin/diff -NaurdbB -xCVS Event-0.85/Event.xs Event-0.86/Event.xs
--- Event-0.85/Event.xs Tue Dec 5 16:30:26 2000
+++ Event-0.86/Event.xs Mon May 27 01:37:01 2002
@@ -557,13 +557,11 @@
CODE:
{
pe_event *THIS = (pe_event*) sv_2event(ref);
- /*
- if (WaDEBUGx(THIS) >= 4) {
+ if (WaDEBUGx(THIS) >= 3) {
STRLEN n_a;
warn("Event=0x%x '%s' DESTROY SV=0x%x",
THIS, SvPV(THIS->up->desc, n_a), SvRV(THIS->mysv));
}
- */
(*THIS->vtbl->dtor)(THIS);
}
Which is in the DESTROY code. It still happens if I drop the Debug level to
2, however...
I have no idea how BSD::Resource is involved, but if I remove it, or if I
use a machine with BSD::Resource-1.14, I don't see the coredumps.
-Allen
--
Allen Smith http://cesario.rutgers.edu/easmith/
September 11, 2001 A Day That Shall Live In Infamy II
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin