Daemon does not start


(Zsolt Kúti) #1

Hello,

A build that works with no daemon, but when trying to use daemon displays:

FAILURE: Build aborted because of an internal error.
  * What went wrong:
Build aborted because of an unexpected internal error. Please file an issue at: http://forums.gradle.org.
  * Try:
Run with --debug option to get additional debug info.
  * Exception is:
java.lang.IllegalArgumentException: Unrecognized calling convention: 4
 at com.sun.jna.Function.invokeInt(Native Method)
 at com.sun.jna.Function.invoke(Function.java:344)
 at com.sun.jna.Function.invoke(Function.java:276)
 at com.sun.jna.Library$Handler.invoke(Library.java:216)
 at $Proxy2.unsetenv(Unknown Source)
 at org.gradle.internal.nativeplatform.jna.LibCBackedProcessEnvironment.removeNativeEnvironmentVariable(LibCBackedProcessEnvironment.java:45)
 at org.gradle.internal.nativeplatform.jna.AbstractProcessEnvironment.removeEnvironmentVariable(AbstractProcessEnvironment.java:43)
 at org.gradle.internal.nativeplatform.jna.AbstractProcessEnvironment.maybeSetEnvironment(AbstractProcessEnvironment.java:34)
 at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:56)
 at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:121)
 at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy.doBuild(StartBuildOrRespondWithBusy.java:48)
 at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:121)
 at org.gradle.launcher.daemon.server.exec.HandleStop.execute(HandleStop.java:34)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:121)
 at org.gradle.launcher.daemon.server.exec.CatchAndForwardDaemonFailure.execute(CatchAndForwardDaemonFailure.java:32)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:121)
 at org.gradle.launcher.daemon.server.exec.HandleClientDisconnectBeforeSendingCommand.execute(HandleClientDisconnectBeforeSendingCommand.java:21)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:121)
 at org.gradle.launcher.daemon.server.exec.StopConnectionAfterExecution.execute(StopConnectionAfterExecution.java:27)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:121)
 at org.gradle.launcher.daemon.server.exec.DefaultDaemonCommandExecuter.executeCommand(DefaultDaemonCommandExecuter.java:54)

Unfortunately setting debug option gives much less message:

8:48:44.356 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Attempting to connect to [bf008f6a-7e38-4776-b6bb-c14f746f6a50 port:33271, addresses:[/127.0.0.1]].
08:48:44.356 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /127.0.0.1.
08:48:44.359 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Connected to address /127.0.0.1.
08:48:44.365 [INFO] [org.gradle.launcher.daemon.client.DaemonClient] Connected to the daemon. Dispatching Build{id=64e321b2-025e-4015-8e5f-9a457c52ec00.1, currentDir=/usr/home/kuti/projekt/kvf/streetlighting/web-ui} request.
08:48:44.507 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] input forwarder stop requested
08:48:44.508 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: CloseInput[id=64e321b2-025e-4015-8e5f-9a457c52ec00.2]
08:48:44.513 [ERROR] [org.gradle.BuildExceptionReporter]
 08:48:44.514 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build aborted because of an internal error.

I had already problem with native support on my platform (see: http://issues.gradle.org/browse/GRADLE-2551), but that one seemingly not a solution for this problem. I am using gradle 1.2, on FreeBSD 8.3 and openJDK6.

Any idea? Thanks!

Zsolt


(Szczepan Faber) #2

Does the regular (non-deamon) build works well for you?

Can you submit the output of gradle -v?

Thanks!


(Zsolt Kúti) #3

Hello Szczepan,

Here you are:

------------------------------------------------------------ Gradle 1.2 ------------------------------------------------------------

Gradle build time: 2012. szeptember 12. 10:46:02 UTC Groovy: 1.8.6 Ant: Apache Ant™ version 1.8.4 compiled on May 22 2012 Ivy: 2.2.0 JVM: 1.6.0_32 (Sun Microsystems Inc. 20.0-b12) OS: FreeBSD 8.3-RELEASE-p2 i386


(Szczepan Faber) #4

Can you try Gradle 1.3? Also, does the regular (non-daemon) build works well for you?


(Zsolt Kúti) #5

Sorry for having forgotten to answer your question: 1.2 works fine for regular build, after I change libjnidispatch.so of jna library to the one I built on my platform. I reported it in the gradle issue mentioned in my original post.

With 1.3 even the regular build fails:

* Exception is:
java.lang.ExceptionInInitializerError
 at org.gradle.internal.nativeplatform.filesystem.FileSystems.getDefault(FileSystems.java:22)
 at org.gradle.initialization.DefaultCommandLineConverter.convert(DefaultCommandLineConverter.java:99)
 at org.gradle.initialization.DefaultCommandLineConverter.convert(DefaultCommandLineConverter.java:35)
 at org.gradle.launcher.cli.BuildActionsFactory.createAction(BuildActionsFactory.java:75)
 at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.createAction(CommandLineActionFactory.java:206)
 at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:196)
 at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
 at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
 at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
 at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
 at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
 at org.gradle.launcher.Main.doAction(Main.java:48)
 at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
 at org.gradle.launcher.Main.main(Main.java:39)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
 at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
 at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
Caused by: java.lang.IllegalArgumentException: Unrecognized calling convention: 4
 at com.sun.jna.Function.invokeInt(Native Method)
 at com.sun.jna.Function.invoke(Function.java:344)
 at com.sun.jna.Function.invoke(Function.java:276)
 at com.sun.jna.Library$Handler.invoke(Library.java:216)
 at $Proxy2.symlink(Unknown Source)
 at org.gradle.internal.nativeplatform.filesystem.LibcSymlink.symlink(LibcSymlink.java:35)
 at org.gradle.internal.nativeplatform.filesystem.GenericFileSystem.tryCreateSymbolicLink(GenericFileSystem.java:53)
 at org.gradle.internal.nativeplatform.filesystem.GenericFileSystem.probeCanCreateSymbolicLink(GenericFileSystem.java:121)
 at org.gradle.internal.nativeplatform.filesystem.GenericFileSystem.<init>(GenericFileSystem.java:86)
 at org.gradle.internal.nativeplatform.filesystem.FileSystems$DefaultFileSystem.<clinit>(FileSystems.java:30)
 ... 21 more