IBM Support

In Linux environments, GPFS may incorrectly fail writev() with EINVAL resulting in the user application failing during write

Flashes (Alerts)


Abstract

IBM has identified a problem with GPFS 3.5.0.20 and GPFS 4.1.0.2 where GPFS may fail to correctly handle multiple vectors passed via the writev() system call. When a {NULL, 0} is passed as the first vector, an EINVAL error may be incorrectly returned. This would cause the user application to fail unexpectedly when writev() is called to write to a GPFS file. User data are not affected. The writev() call is most likely to have been automatically generated by the library or compiler.

Content

User affected: Only customers running the affected level on Linux and have applications which use the writev() system call for writes to a GPFS file.

Note: The writev() call is most likely to have been automatically generated by the library or compiler. For example, using C++ stream class to write more than 1023 byte to a file will generate a writev() call that could fail with an EINVAL error.

The following sample program shows an example for which a write using stream class may fail unexpectedly:

#include<cassert>
#include<cstdio>
#include<fstream>

int main (int argc, char** argv) {
assert(argc == 2);

char* data = new char[1000000];
std::ofstream f(argv[1], std::ios_base::binary);
f.write(data, 1023); // this would succeed
perror("write call");
f.flush();

f.write(data, 1024); // this would fail
perror("write call");
f.flush();

f.write(data, 1025); // this would fail
perror("write call");
f.flush();

f.write(data, 1023); // this would succeed
perror("write call");
f.write(data, 1024); // this would succeed
perror("write call");
f.flush();

f.write(data, 1024); // this would fail
perror("write call");
f.write(data, 1023); // this would succeed
perror("write call");
f.flush();

f.write(data, 512); // this would succeed
perror("write call");
f.write(data, 512); // this would succeed
perror("write call");
f.write(data, 1024); // this would succeed
perror("write call");
f.flush();

f.close();
delete[] data;
return 0;
}

Recommendation: Affected V3.5 customer should contact IBM Service for an efix containing APAR IV64863; IBM plans to make this fix available in GPFS 3.5.0.21(APAR IV64863). V4.1 customers should upgrade to GPFS 4.1.0.3 (APAR IV64862) at Fix Central http://www.ibm.com/eserver/support/fixes/ .

[{"Product":{"code":"SSFKCN","label":"General Parallel File System"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"--","Platform":[{"code":"PF016","label":"Linux"}],"Version":"3.5.0;4.1.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
25 June 2021

UID

isg3T1021392