WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Got Java JDK 7 running, but no dice for Gradle

Open mphaney opened this issue 10 years ago • 26 comments

As the title says, I managed to extract the tar file from Oracle for JDK 7 and java seems to run alright, but Gradle (downloadable from Gradle.org) does not work. It is basically just a glorified wrapper and set of tools for Java. I know Java is sketchy on this build anyway (although hearing lots of positive things for the next build!) but I would love for Gradle to be tested along side it! Thanks.

Currently it just hangs (like Java 8 does). Here is the expected vs. current output: 2016-04-14 08_23_50

mphaney avatar Apr 14 '16 15:04 mphaney

Would it be possible for you to collect an strace when you run gradle? I can take a look and see if anything jumps out at me.

benhillis avatar Apr 14 '16 22:04 benhillis

Absolutely! Apologies for the length, but here it is:

root@localhost:~# strace gradle strace: Test for PTRACE_O_TRACESYSGOOD failed, giving up using this feature. execve("/usr/bin/gradle", ["gradle"], [/* 13 vars /]) = 0 brk(0) = 0x607000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff5ffee0000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=18872, ...}) = 0 mmap(NULL, 18872, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff5ffffa000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\37\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1840928, ...}) = 0 mmap(NULL, 3949248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff5ff830000 mprotect(0x7ff5ff9eb000, 2093056, PROT_NONE) = 0 mmap(0x7ff5ffbea000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000) = 0x7ff5ffbea000 mmap(0x7ff5ffbf0000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff5ffbf0000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff5ffed0000 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff5ffec0000 arch_prctl(ARCH_SET_FS, 0x7ff5ffec0740) = 0 mprotect(0x7ff5ffbea000, 16384, PROT_READ) = 0 mprotect(0x605000, 4096, PROT_READ) = 0 mprotect(0x7ff5ffe22000, 4096, PROT_READ) = 0 munmap(0x7ff5ffffa000, 18872) = 0 brk(0) = 0x607000 brk(0x628000) = 0x628000 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=1607664, ...}) = 0 mmap(NULL, 1607664, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff5ffc99000 close(3) = 0 execve("/usr/local/sbin/bash", ["bash", "/usr/bin/gradle"], [/ 13 vars /]) = -1 ENOENT (No such file or directory) execve("/usr/local/bin/bash", ["bash", "/usr/bin/gradle"], [/ 13 vars /]) = -1 ENOENT (No such file or directory) execve("/usr/sbin/bash", ["bash", "/usr/bin/gradle"], [/ 13 vars /]) = -1 ENOENT (No such file or directory) execve("/usr/bin/bash", ["bash", "/usr/bin/gradle"], [/ 13 vars /]) = -1 ENOENT (No such file or directory) execve("/sbin/bash", ["bash", "/usr/bin/gradle"], [/ 13 vars /]) = -1 ENOENT (No such file or directory) execve("/bin/bash", ["bash", "/usr/bin/gradle"], [/ 13 vars _/]) = 0 brk(0) = 0x6ff000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff5ffee0000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=18872, ...}) = 0 mmap(NULL, 18872, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff5ffffa000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\303\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=167096, ...}) = 0 mmap(NULL, 2264288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff5ff9d0000 mprotect(0x7ff5ff9f5000, 2093056, PROT_NONE) = 0 mmap(0x7ff5ffbf4000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x7ff5ffbf4000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=14664, ...}) = 0 mmap(NULL, 2109744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff5ff7c0000 mprotect(0x7ff5ff7c3000, 2093056, PROT_NONE) = 0 mmap(0x7ff5ff9c2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7ff5ff9c2000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\37\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1840928, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff5ffed0000 mmap(NULL, 3949248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff5ff3f0000 mprotect(0x7ff5ff5ab000, 2093056, PROT_NONE) = 0 mmap(0x7ff5ff7aa000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000) = 0x7ff5ff7aa000 mmap(0x7ff5ff7b0000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff5ff7b0000 close(3) = 0 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff5ffec0000 arch_prctl(ARCH_SET_FS, 0x7ff5ffec0740) = 0 mprotect(0x7ff5ff7aa000, 16384, PROT_READ) = 0 mprotect(0x7ff5ff9c2000, 4096, PROT_READ) = 0 mprotect(0x7ff5ffbf4000, 16384, PROT_READ) = 0 mprotect(0x6ef000, 4096, PROT_READ) = 0 mprotect(0x7ff5ffe22000, 4096, PROT_READ) = 0 munmap(0x7ff5ffffa000, 18872) = 0 open("/dev/tty", O_RDWR|O_NONBLOCK) = 3 close(3) = 0 brk(0) = 0x6ff000 brk(0x700000) = 0x700000 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=1607664, ...}) = 0 mmap(NULL, 1607664, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff5ffc99000 close(3) = 0 brk(0x701000) = 0x701000 brk(0x702000) = 0x702000 getuid() = 0 getgid() = 0 geteuid() = 0 getegid() = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 time(NULL) = 1460734140 brk(0x703000) = 0x703000 open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff5ffeb0000 read(3, "MemTotal: 1031052 kB\nMemF"..., 1024) = 859 close(3) = 0 munmap(0x7ff5ffeb0000, 4096) = 0 brk(0x704000) = 0x704000 rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7ff5ff426d40}, {SIG_DFL, [CHLD], SA_RESTORER|SA_RESTART, 0x7ff5ff866d40}, 8) = 0 rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7ff5ff426d40}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7ff5ff426d40}, 8) = 0 rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7ff5ff426d40}, {SIG_DFL, [], SA_RESTORER, 0x7ff5ff426d40}, 8) = 0 rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7ff5ff426d40}, {SIG_DFL, [], SA_RESTORER, 0x7ff5ff426d40}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7ff5ff426d40}, {SIG_DFL, [], SA_RESTORER, 0x7ff5ff426d40}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7ff5ff426d40}, {SIG_DFL, [], SA_RESTORER, 0x7ff5ff426d40}, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN, [], SA_RESTORER, 0x7ff5ff426d40}, {SIG_DFL, [], SA_RESTORER, 0x7ff5ff426d40}, 8) = 0 uname({sys="Linux", node="localhost", ...}) = 0 brk(0x705000) = 0x705000 brk(0x706000) = 0x706000 stat("/root", {st_mode=S_IFDIR|0700, st_size=0, ...}) = 0 stat(".", {st_mode=S_IFDIR|0700, st_size=0, ...}) = 0 getpid() = 88 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=26258, ...}) = 0 mmap(NULL, 26258, PROT_READ, MAP_SHARED, 3, 0) = 0x7ff5ffff8000 close(3) = 0 getppid() = 85 stat(".", {st_mode=S_IFDIR|0700, st_size=0, ...}) = 0 stat("/usr/local/sbin/bash", 0x7ff5fffef200) = -1 ENOENT (No such file or directory) stat("/usr/local/bin/bash", 0x7ff5fffef200) = -1 ENOENT (No such file or directory) stat("/usr/sbin/bash", 0x7ff5fffef200) = -1 ENOENT (No such file or directory) stat("/usr/bin/bash", 0x7ff5fffef200) = -1 ENOENT (No such file or directory) stat("/sbin/bash", 0x7ff5fffef200) = -1 ENOENT (No such file or directory) stat("/bin/bash", {st_mode=S_IFREG|0755, st_size=1021112, ...}) = 0 stat("/bin/bash", {st_mode=S_IFREG|0755, st_size=1021112, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/bash", X_OK) = 0 stat("/bin/bash", {st_mode=S_IFREG|0755, st_size=1021112, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/bash", R_OK) = 0 stat("/bin/bash", {st_mode=S_IFREG|0755, st_size=1021112, ...}) = 0 stat("/bin/bash", {st_mode=S_IFREG|0755, st_size=1021112, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/bash", X_OK) = 0 stat("/bin/bash", {st_mode=S_IFREG|0755, st_size=1021112, ...}) = 0 geteuid() = 0 getegid() = 0 getuid() = 0 getgid() = 0 access("/bin/bash", R_OK) = 0 brk(0x707000) = 0x707000 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3 connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) close(3) = 0 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3 connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) close(3) = 0 open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=475, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff5ffeb0000 read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 512) = 475 brk(0x708000) = 0x708000 read(3, 0x7ff5ffeb0000, 512) = 0 close(3) = 0 munmap(0x7ff5ffeb0000, 4096) = 0 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=18872, ...}) = 0 mmap(NULL, 18872, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff5ffff3000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\23\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=39824, ...}) = 0 brk(0x709000) = 0x709000 mmap(NULL, 2135368, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff5ff1e0000 mprotect(0x7ff5ff1e9000, 2093056, PROT_NONE) = 0 mmap(0x7ff5ff3e8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7ff5ff3e8000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libnsl.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`A\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=97296, ...}) = 0 mmap(NULL, 2202328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff5fefc0000 mprotect(0x7ff5fefd7000, 2093056, PROT_NONE) = 0 mmap(0x7ff5ff1d6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7ff5ff1d6000 mmap(0x7ff5ff1d8000, 6872, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff5ff1d8000 close(3) = 0 mprotect(0x7ff5ff1d6000, 4096, PROT_READ) = 0 mprotect(0x7ff5ff3e8000, 4096, PROT_READ) = 0 munmap(0x7ff5ffff3000, 18872) = 0 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=18872, ...}) = 0 mmap(NULL, 18872, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff5ffff3000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240!\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=47760, ...}) = 0 brk(0x70a000) = 0x70a000 mmap(NULL, 2143784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff5fedb0000 mprotect(0x7ff5fedbb000, 2093056, PROT_NONE) = 0 mmap(0x7ff5fefba000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7ff5fefba000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240"\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=47712, ...}) = 0 mmap(NULL, 2144392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff5feba0000 mprotect(0x7ff5febab000, 2093056, PROT_NONE) = 0 mmap(0x7ff5fedaa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7ff5fedaa000 close(3) = 0 mprotect(0x7ff5fedaa000, 4096, PROT_READ) = 0 mprotect(0x7ff5fefba000, 4096, PROT_READ) = 0 munmap(0x7ff5ffff3000, 18872) = 0 brk(0x70b000) = 0x70b000 open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3 lseek(3, 0, SEEK_CUR) = 0 fstat(3, {st_mode=S_IFREG|0644, st_size=1198, ...}) = 0 mmap(NULL, 1198, PROT_READ, MAP_SHARED, 3, 0) = 0x7ff5ffff7000 lseek(3, 1198, SEEK_SET) = 1198 munmap(0x7ff5ffff7000, 1198) = 0 close(3) = 0 gettimeofday({1460734140, 589913}, NULL) = 0 getpgrp() = 85 rt_sigaction(SIGCHLD, {0x4464c0, [], SA_RESTORER|SA_RESTART, 0x7ff5ff426d40}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7ff5ff426d40}, 8) = 0 getrlimit(RLIMIT_NPROC, {rlim_cur=RLIM64_INFINITY, rlim_max=RLIM64_INFINITY}) = 0 brk(0x70c000) = 0x70c000 brk(0x70d000) = 0x70d000 brk(0x70e000) = 0x70e000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 open("/usr/bin/gradle", O_RDONLY) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7ff5fffef4e0) = -1 ENOTTY (Inappropriate ioctl for device) lseek(3, 0, SEEK_CUR) = 0 read(3, "#!/usr/bin/env bash\n\n###########"..., 80) = 80 lseek(3, 0, SEEK_SET) = 0 getrlimit(RLIMIT_NOFILE, {rlim_cur=2_1024, rlim_max=2*1024}) = 0 fcntl(255, F_GETFD) = -1 EBADF (Bad file descriptor) dup2(3, 255) = 255 close(3) = 0 fcntl(255, F_SETFD, FD_CLOEXEC) = 0 fcntl(255, F_GETFL) = 0 (flags O_RDONLY) fstat(255, {st_mode=S_IFREG|0755, st_size=4962, ...}) = 0 lseek(255, 0, SEEK_CUR) = 0 brk(0x710000) = 0x710000 brk(0x711000) = 0x711000 read(255, "#!/usr/bin/env bash\n\n###########"..., 4962) = 4962 pipe([3, 4]) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 lseek(255, -4560, SEEK_CUR) = 402 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ff5ffec0a10) = 89 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigaction(SIGCHLD, {0x4464c0, [], SA_RESTORER|SA_RESTART, 0x7ff5ff426d40}, {0x4464c0, [], SA_RESTORER|SA_RESTART, 0x7ff5ff426d40}, 8) = 0 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=89, si_status=0, si_utime=0, si_stime=0} --- strace: ptrace(PTRACE_SYSCALL,pid:88,sig:17): Invalid argument Process 88 detached

