[Android,Facebook,Infer]太多关于推断错误的打开文件

时间:2015-11-03 07:19:55

标签: android facebook facebook-infer

我使用Facebook的推断检查我的安卓代码

infer -- ./gradlew build
after 8 minutes

Fatal error: exception Sys_error("/Users/lm/project/android_workplace/******/app/build/intermediates/exploded-aar/com.mogujie/user/1.2.17/jars/classes.jar: Too many open files")
Traceback (most recent call last):
  File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/infer", line 180, in <module>
    main()
  File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/infer", line 144, in main
    capture_exitcode = imported_module.gen_instance(args, cmd).capture()
  File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/../lib/capture/gradle.py", line 83, in capture
    return util.run_commands(cmds)
  File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/../lib/capture/util.py", line 40, in run_commands
    if not cmd.start():
  File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 692, in start
    if self.capture() == os.EX_OK:
  File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 478, in capture
    return self.run_infer_frontend()
  File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 469, in run_infer_frontend
    self.args.analyzer
  File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 385, in run_command
    raise e
subprocess.CalledProcessError: Command '[u'/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/InferJava', u'-project_root', '/Users/lm/project/android_workplace/Minicooper4android', u'-results_dir', u'/Users/lm/project/android_workplace/Minicooper4android/infer-out', u'-verbose_out', '/var/folders/2r/7hc18jz1091_jg7_8jcnqlhr0000gn/T/javac_qWbfkP.out', u'-models', u'/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/../lib/java/models.jar', u'-no-static_final']' returned non-zero exit status 2

1 个答案:

答案 0 :(得分:0)

来自http://fbinfer.com/support

  

程序可以同时保持打开的最大文件数在MacOs上有点低。您可以通过运行以下命令来增加限制,例如:

       agerange  gender  income
index                          
0             3       0     200
1             2       0   25600
2             4       0  106000
3             4       0    3000