From srezic@cpan.org (@eserte) on 2008-09-14 20:19:43:
I see that there are couple of test reports with the same failure (see
subject). On my machine, Log::Dispatch's test suite works fine with
perl5.8.8, but fails with perl5.10.0. I run both with ktrace and pasted
the interesting pieces below. My observations: there is indeed no
write() call in the failure case, and there's also a close() missing. So
maybe here is some kind of race condition, or a leak preventing the
close() to happen?
Regards,
Slaven
58498 perl5.10.0 RET write 71/0x47
58498 perl5.10.0 CALL close(0x3)
58498 perl5.10.0 RET close 0
58498 perl5.10.0 CALL open(0x84c2d20,0x601,0x1b6)
58498 perl5.10.0 NAMI "/tmp/vUN7K_gHxp/handle.log"
58498 perl5.10.0 RET open 3
58498 perl5.10.0 CALL ioctl(0x3,TIOCGETA,0xbfbfe620)
58498 perl5.10.0 RET ioctl -1 errno 25 Inappropriate ioctl for device
58498 perl5.10.0 CALL lseek(0x3,0,0,0,0x1)
58498 perl5.10.0 RET lseek 0
58498 perl5.10.0 CALL fstat(0x3,0x814caa0)
58498 perl5.10.0 RET fstat 0
58498 perl5.10.0 CALL fcntl(0x3,0x2,0x1)
58498 perl5.10.0 RET fcntl 0
58498 perl5.10.0 CALL open(0x84c2760,0,0x1b6)
58498 perl5.10.0 NAMI "/tmp/vUN7K_gHxp/handle.log"
58498 perl5.10.0 RET open 4
58498 perl5.10.0 CALL ioctl(0x4,TIOCGETA,0xbfbfe620)
58498 perl5.10.0 RET ioctl -1 errno 25 Inappropriate ioctl for device
58498 perl5.10.0 CALL lseek(0x4,0,0,0,0x1)
58498 perl5.10.0 RET lseek 0
58498 perl5.10.0 CALL fstat(0x4,0x814caa0)
58498 perl5.10.0 RET fstat 0
58498 perl5.10.0 CALL fcntl(0x4,0x2,0x1)
58498 perl5.10.0 RET fcntl 0
58498 perl5.10.0 CALL break(0x84c8000)
58498 perl5.10.0 RET break 0
58498 perl5.10.0 CALL read(0x4,0x84c7000,0x1000)
58498 perl5.10.0 GIO fd 4 read 0 bytes
""
58498 perl5.10.0 RET read 0
58498 perl5.10.0 CALL close(0x4)
58498 perl5.10.0 RET close 0
58498 perl5.10.0 CALL write(0x6,0x816e000,0x51)
58498 perl5.10.0 GIO fd 6 wrote 81 bytes
"not ok 7 - Log::Dispatch::Handle created log file should contain
'handle test\\n'
"
======================================================================
59061 perl RET write 71/0x47
59061 perl CALL close(0x3)
59061 perl RET close 0
59061 perl CALL open(0x84061c0,0x601,0x1b6)
59061 perl NAMI "/tmp/lIj3yZjGKm/handle.log"
59061 perl RET open 3
59061 perl CALL fstat(0x3,0x2817aa20)
59061 perl RET fstat 0
59061 perl CALL fcntl(0x3,0x2,0x1)
59061 perl RET fcntl 0
59061 perl CALL break(0x8408000)
59061 perl RET break 0
59061 perl CALL break(0x8408800)
59061 perl RET break 0
59061 perl CALL fstat(0x3,0xbfbfe6d0)
59061 perl RET fstat 0
59061 perl CALL write(0x3,0x8068000,0xc)
59061 perl GIO fd 3 wrote 12 bytes
"handle test
"
59061 perl RET write 12/0xc
59061 perl CALL close(0x3)
59061 perl RET close 0
59061 perl CALL open(0x8403f60,0,0x1b6)
59061 perl NAMI "/tmp/lIj3yZjGKm/handle.log"
59061 perl RET open 3
59061 perl CALL fstat(0x3,0x2817aa20)
59061 perl RET fstat 0
59061 perl CALL fcntl(0x3,0x2,0x1)
59061 perl RET fcntl 0
59061 perl CALL fstat(0x3,0xbfbfc610)
59061 perl RET fstat 0
59061 perl CALL read(0x3,0x8068000,0x1000)
59061 perl GIO fd 3 read 12 bytes
"handle test
"
59061 perl RET read 12/0xc
59061 perl CALL read(0x3,0x8068000,0x1000)
59061 perl GIO fd 3 read 0 bytes
""
59061 perl RET read 0
59061 perl CALL close(0x3)
59061 perl RET close 0
59061 perl CALL break(0x8409000)
59061 perl RET break 0
59061 perl CALL write(0x6,0x806c000,0x4d)
59061 perl GIO fd 6 wrote 77 bytes
"ok 7 - Log::Dispatch::Handle created log file should contain
'handle test\\n'
"
Migrated from rt.cpan.org #39272 (status was 'new')
Requestors:
From srezic@cpan.org (@eserte) on 2008-09-14 20:19:43:
I see that there are couple of test reports with the same failure (see subject). On my machine, Log::Dispatch's test suite works fine with perl5.8.8, but fails with perl5.10.0. I run both with ktrace and pasted the interesting pieces below. My observations: there is indeed no write() call in the failure case, and there's also a close() missing. So maybe here is some kind of race condition, or a leak preventing the close() to happen?
Regards, Slaven