Skip to content

Commit 3caeda2

Browse files
committed
memory/patcher: do not hook madvise
It is not possible to hook madvise at this time due to a deadlock when using glibc. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 7240bee commit 3caeda2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

opal/mca/memory/patcher/memory_patcher_component.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
1313
* Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
14-
* Copyright (c) 2013-2016 Los Alamos National Security, LLC. All rights
14+
* Copyright (c) 2013-2017 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* Copyright (c) 2016 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
@@ -496,12 +496,16 @@ static int patcher_open (void)
496496
}
497497
#endif
498498

499+
/* NTH: we can't currently allow madvise to be intercepted due to a deadlock when running with glibc. in
500+
* the future we may re-enable this hook if the deadlock can be resolved. */
501+
#if 0
499502
#if defined (SYS_madvise)
500503
rc = opal_patcher->patch_symbol ("madvise", (uintptr_t)intercept_madvise, (uintptr_t *) &original_madvise);
501504
if (OPAL_SUCCESS != rc) {
502505
return rc;
503506
}
504507
#endif
508+
#endif
505509

506510
#if defined(SYS_shmdt) && defined(__linux__)
507511
rc = opal_patcher->patch_symbol ("shmdt", (uintptr_t) intercept_shmdt, (uintptr_t *) &original_shmdt);

0 commit comments

Comments
 (0)