Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Unix.Exit_or_signal (Exit_non_zero 66)) #636

Closed
Will5 opened this issue Apr 10, 2017 · 27 comments
Closed

(Unix.Exit_or_signal (Exit_non_zero 66)) #636

Will5 opened this issue Apr 10, 2017 · 27 comments

Comments

@Will5
Copy link

Will5 commented Apr 10, 2017

When I run ./gradlew build, I get a BUILD SUCCESSFUL. When I run infer -- ./gradlew build, I get the following error:

$ ./gradlew build --stacktrace
...

BUILD SUCCESSFUL

...
$ infer -- ./gradlew build --stacktrace
Capturing in gradle mode...
Running and capturing gradle compilation...
Nothing to compile. Try running `./gradlew clean` first.
Uncaught exception:
  
  (Unix.Exit_or_signal (Exit_non_zero 66))

Raised at file "src/error.ml", line 7, characters 20-30
Called from file "backend/infer.ml", line 455, characters 2-21

I'm running OS X El Capitan Version 10.11.6 and Infer 0.10.0.

@jvillard
Copy link
Contributor

Hi @Will5, the actual error message is a bit lost in there; it is:

Nothing to compile. Try running `./gradlew clean` first.`

It will be a bit better in the upcoming 0.11.0 release (not out yet):

$ infer -- ./gradlew build
Capturing in gradle mode...
Running and capturing gradle compilation...
Nothing to compile. Try running `./gradlew clean` first.
ERROR: (Unix.Exit_or_signal (Exit_non_zero 66))

That last line of output is still quite useless though, we can probably get rid of it.

@Will5
Copy link
Author

Will5 commented Apr 11, 2017

Hi @jvillard, I forgot to mention that I get the same error after running ./gradlew clean. Here's the output from infer -- ./gradlew clean:

$ infer -- ./gradlew clean --stacktrace
Capturing in gradle mode...
Running and capturing gradle compilation...
Nothing to compile. Try running `./gradlew clean` first.
Uncaught exception:
  
  (Unix.Exit_or_signal (Exit_non_zero 66))

Raised at file "src/error.ml", line 7, characters 20-30
Called from file "backend/infer.ml", line 455, characters 2-21

Is there an ETA on 0.11.0?

@jvillard
Copy link
Contributor

jvillard commented Apr 11, 2017

@Will5 you need to rerun infer once you've run ./gradlew clean:

$ ./gradlew clean
...
$ infer -- ./gradlew build
...

@Will5
Copy link
Author

Will5 commented Apr 11, 2017

@jvillard, that was after a ./gradlew clean.

Both .gradlew build and ./gradlew clean return the same BUILD SUCCESSFUL.
Both infer -- .gradlew build and infer -- ./gradlew clean return the same error message.

@jvillard
Copy link
Contributor

Just to make extra sure: What's the output of ./gradlew clean && infer -- ./gradlew build?

@shankybnl
Copy link

Hi @jvillard ,

I am also getting a similar error. Below are the details:

gradle clean works fine

Output:

BUILD SUCCESSFUL
Total time: 3.384 secs

infer -- gradle build fails with error

Output:

https://gist.github.com/shankybnl/396975db9113175d3a13662c0ec44cf4

infer version:
Infer version v0.10.0
Copyright 2009 - present Facebook. All Rights Reserved.

Let me know if anything else required for debugging.

Thanks in advance

@jvillard
Copy link
Contributor

@shankybnl One of the javac commands failed:

Failed to execute: javac -J-Duser.language=en @/opt/infer-linux64-v0.10.0/prime-tracking/infer-out/filelists/gradle_lXjnay.txt @/tmp/args_3ebf4c

Can you try running it and paste its output here?

@Will5 Just to make sure, you get "nothing to compile" after your run ./gradlew clean && infer -- ./gradlew build, correct? If so, can you please paste the result of ./gradlew clean && ./gradlew --debug build?

@shankybnl
Copy link

Hi @jvillard

Below is output of javac gradle_lXjnay.txt

error: Class names, 'gradle_lXjnay.txt', are only accepted if annotation processing is explicitly requested
1 error

@jvillard
Copy link
Contributor

@shankybnl you have to run the command as it was written, in particular putting @ in front of argument files:

javac -J-Duser.language=en @/opt/infer-linux64-v0.10.0/prime-tracking/infer-out/filelists/gradle_lXjnay.txt @/tmp/args_3ebf4c

@jvillard
Copy link
Contributor

@shankybnl does gradle build succeed on its own without infer?

@shankybnl
Copy link

@jvillard Yes, gradle build succeed without infer.

Sorry, my bad. below is the required output:

javac -J-Duser.language=en @/opt/infer-linux64-v0.10.0/prime-tracking/infer-out/filelists/gradle_lXjnay.txt @/tmp/args_3ebf4c

Output: https://gist.github.com/shankybnl/d82a2fe5aefd971512174ec77b468daa

@jvillard
Copy link
Contributor

Looks like changing the language to "en" is the issue here. Does this command succeed without -J-Duser.language=en? I.e. javac @/opt/infer-linux64-v0.10.0/prime-tracking/infer-out/filelists/gradle_lXjnay.txt @/tmp/args_3ebf4c.

@shankybnl
Copy link

@jvillard No. javac @/opt/infer-linux64-v0.10.0/prime-tracking/infer-out/filelists/gradle_lXjnay.txt @/tmp/args_3ebf4c also gives the same error.

@jvillard
Copy link
Contributor

@shankybnl can you paste the contents of /opt/infer-linux64-v0.10.0/prime-tracking/infer-out/filelists/gradle_lXjnay.txt and /tmp/args_3ebf4c?

@shankybnl
Copy link

@jvillard
Copy link
Contributor

@shankybnl I meant the contents of the files themselves, not the output of infer.

@shankybnl
Copy link

Sorry, wrong link was copied. This is the correct one: https://gist.github.com/shankybnl/b64047424766603fe59d588c1f70b981

@shankybnl
Copy link

Hi @jvillard,

Did you get a chance to see contents of the files posted at the above-mentioned link (https://gist.github.com/shankybnl/b64047424766603fe59d588c1f70b981)?

Thanks,
Shanky

@jvillard
Copy link
Contributor

Yes, thanks! It would be good to try and get a repro on a small (one file) example so we can fix the bug.

Probably some option added by infer makes javac unhappy. We could compare what gradle --verbose build is doing to what infer is doing to see what options change between the two.

Would you mind pasting gradle clean && gradle --verbose build? Or just the javac command in gradle --verbose build that corresponds to the one where infer is failing if you can find it.

@shankybnl
Copy link

Hi @jvillard,

I am getting error on executing gradle clean && gradle --verbose build due to --verbose mode. It is gving error : Unknown command-line option '--verbose'

I executed the command with -d (debug) mode.

gradle clean && gradle build -d

Please find the logs here for failing file file : https://gist.github.com/shankybnl/e05d894870bbc44a57067bb3dbb3a7ea

Let me know if it helps or anything else required. Thanks.

@shankybnl
Copy link

Hi @jvillard,

Any updates on this issue?

Thanks,
Shanky

@Will5
Copy link
Author

Will5 commented May 2, 2017

I was finally able to run infer again last night. I'm not sure why, but one thing I did notice this morning is that infer continued to fail with the same error if Android Studio was running at the same time.

@shankybnl
Copy link

Hi @jvillard ,

Hope you are doing great!

Please share the probable date of the fix so I can analyze my java backend code.

Thanks in advance.

Regards,
Shanky

@jvillard
Copy link
Contributor

jvillard commented May 9, 2017

Hi @shankybnl, I was away for a couple of weeks but new I'm back and I'll be taking a look at your issue again.

@Will5: is Android Studio building your project in the background somehow? If so then infer won't get a chance to capture a fresh build as gradle will report that there is nothing to compile. You might also be interested in the OkBuck plugin that can turn your gradle project into a Buck project. Buck is better supported by infer than gradle.

@jvillard
Copy link
Contributor

@shalinguyen does the problem go away if you tell gradle to set the encoding to UTF-8? Google suggests this for example: http://mrhaki.blogspot.co.uk/2012/06/gradle-goodness-set-java-compiler.html

@shankybnl
Copy link

Perfect @jvillard! This worked like a charm :)

apply plugin: 'java'
compileJava.options.encoding = 'UTF-8'

Thanks a ton for your help.

Best,
Shanky

@jvillard
Copy link
Contributor

Awesome! Thanks for reporting back.

I'm not sure what can be done on the infer side to avoid this issue, it might be specific to the gradle integration or it might be a wider javac issue, but in any case guessing the right encoding to give to javac sounds difficult.

I'll just close this issue since there's a simple user solution. If we see more instances of that problem it may give us a clue as to how to solve it more automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants