APAR status
Closed as program error.
Error description
User can only see the updated data after call sync or wait a couple of seconds when use mmap().
Local fix
Problem summary
The customer compiles his ocaml program on RH6.x and copy the target binary after compiler is done, but he always got all-zero files. The reason is ocaml calls fallocate() to allocate file blocks. Under 2.6.x kernel, the fallocate operation belongs to inode_operations. So gpfs has to open instance by GetNFS. GPFS calls terminateMmap only after the last open instance is closed. As nfs open instance has delay close semantics that makes terminateMmap call is delayed too. BTW, RH7.x has no such problem, because fallocate() belongs to file_operations on that kernel. Ext3 file system has no such problem too as its mmap/regular read write using unique page cache.
Problem conclusion
The posix standard is ambiguous about if shared memory mapping should be flushed to disk at munmap() time, it says nothing about it. msync() is used to flush modified memory mapping, and gpfs support it well. Linux msync(2) manual seems to imply munmap will flush the dirty data, though it does not say that in munmap(2). man msync(2) msync() flushes changes made to the in-core copy of a file that was mapped into memory using mmap(2) back to the filesystem. Without use of this call, there is no guarantee that changes are written back before munmap(2) is called. Though the standard is ambiguous, the customer's expection (get up to date binary when compiler is done) sounds reasonable. This fix flushes memory mapping when last write mapping is gone. It will be better if we can flush memory mapping for every munmap(), but we don't do that as that may affect performance too much.
Temporary fix
Comments
APAR Information
APAR number
IV86689
Reported component name
SPECTRUM SCALE
Reported component ID
5725Q01AP
Reported release
411
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2016-07-07
Closed date
2016-07-07
Last modified date
2019-04-30
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
SPECTRUM SCALE
Fixed component ID
5725Q01AP
Applicable component levels
R411 PSY U884675
19/04/30 I 1000
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"STXKQY","label":"IBM Spectrum Scale"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"411","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSFKCN","label":"General Parallel File System"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"411","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
30 April 2019