utk-se / CodeAnalytics-analyzer

Single-shot code analysis for a code repo
1 stars 0 forks source link

File not found error #28

Closed robobenklein closed 4 years ago

robobenklein commented 4 years ago
[2020-02-20 04:25:36] [    INFO] [worker checkin] Checkin completed: setup
[2020-02-20 04:25:36] [    INFO] [worker checkin] Checkin completed: clone
[2020-02-20 04:25:36] [    INFO] [worker run_job] Beginning clone for job 5e28c91b1342c9331683f79a
[2020-02-20 04:25:46] [    INFO] [worker checkin] Checkin completed: analyze
Error: Fail to read source file 'job-5e28c91b1342c9331683f79a/include/mkldnn/dnnl_types.h'
[2020-02-20 04:25:52] [   ERROR] [worker run_job] Unknown exception when calling the analysis_function!
[2020-02-20 04:25:52] [   ERROR] [worker __main__] Unknown exception: [Errno 2] No such file or directory: 'job-5e28c91b1342c9331683f79a/include/mkldnn/dnnl_types.h'
[2020-02-20 04:25:52] [    INFO] [worker checkin] Checkin completed: error
Traceback (most recent call last):
  File "/home/ca-worker/venv/bin/ca-worker", line 8, in <module>
    sys.exit(__main__())
  File "/home/ca-worker/venv/lib/python3.6/site-packages/cadistributor/worker.py", line 251, in __main__
    raise e
  File "/home/ca-worker/venv/lib/python3.6/site-packages/cadistributor/worker.py", line 237, in __main__
    main_loop()
  File "/home/ca-worker/venv/lib/python3.6/site-packages/cadistributor/worker.py", line 265, in main_loop
    run_job(job)
  File "/home/ca-worker/venv/lib/python3.6/site-packages/cadistributor/worker.py", line 145, in run_job
    raise e # will let the main loop report error to server
  File "/home/ca-worker/venv/lib/python3.6/site-packages/cadistributor/worker.py", line 137, in run_job
    result = config['analysis']['function'](repodir)
  File "/home/ca-worker/venv/lib/python3.6/site-packages/caanalyzer/__main__.py", line 8, in analyze
    output = the_thing.analyze(input_path=path)
  File "/home/ca-worker/venv/lib/python3.6/site-packages/caanalyzer/analyzer.py", line 151, in analyze
    with open(file_path) as file:
FileNotFoundError: [Errno 2] No such file or directory: 'job-5e28c91b1342c9331683f79a/include/mkldnn/dnnl_types.h'

worker state:

{
    "endpoint" : "https://ca-core.unhexium.dev",
    "error" : {
        "type" : "<class 'FileNotFoundError'>",
        "str" : "[Errno 2] No such file or directory: 'job-5e28c91b1342c9331683f79a/include/mkldnn/dnnl_types.h'",
        "time" : ISODate("2020-02-20T04:25:52.453Z")
    },
    "job" : {
        "_id" : ObjectId("5e28c91b1342c9331683f79a"),
        "function" : "caanalyzer.__main__:analyze",
        "repodir" : "job-5e28c91b1342c9331683f79a",
        "url" : "https://github.com/apache/incubator-mxnet.git",
        "workdir" : "/tmp/ca-workdir/ca-worker-coretester1"
    },
    "lastcheckin" : ISODate("2020-02-20T04:25:52.453Z"),
    "lastcheckin_human" : "2020-02-20 04:25:52 ",
    "status" : "error"
}
argvrutter commented 4 years ago

assuming that the fix here is to check if a file exists before opening it, although not sure how that file name was provided then.

robobenklein commented 4 years ago

I am indeed much more interested to how it got that filename

the worker state has the repo url so that it can be debugged on that actual repo

argvrutter commented 4 years ago

Alright. I will work on this once I am out of classwork hell. On Thu, Feb 20, 2020 at 00:00 Ben Klein notifications@github.com wrote:

I am indeed much more interested to how it got that filename

the worker state has the repo url so that it can be debugged on that actual repo

— You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub https://github.com/utk-se/CodeAnalytics-analyzer/issues/28?email_source=notifications&email_token=ACIXGYQOQ223WE3VDJZW5M3RDYE5RA5CNFSM4KYG4ZLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMKXV6Q#issuecomment-588610298, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIXGYR2VKTDRQUXVSY6SUTRDYE5RANCNFSM4KYG4ZLA .

robobenklein commented 4 years ago

haven't seen this issue in a while, am unable to repro