mphaney avatar Apr 15 '16 15:04 mphaney

Update: I started fresh with build 14352 (completely removed Bash via the lxrun /uninstall etc, then reinstalled). Right out of the gate, I performed sudo apt-get install gradle. The install performed excellently and running gradle -v did indeed output the expected results:

`$ gradle -v


Gradle 1.4

Gradle build time: Monday, September 9, 2013 8:44:25 PM UTC Groovy: 1.8.6 Ant: Apache Ant(TM) version 1.9.3 compiled on April 8 2014 Ivy: non official version JVM: 1.7.0_101 (Oracle Corporation 24.95-b01) OS: Linux 3.4.0+ amd64 `

HOWEVER, trying to actually use gradle in any meaningful way results in it simply hanging. Given that Java is already up to version 1.8.0_92 and Gradle is up to 2.13, I would much prefer to be able to simply install these products from their respective websites, alas, both hang without producing any output whatsoever :-/

mphaney avatar May 27 '16 17:05 mphaney

Gradle hanging is one of my only blockers for using bash on Windows for work, which I would love to do. I get the same thing. Just no output when running gradle.

spsDrop avatar Jun 03 '16 14:06 spsDrop

Agreed. If they could get the current Oracle build of JDK and the current Gradle working, I could drop Cygwin, PowerShell and my SSH session to another actual Linux box. Is there any word on this, @benhillis?

mphaney avatar Jun 06 '16 15:06 mphaney

I'm not familiar with gradle, could somebody provide me with a repro that demonstrates some broken functionality that I can debug?

benhillis avatar Jun 10 '16 00:06 benhillis

@benhillis Here are the exact steps I followed (pre-supposes that "unzip" has been installed via apt-get).

Download the Oracle JDK and Gradle packages: wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.tar.gz wget https://services.gradle.org/distributions/gradle-2.13-bin.zip

Then, for simplicity: sudo su

Create the target folders: mkdir /opt/jdk /opt/gradle

Extract each of the packages: tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk/ unzip gradle-2.13-bin.zip -d /opt/gradle/

If desired, verify the extractions: ls /opt/jdk ls /opt/gradle

Set defaults: update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_05/bin/java 100 update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_05/bin/javac 100 update-alternatives --install /usr/bin/gradle gradle /opt/gradle/gradle-2.13/bin/gradle 100

Again, if desired, verify settings: update-alternatives --display java update-alternatives --display javac update-alternatives --display gradle

Set environment variables: JAVA_HOME=/opt/jdk/jdk1.8.0_05 GRADLE_HOME=/opt/gradle/gradle-2.13 export JAVA_HOME export GRADLE_HOME

Verify Java works: java -version

Should produce the following:

