Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-15974

FATAL: Failed to link the library: interface hudson.util.jna.Kernel32

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: disk-usage-plugin
    • Environment:
    • Similar Issues:

      Description

      I am facing an issue since 1.490 which may be related to https://issues.jenkins-ci.org/browse/JENKINS-15466.
      These error occurs occassionally - 1-3 time in the night when the nightly builds stress the system for 6 hours.
      I have this issue seen by now only when a job is triggered by cron.
      I tried upgrading the plugins and Jenkins to various versions from 1.490 to current with no luck. Restarting Jenkins solves the issue on short term.

      00:54:28 originally caused by:
      00:54:28 Started by timer
      00:54:28 [EnvInject] - Loading node environment variables.
      00:54:28 Building remotely on B00013_2 in workspace y:\Jenkins_slave\workspace\NB_Uppsala
      00:54:28 Cleaning local Directory .
      00:54:28 FATAL: Failed to link the library: interface hudson.util.jna.Kernel32
      00:54:28 java.lang.UnsupportedOperationException: Failed to link the library: interface hudson.util.jna.Kernel32
      00:54:28 at hudson.util.jna.InitializationErrorInvocationHandler.invoke(InitializationErrorInvocationHandler.java:28)
      00:54:28 at $Proxy7.GetFileAttributesW(Unknown Source)
      00:54:28 at hudson.util.jna.Kernel32Utils.getWin32FileAttributes(Kernel32Utils.java:76)
      00:54:28 at hudson.util.jna.Kernel32Utils.isJunctionOrSymlink(Kernel32Utils.java:80)
      00:54:28 at hudson.Util.isSymlink(Util.java:322)
      00:54:28 at hudson.Util.deleteRecursive(Util.java:283)
      00:54:28 at hudson.Util.deleteContentsRecursive(Util.java:204)
      00:54:28 at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:75)
      00:54:28 at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:144)
      00:54:28 at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:799)
      00:54:28 at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:780)
      00:54:28 at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:763)
      00:54:28 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2309)
      00:54:28 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      00:54:28 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      00:54:28 at hudson.remoting.Request$2.run(Request.java:326)
      00:54:28 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      00:54:28 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      00:54:28 at java.util.concurrent.FutureTask.run(Unknown Source)
      00:54:28 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      00:54:28 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      00:54:28 at java.lang.Thread.run(Unknown Source)
      00:54:28 Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
      00:54:28 at hudson.util.jna.Kernel32Utils.load(Kernel32Utils.java:85)
      00:54:28 at hudson.util.jna.Kernel32.<clinit>(Kernel32.java:37)
      00:54:28 at hudson.util.jna.Kernel32Utils.getWin32FileAttributes(Kernel32Utils.java:76)
      00:54:28 at hudson.util.jna.Kernel32Utils.isJunctionOrSymlink(Kernel32Utils.java:80)
      00:54:28 at hudson.Util.isSymlink(Util.java:322)
      00:54:28 at hudson.plugins.disk_usage.DiskUsageThread$DiskUsageCallable.getFileSize(DiskUsageThread.java:168)
      00:54:28 at hudson.plugins.disk_usage.DiskUsageThread$DiskUsageCallable.call(DiskUsageThread.java:162)
      00:54:28 at hudson.plugins.disk_usage.DiskUsageThread$DiskUsageCallable.call(DiskUsageThread.java:149)
      00:54:28 ... 9 more

      It seems mainly to affect one machine with several slaves on it but that is no unique setup in our cluster.
      The system logs tell something about issue with determining the disk space. I have been checking the machine. Itself is in a healthy state with loads of available disk space.

        Attachments

          Issue Links

            Activity

            Hide
            vladdrussian VladDRussian added a comment -

            I hit the same thing after i upgraded to 1.500. Around the time i saw the below error as well as original posted. After a restart / reupdate. i was able to run a job on the node again.

            Feb 8, 2013 2:25:53 AM hudson.node_monitors.AbstractNodeMonitorDescriptor$Record run
            WARNING: Failed to monitor FFX-MOM-BLD10 for Free Swap Space
            java.io.IOException: Remote call on FFX-MOM-BLD10 failed
            at hudson.remoting.Channel.call(Channel.java:681)
            at hudson.node_monitors.SwapSpaceMonitor$1.monitor(SwapSpaceMonitor.java:83)
            at hudson.node_monitors.SwapSpaceMonitor$1.monitor(SwapSpaceMonitor.java:81)
            at hudson.node_monitors.AbstractNodeMonitorDescriptor$Record.run(AbstractNodeMonitorDescriptor.java:219)
            Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.jvnet.hudson.Windows$MEMORYSTATUSEX
            at org.jvnet.hudson.Windows.monitor(Windows.java:40)
            at hudson.node_monitors.SwapSpaceMonitor$MonitorTask.call(SwapSpaceMonitor.java:113)
            at hudson.node_monitors.SwapSpaceMonitor$MonitorTask.call(SwapSpaceMonitor.java:99)
            at hudson.remoting.UserRequest.perform(UserRequest.java:118)
            at hudson.remoting.UserRequest.perform(UserRequest.java:48)
            at hudson.remoting.Request$2.run(Request.java:326)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
            at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
            at java.util.concurrent.FutureTask.run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at hudson.remoting.Engine$1$1.run(Engine.java:60)
            at java.lang.Thread.run(Unknown Source)

            Show
            vladdrussian VladDRussian added a comment - I hit the same thing after i upgraded to 1.500. Around the time i saw the below error as well as original posted. After a restart / reupdate. i was able to run a job on the node again. Feb 8, 2013 2:25:53 AM hudson.node_monitors.AbstractNodeMonitorDescriptor$Record run WARNING: Failed to monitor FFX-MOM-BLD10 for Free Swap Space java.io.IOException: Remote call on FFX-MOM-BLD10 failed at hudson.remoting.Channel.call(Channel.java:681) at hudson.node_monitors.SwapSpaceMonitor$1.monitor(SwapSpaceMonitor.java:83) at hudson.node_monitors.SwapSpaceMonitor$1.monitor(SwapSpaceMonitor.java:81) at hudson.node_monitors.AbstractNodeMonitorDescriptor$Record.run(AbstractNodeMonitorDescriptor.java:219) Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.jvnet.hudson.Windows$MEMORYSTATUSEX at org.jvnet.hudson.Windows.monitor(Windows.java:40) at hudson.node_monitors.SwapSpaceMonitor$MonitorTask.call(SwapSpaceMonitor.java:113) at hudson.node_monitors.SwapSpaceMonitor$MonitorTask.call(SwapSpaceMonitor.java:99) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:60) at java.lang.Thread.run(Unknown Source)
            Hide
            nickolayr Nickolay Rumyantsev added a comment -

            OS: Win2003.
            Java: 6_22/7_15.
            Connection method: jnlp/service

            I have the same error during the cleaning of the workspace:

            Deleting project workspace...
            FATAL: Failed to link the library:
            java.lang.UnsupportedOperationException: Failed to link the library:
            at hudson.util.jna.InitializationErrorInvocationHandler.invoke(InitializationErrorInvocationHandler.java:27)
            at com.sun.proxy.$Proxy7.GetFileAttributesW(Unknown Source)
            at hudson.util.jna.Kernel32Utils.getWin32FileAttributes(Kernel32Utils.java:61)
            at hudson.util.jna.Kernel32Utils.isJunctionOrSymlink(Kernel32Utils.java:65)
            at hudson.Util.isSymlink(Util.java:314)
            at hudson.Util.deleteRecursive(Util.java:279)
            at hudson.FilePath$11.invoke(FilePath.java:920)
            at hudson.FilePath$11.invoke(FilePath.java:918)
            at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2246)
            at hudson.remoting.UserRequest.perform(UserRequest.java:118)
            at hudson.remoting.UserRequest.perform(UserRequest.java:48)
            at hudson.remoting.Request$2.run(Request.java:326)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
            at java.util.concurrent.FutureTask.run(FutureTask.java:166)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at hudson.remoting.Engine$1$1.run(Engine.java:58)
            at java.lang.Thread.run(Thread.java:722)
            Caused by: java.lang.UnsatisfiedLinkError: Unable to load library 'kernel32': com.sun.jna.Native.open(Ljava/lang/String;)J
            at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:166)
            at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239)
            at com.sun.jna.Library$Handler.<init>(Library.java:140)
            at com.sun.jna.Native.loadLibrary(Native.java:366)
            at com.sun.jna.Native.loadLibrary(Native.java:351)
            at hudson.util.jna.Kernel32Utils.load(Kernel32Utils.java:70)
            at hudson.util.jna.Kernel32.<clinit>(Kernel32.java:37)

            Show
            nickolayr Nickolay Rumyantsev added a comment - OS: Win2003. Java: 6_22/7_15. Connection method: jnlp/service I have the same error during the cleaning of the workspace: Deleting project workspace... FATAL: Failed to link the library: java.lang.UnsupportedOperationException: Failed to link the library: at hudson.util.jna.InitializationErrorInvocationHandler.invoke(InitializationErrorInvocationHandler.java:27) at com.sun.proxy.$Proxy7.GetFileAttributesW(Unknown Source) at hudson.util.jna.Kernel32Utils.getWin32FileAttributes(Kernel32Utils.java:61) at hudson.util.jna.Kernel32Utils.isJunctionOrSymlink(Kernel32Utils.java:65) at hudson.Util.isSymlink(Util.java:314) at hudson.Util.deleteRecursive(Util.java:279) at hudson.FilePath$11.invoke(FilePath.java:920) at hudson.FilePath$11.invoke(FilePath.java:918) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2246) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at hudson.remoting.Engine$1$1.run(Engine.java:58) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.UnsatisfiedLinkError: Unable to load library 'kernel32': com.sun.jna.Native.open(Ljava/lang/String;)J at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:166) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239) at com.sun.jna.Library$Handler.<init>(Library.java:140) at com.sun.jna.Native.loadLibrary(Native.java:366) at com.sun.jna.Native.loadLibrary(Native.java:351) at hudson.util.jna.Kernel32Utils.load(Kernel32Utils.java:70) at hudson.util.jna.Kernel32.<clinit>(Kernel32.java:37)
            Hide
            lvotypkova Lucie Votypkova added a comment -

            It is due to using Native library - this library does not work for itanium architecture. I will try to find another way how to determine if the file is symlink. If I do not find something it will be better to ignore it and if NoClassDefFoundError is catched, not to try determine if it is symlink.

            Show
            lvotypkova Lucie Votypkova added a comment - It is due to using Native library - this library does not work for itanium architecture. I will try to find another way how to determine if the file is symlink. If I do not find something it will be better to ignore it and if NoClassDefFoundError is catched, not to try determine if it is symlink.
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            This issue is platform dependent, so if you are reporting this bug, please report your Windows version and architecture (x86 vs amd64 vs ia64.)

            ia64 is indeed not supported in the upstream, presumably because of the lack of the build environment.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - This issue is platform dependent, so if you are reporting this bug, please report your Windows version and architecture (x86 vs amd64 vs ia64.) ia64 is indeed not supported in the upstream , presumably because of the lack of the build environment.
            Hide
            nickolayr Nickolay Rumyantsev added a comment - - edited

            In my case it was x86 win2003r2 sp2 but the last time the issue occured was 6 months ago. I'm not sure I could reproduce it now.
            Jenkins 1.512.

            Show
            nickolayr Nickolay Rumyantsev added a comment - - edited In my case it was x86 win2003r2 sp2 but the last time the issue occured was 6 months ago. I'm not sure I could reproduce it now. Jenkins 1.512.
            Hide
            lvotypkova Lucie Votypkova added a comment -

            I reproduced this issue only with architecture itanium and java 6 (I think java 7 is not supported for itanium). Now if disk usage fails with exception, logs it and do not try to determine if it is symlink (since version 0.22).

            Show
            lvotypkova Lucie Votypkova added a comment - I reproduced this issue only with architecture itanium and java 6 (I think java 7 is not supported for itanium). Now if disk usage fails with exception, logs it and do not try to determine if it is symlink (since version 0.22).
            Hide
            rodrigc Craig Rodrigues added a comment - - edited

            Jenkins has been updated to use JNA 4.1: JENKINS-24521
            Please try again, since this fixes many native library issues.
            The fix will be in Jenkins 1.586 and higher.

            Show
            rodrigc Craig Rodrigues added a comment - - edited Jenkins has been updated to use JNA 4.1: JENKINS-24521 Please try again, since this fixes many native library issues. The fix will be in Jenkins 1.586 and higher.

              People

              • Assignee:
                lvotypkova Lucie Votypkova
                Reporter:
                kopfwunde Jan Seidel
              • Votes:
                5 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: