#500375 bonnie++ - Fails on short writes

Package:
bonnie++
Source:
bonnie++
Description:
Hard drive benchmark suite
Submitter:
Bastian Blank
Date:
2012-11-23 08:03:03 UTC
Severity:
important
#500375#5
Date:
2008-09-27 14:55:47 UTC
From:
To:
The block write test of bonnie fails on short writes, aka write(2) calls
where the return value is smaller then the size parameter. They may
always happen if the kernel thinks it can't write anything and the
userspace have to retry with the remaining data.

| # bonnie -u nobody -f
| Using uid:65534, gid:65534
| Writing intelligently...Can't write block.
| Bonnie: drastic I/O error (write(2)): No such file or directory

strace shows:
| write(3, "\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v"..., 8192) = 4096

Bastian

#500375#10
Date:
2010-11-14 15:01:20 UTC
From:
To:
I have a similar problem. Running strace bonnie, it hangs like this:

gettimeofday({1289746528, 39336}, NULL) = 0
gettimeofday({1289746528, 39388}, NULL) = 0
write(3, "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["..., 8192) = 8192
gettimeofday({1289746528, 39528}, NULL) = 0
gettimeofday({1289746528, 39580}, NULL) = 0
write(3, "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["..., 8192) = -1 ENOSPC (No
space left on device)
write(2, "Can't write block.: No space lef"..., 44Can't write block.:
No space left on device
) = 44
write(2, "Can't write block 745111.\n", 26Can't write block 745111.
) = 26
fsync(3)                                = 0
close(3)                                = 0
unlink("./Bonnie.10657")                = 0
close(-1)                               = -1 EBADF (Bad file descriptor)
close(-1)                               = -1 EBADF (Bad file descriptor)
close(-1)                               = -1 EBADF (Bad file descriptor)
close(-1)                               = -1 EBADF (Bad file descriptor)
exit_group(1)                           = ?


Despite the 'No space left' message, my system is not out of disk:

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             7.5G  1.5G  5.7G  21% /
none                  1.6G  200K  1.6G   1% /dev
none                  1.6G     0  1.6G   0% /dev/shm
none                  1.6G   40K  1.6G   1% /var/run
none                  1.6G     0  1.6G   0% /var/lock
none                  7.5G  1.5G  5.7G  21% /var/lib/ureadahead/debugfs

#500375#15
Date:
2012-11-23 07:53:25 UTC
From:
To:
Please tell me how to reproduce it and I'll fix it.