java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

Then attempt to run Gradle (simply hangs) gradle -version

Expected output should be similar to this, obviously with different versions/OS/etc:

------------------------------------------------------------
Gradle 2.12
------------------------------------------------------------

Build time:   2016-03-14 08:32:03 UTC
Build number: none
Revision:     b29fbb64ad6b068cb3f05f7e40dc670472129bc0

Groovy:       2.4.4
Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM:          1.8.0_77 (Oracle Corporation 25.77-b03)
OS:           Windows 10 10.0 amd64

mphaney avatar Jun 10 '16 21:06 mphaney

Update: I've never actually just let it sit and see what happens, but apparently when I do the following is produced:

#
[thread 139913609742080 also had an error]# A fatal error has been detected by the Java Runtime Environment:

#
#  Internal Error (safepoint.cpp:308), pid=116, tid=139913115010816
#  guarantee(PageArmed == 0) failed: invariant
#
# JRE version: Java(TM) SE Runtime Environment (8.0_05-b13) (build 1.8.0_05-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode linux-amd64 compressed oops)
# Core dump written. Default location: /home/mark/core or core.116
#
# An error report file with more information is saved as:
# /home/mark/hs_err_pid116.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#
Aborted (core dumped)

The error report file it mentions is viewable here: http://pastebin.com/yDjB7W5H

