Commit 165118c5 authored by Shane Snyder's avatar Shane Snyder

Merge branch 'issue-210-cray-hugepages' into 'master'

skip instrumentation attempts on anonymous mmap()

Closes #210

See merge request !5
parents 78ac2f29 969b6285
......@@ -7,6 +7,9 @@ Darshan-3.1.3-pre1
* add --enable-HDF5_1.10 configure option to explicitly enable HDF5 1.10+
support, needed on some platforms for API compatibility
- contributed by Karl-Ulrich Bamberg
* skip instrumentation attempts for anonymous mmap() calls; this avoids a
potentential deadlock condition when used with hugepages on Cray systems.
Reported by Glenn Lockwood and Cristian Simarro.
Darshan-3.1.2
=============
......
......@@ -925,6 +925,14 @@ void* DARSHAN_DECL(mmap)(void *addr, size_t length, int prot, int flags,
MAP_OR_FAIL(mmap);
if(fd < 0 || (flags & MAP_ANONYMOUS))
{
/* mmap is not associated with a backing file; skip all Darshan
* characterization attempts.
*/
return(__real_mmap(addr, length, prot, flags, fd, offset));
}
ret = __real_mmap(addr, length, prot, flags, fd, offset);
if(ret == MAP_FAILED)
return(ret);
......@@ -948,6 +956,14 @@ void* DARSHAN_DECL(mmap64)(void *addr, size_t length, int prot, int flags,
MAP_OR_FAIL(mmap64);
if(fd < 0 || (flags & MAP_ANONYMOUS))
{
/* mmap is not associated with a backing file; skip all Darshan
* characterization attempts.
*/
return(__real_mmap64(addr, length, prot, flags, fd, offset));
}
ret = __real_mmap64(addr, length, prot, flags, fd, offset);
if(ret == MAP_FAILED)
return(ret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment