whiteknight/io_cleanup1 branch ready for testing

Nicholas Clark nick at ccl4.org
Thu Aug 16 16:08:15 UTC 2012


On Tue, Aug 14, 2012 at 10:48:31PM -0400, James E Keenan wrote:

> Test 28 in t/pmc/filehandle.t is that weird test which, as I've reported 
> several times, gives me this output under 'prove -v':
> 
> #####
> not ok 28 - write after buffered read # TODO GH #811 Write error: No 
> space left on device on swap fs
> 
> #   Failed (TODO) test 'write after buffered read'
> #   at t/pmc/filehandle.t line 927.
> # Exited with error code: 1
> # Received:
> # 10
> # Write error: No space left on device
> # current instr.: 'test' pc 69 
> (/Users/jimk/gitwork/parrot/t/pmc/filehandle_28.pir:18)
> #
> # Expected:
> # 10
> # abcde#####klmno
> #
> #####

The end of truss ./parrot t/pmc/filehandle_28.pir on Solaris looks like
this:

open64("/tmp/efb73fdkof", O_RDWR|O_CREAT|O_TRUNC, 0644) = 3
fstat64(3, 0x080478CC)                          = 0
ioctl(3, TCGETA, 0x08047920)                    Err#25 ENOTTY
write(3, " a b c d e f g h i j k l".., 15)      = 15
llseek(3, 0, SEEK_SET)                          = 0
read(3, " a b c d e f g h i j k l".., 2048)     = 15
llseek(3, 0xFFFFFFF6, SEEK_CUR)                 = 0x100000005
10
write(1, " 1 0\n", 3)                           = 3
write(3, " # # # # #", 5)                       Err#28 ENOSPC
brk(0x08155090)                                 = 0
brk(0x08157090)                                 = 0
Write error: No space left on device
write(2, " W r i t e   e r r o r :".., 37)      = 37
current instr.: 'test' pc 69 (t/pmc/filehandle_28.pir:18)write(2, " c u r r e n t   i n s t".., 57)     = 57

write(2, "\n", 1)                               = 1
fdsync(1, FSYNC)                                = 0
fdsync(2, FSYNC)                                = 0
fdsync(1, FSYNC)                                = 0
lseek(1, 0, SEEK_CUR)                           = 37553
lseek(2, 0, SEEK_CUR)                           = 37586
lseek(2, 0, SEEK_CUR)                           = 37619
lseek(1, 0, SEEK_CUR)                           = 37652
lseek(2, 0, SEEK_CUR)                           = 37685
lseek(2, 0, SEEK_CUR)                           = 37718
_exit(1)


The equivalent output from strace on x86_64 Linux is this:

open("/tmp/BfxUfKSFe9", O_RDWR|O_CREAT|O_TRUNC, 0644) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffffffdf50) = -1 ENOTTY (Inappropriate ioctl for device)
write(3, "abcdefghijklmno", 15)         = 15
lseek(3, 0, SEEK_SET)                   = 0
read(3, "abcdefghijklmno", 2048)        = 15
lseek(3, -10, SEEK_CUR)                 = 5
write(1, "10\n", 310
)                     = 3
write(3, "#####", 5)                    = 5
lseek(3, 0, SEEK_SET)                   = 0
stat("/tmp/BfxUfKSFe9", {st_mode=S_IFREG|0644, st_size=15, ...}) = 0
read(3, "abcde#####klmno", 2048)        = 15
write(1, "abcde#####klmno\n", 16abcde#####klmno
)       = 16
fsync(3)                                = 0
fsync(3)                                = 0
close(3)                                = 0
fsync(1)                                = -1 EINVAL (Invalid argument)
exit_group(0)                           = ?

x86 Linux is this:

open("/tmp/3PSbeVyXC2", O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, 0644) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf836588) = -1 ENOTTY (Inappropriate ioctl for device)
write(3, "abcdefghijklmno", 15)         = 15
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "abcdefghijklmno", 2048)        = 15
_llseek(3, 4294967286, [4294967301], SEEK_CUR) = 0
write(1, "10\n", 310
)                     = 3
write(3, "#####", 5)                    = 5
_llseek(3, 0, [0], SEEK_SET)            = 0
stat64("/tmp/3PSbeVyXC2", {st_mode=S_IFREG|0644, st_size=4294967306, ...}) = 0
read(3, "abcdefghijklmno\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2048) = 2048
write(1, "abcdefghij\n", 11abcdefghij
)            = 11
fsync(3)                                = 0
fsync(3)                                = 0
close(3)                                = 0
gettimeofday({1345133163, 519558}, NULL) = 0
fsync(1)                                = -1 EINVAL (Invalid argument)
exit_group(0)                           = ?



4294967286 isn't -10. There's a sign extension problem somewhere.


Presumably as you're on PPC Darwin you're still on an version of OS X
with ktrace and kdump. I guess that they'd show a similar problem with
(not) -10

Nicholas Clark


More information about the parrot-dev mailing list