diff --git a/changelog.html b/changelog.html
index c852860947..b181b5ea72 100644
--- a/changelog.html
+++ b/changelog.html
@@ -64,6 +64,9 @@ Upcoming changes
Preview function for textareas using Jenkins markup did not work when CSRF protection was enabled.
(issue 17085)
+
+ JNA-related error from Windows slave monitoring thrown repeatedly.
+ (issue 15796)
Improved the request handling performance (where the file lookup is expensive, such as NFS.)
(issue 16606)
diff --git a/core/src/main/java/hudson/node_monitors/SwapSpaceMonitor.java b/core/src/main/java/hudson/node_monitors/SwapSpaceMonitor.java
index 9d7ceb0197..b2edc41fc9 100644
--- a/core/src/main/java/hudson/node_monitors/SwapSpaceMonitor.java
+++ b/core/src/main/java/hudson/node_monitors/SwapSpaceMonitor.java
@@ -102,17 +102,22 @@ public class SwapSpaceMonitor extends NodeMonitor {
try {
mm = MemoryMonitor.get();
} catch (IOException e) {
- if(!warned) {
- // report the problem just once, and avoid filling up the log with the same error. see HUDSON-2194.
- warned = true;
- throw e;
- } else {
- return null;
- }
+ return report(e);
+ } catch (LinkageError e) { // JENKINS-15796
+ return report(e);
}
return new MemoryUsage2(mm.monitor());
}
+ private MemoryUsage report(T e) throws T {
+ if (!warned) {
+ warned = true;
+ throw e;
+ } else { // JENKINS-2194
+ return null;
+ }
+ }
+
private static final long serialVersionUID = 1L;
private static boolean warned = false;