mphaney avatar Jun 10 '16 22:06 mphaney

On our dev build "gradle -version" is working for me. Are there some other things I can try?

root@BENHILL-VM3:~# gradle -version

------------------------------------------------------------
Gradle 2.13
------------------------------------------------------------

Build time:   2016-04-25 04:10:10 UTC
Build number: none
Revision:     3b427b1481e46232107303c90be7b05079b05b1c

Groovy:       2.4.4
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_05 (Oracle Corporation 25.5-b02)
OS:           Linux 3.4.0+ amd64

benhillis avatar Jun 10 '16 22:06 benhillis

Oh, cool. I imagine that'll be making its way to us eventually then :-) Here is the most basic of tests:

Create a test folder:

mkdir gradle_test
cd gradle_test

Create a new file named build.gradle and add the following to it:

task compile << {
    println 'compiling source'
}

task compileTest(dependsOn: compile) << {
    println 'compiling unit tests'
}

task test(dependsOn: [compile, compileTest]) << {
    println 'running unit tests'
}

task dist(dependsOn: [compile, test]) << {
    println 'building the distribution'
}

Then simply run: gradle dist test

Expected output should be similar to:

Starting a new Gradle Daemon for this build (subsequent builds will be faster).
:compile
compiling source
:compileTest
compiling unit tests
:test
running unit tests
:dist
building the distribution

BUILD SUCCESSFUL

Total time: 7.486 secs

mphaney avatar Jun 10 '16 22:06 mphaney

When I run the tests I'm seeing the same Internal Error you pasted above.

benhillis avatar Jun 10 '16 23:06 benhillis

Ah, well, I suppose progress in either direction is still progress. Thanks for looking into it :-) My job and my sanity thank you as well.

mphaney avatar Jun 10 '16 23:06 mphaney

Is there any progress on this bug? Seems like there is a repo case now, right? This is still a big blocker for me.

spsDrop avatar Jun 25 '16 03:06 spsDrop

There doesn't seem to be a fix yet, but as per issue 541 you can use export _JAVA_OPTIONS="-Xint" as a workaround.

antillean avatar Jun 29 '16 20:06 antillean

Hmm, that still doesn't seem to work for either java -version or gradle -version. I know the bigger problem has been mentioned (shared memory), but I figured it's worth mentioning that this workaround doesn't seem to help my case at all, unfortunately :-/

mphaney avatar Jun 29 '16 21:06 mphaney

Did you try to install openjdk-7/8/9-jre-zero instead of current JVM? Please try and update results. NB: for Zero JVM, it is not required to use export _JAVA_OPTIONS="-Xint" though please clean it out after apt-get install.

leninalive avatar Jun 30 '16 09:06 leninalive

I would also accourage you to update to Xenium/16.04 (find in issues a receipt to do so) and use OpenJDK 9 as it seems to be most reliable for WSL.

leninalive avatar Jun 30 '16 09:06 leninalive

Well, I did manage to get Xenial installed, but unfortunately openjdk-8-jre-zero still won't install. Simply hangs on this line Running hooks in /etc/ca-certificates/update.d.... Older versions are inadequate for our work and, basically, while this has been a fun exercise, I'll just need to wait until full support for the proper Oracle JDK and Gradle is worked out. Thank you for all the suggestions, though!

mphaney avatar Jul 05 '16 18:07 mphaney

@mphaney - I couldn't install openjdk-8-jre[-zero] on Xenial either. It hangs in ca-certificates the same way as #541, #566 etc, because the hooks call java. What is interesting is that -Xint doesn't help. I also tried installing Eclipse on a lark and it also hangs even with -Xint. So while that workaround gets javac and Closure running, it doesn't seem to be a universal solution.

therealkenc avatar Jul 08 '16 05:07 therealkenc

@therealkenc - did you uninstall all other versions of Java before installing zero jvm?

leninalive avatar Jul 15 '16 03:07 leninalive