Skip to content

Java / Boot (Clojure build tool) does not work #277

Closed

Description

Per #49 I installed JDK 7u79 manually and java -version works.
After downloading the boot shell script (which is a Java program with a shell prelude) and unning boot -h, it hangs trying to download the base version 2.5.2.
strace -f on the main process yields:

strace: Test for PTRACE_O_TRACESYSGOOD failed, giving up using this feature.
Process 479 attached with 3 threads
[pid   484] gettimeofday( <unfinished ...>
[pid   485] sched_yield( <unfinished ...>
[pid   484] <... gettimeofday resumed> {1461732294, 712294}, NULL) = 0
[pid   485] <... sched_yield resumed> ) = 0
[pid   484] rt_sigreturn( <unfinished ...>
[pid   485] sched_yield( <unfinished ...>
[pid   484] <... rt_sigreturn resumed> ) = 4209649592
[pid   485] <... sched_yield resumed> ) = 0
[pid   484] --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0xc} ---
strace: ptrace(PTRACE_SYSCALL,pid:484,sig:11): Invalid argument
Process 479 detached
Process 484 detached
Process 485 detached

The gettimeofday call is not always present if you run the strace multiple times.

Activity

  1. seancorfield commented on Apr 27, 2016

    @seancorfield
    Author

    FWIW, Leiningen, Clojure's other build tool, gets a little further. It's able to download itself so you can run lein version but lein repl hangs, just like Boot does. If you run lein inside a project with dependencies that need to be fetched, the downloads all fail (both from Maven Central and Clojars) with SocketException errors. Happy to do further debugging and provide any extra details that will help debug these Java problems.

  2. seancorfield commented on May 27, 2016

    @seancorfield
    Author

    With Build 14352, we get a little further, here's the strace -f from lein repl now:

    With build 14352, we get a little further. lein run works. lein repl still hangs. Here's the strace -f from that:

    strace: Test for PTRACE_O_TRACESYSGOOD failed, giving up using this feature.
    Process 72 attached with 19 threads
    [pid    78] sched_yield()               = 0
    [pid    78] sched_yield()               = 0
    [pid    78] sched_yield()               = 0
    [pid    78] sched_yield()               = 0
    [pid    78] sched_yield()               = 0
    [pid    78] sched_yield()               = 0
    [pid    86] futex(0x7fff000c7f28, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
    [pid    78] sched_yield()               = 0
    [pid    86] <... futex resumed> )       = 0
    [pid    78] sched_yield( <unfinished ...>
    [pid    86] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
    [pid    78] <... sched_yield resumed> ) = 0
    [pid    86] <... clock_gettime resumed> {707, 298165000}) = 0
    [pid    78] sched_yield( <unfinished ...>
    [pid    86] gettimeofday( <unfinished ...>
    [pid    78] <... sched_yield resumed> ) = 0
    [pid    86] <... gettimeofday resumed> {1464325897, 583266}, NULL) = 0
    [pid    78] sched_yield()               = 0
    [pid    86] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
    [pid    78] sched_yield()               = 0
    [pid    86] <... clock_gettime resumed> {707, 300901000}) = 0
    [pid    78] sched_yield()               = 0
    [pid    86] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
    [pid    78] sched_yield()               = 0
    [pid    86] <... clock_gettime resumed> {707, 303133000}) = 0
    [pid    78] sched_yield()               = 0
    [pid    86] futex(0x7fff000c7f54, FUTEX_WAIT_BITSET_PRIVATE, 1, {707, 353133000}, ffffffff <unfinished ...>
    [pid    78] sched_yield()               = 0
    [pid    78] sched_yield()               = 0
    [pid    89] rt_sigreturn( <unfinished ...>
    [pid    78] sched_yield( <unfinished ...>
    [pid    89] <... rt_sigreturn resumed> ) = 0
    [pid    78] <... sched_yield resumed> ) = 0
    [pid    89] --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0x7fff09660100} ---
    strace: ptrace(PTRACE_SYSCALL,pid:89,sig:11): Invalid argument
    
  3. seancorfield commented on May 27, 2016

    @seancorfield
    Author

    Boot now gets as far as completing the download of its core JAR but then hangs. Here's the strace -f for that:

    [pid   213] rt_sigreturn()              = 11535290
    [pid   213] --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0x7fff834e0000} ---
    strace: ptrace(PTRACE_SYSCALL,pid:213,sig:11): Invalid argument
    

    (all other processes show "detached").

  4. leftofnull commented on Aug 13, 2016

    @leftofnull

    Any traction on this? It would be great to have lein repl working, as well as boot. So far, I've had the same experiences as described above.

  5. seancorfield commented on Aug 23, 2016

    @seancorfield
    Author

    We're definitely getting a bit further now -- Boot seems to be able to download dependencies for projects but then fails with:

    boot repl
    sun.nio.fs.UnixException: Bad file descriptor
    at sun.nio.fs.UnixNativeDispatcher.read(Native Method)
    at sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:315)
    at java.lang.Thread.run(Thread.java:745)

  6. calvinlfer commented on Oct 10, 2016

    @calvinlfer

    The same thing happens for SBT (Scala Build Tool) although I'm using Java 8

    sun.nio.fs.UnixException: Bad file descriptor
            at sun.nio.fs.UnixNativeDispatcher.read(Native Method)
            at sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:318)
            at java.lang.Thread.run(Thread.java:745)
    
  7. seancorfield commented on Oct 19, 2016

    @seancorfield
    Author

    Based on my latest tests on build 14946, with both OpenJDK 7 and Oracle Java 8, I think this issue can be closed since everything I've tried with Boot now works as expected. I'm able to run all sorts of very complex Boot tasks, compiling and testing Clojure code. I haven't fully exercised all our code base (some 40Kloc of Clojure) yet but that's mostly because I'll need Redis, MongoDB, MySQL and several other things installed to run everything.

  8. seancorfield commented on Oct 21, 2016

    @seancorfield
    Author

    I'm happy to close my issue as "fixed" now. Thank you. #911 is a different issue (that also affects some of our actual code, as well as some of our other tooling).

  9. metasoarous commented on Nov 29, 2016

    @metasoarous

    Sean Corfield (@seancorfield) Cal (@calvinlfer) Sorry for commenting on an old thread, but while I'm able to build most Leiningen projects without any issue (and in general work with Clojure code), I'm not able to run figwheel. The problem seems to be the file watcher, as I get the same Bad file descriptor language you both get. Were you able to resolve that issue specifically? Or should I open up a separate issue?

  10. calvinlfer commented on Nov 29, 2016

    @calvinlfer

    Christopher Small (@metasoarous) I think that looks like it should be filed as a separate issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions