hpc / ior

IOR and mdtest
Other
377 stars 166 forks source link

posix aiori reports bogus errors on EOF for version 3.3.0 #346

Open glennklockwood opened 3 years ago

glennklockwood commented 3 years ago

ior-3.3.0's POSIX aiori will report bogus errors if it hits an unexpected EOF, e.g.,

Commencing write performance test: Fri Mar 12 17:36:23 2021
0: stonewalling pairs accessed: 366
stonewalling pairs accessed min: 216 max: 367 -- min data: 6.8 GiB mean data: 9.1 GiB time: 45.3s
WARNING: Expected aggregate file size       = 35184372088832.
WARNING: Stat() of aggregate file size      = 394063249408.
WARNING: Using actual aggregate bytes moved = 394063249408.
WARNING: maybe caused by deadlineForStonewalling
write     3702       115.75     56.07       32768      32768      0.065206   101.46     0.000466   101.53     0
11: stonewalling pairs accessed: 360
ior ERROR: read(37, 0x2aaac5419000, 33554432) returned EOF prematurely, errno 11, Resource temporarily unavailable (../../src/aiori-POSIX.c:548)

This is because in aiori-POSIX.c:

    rc = read(fd, ptr, remaining);
    if (rc == 0)
          ERRF("read(%d, %p, %lld) returned EOF prematurely",
                  fd, (void*)ptr, remaining);

where ERRF automatically adds errno and strerror(errno). POSIX says errno is not set when read(2) returns 0, and so this error just prints out some random errno.

Looks like this is already fixed in master, so do we backport a fix to 3.3 just for this, or document it as a known issue and move on with life? I don't know where else these sorts of spurious errnos might get printed out in ior-3.3.

JulianKunkel commented 3 years ago

Hi, I would ignore to backport it.