New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 769950 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 0
Type: Bug

Blocking:
issue 765834



Sign in to add a comment

[Predator] Add message to culprit to explain the results.

Project Member Reported by kateso...@chromium.org, Sep 28 2017

Issue description

[Predator] Send log back to clusterfuzz to explain empty results to avoid silent failures.

For example, if there is no regression range, we cannot find any culprit. This should be included in the message in culprit.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/458260d5370407db7b2c3d5503660d4c5e9b08c9

commit 458260d5370407db7b2c3d5503660d4c5e9b08c9
Author: Sharu Jiang <katesonia@google.com>
Date: Thu Oct 19 21:57:49 2017

[Predator] Add messages to Culprit to send back to clusterfuzz

Add customized logger to log information that clients are interested in.
Pass the messages from logger to Culprit to send back to clients.

Bug:  769950 
Change-Id: Ic085d3329ccb8deed93e0d4e23affbe34d8732b3
Reviewed-on: https://chromium-review.googlesource.com/713661
Reviewed-by: Chan Li <chanli@chromium.org>
Commit-Queue: Sharu Jiang <katesonia@chromium.org>

[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/frontend/handlers/result_feedback.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/analysis/exceptions.py
[add] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/analysis/test/log_test.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/common/test/crash_pipeline_test.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/analysis/culprit.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/common/crash_pipeline.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/frontend/handlers/test/result_feedback_test.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/frontend/templates/clusterfuzz_dashboard.html
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/common/predator_for_clusterfuzz.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/common/model/crash_analysis.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/analysis/changelist_classifier.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/frontend/templates/clusterfuzz_result_feedback.html
[add] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/analysis/log.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/analysis/test/changelist_classifier_test.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/frontend/handlers/test/clusterfuzz_dashboard_test.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/analysis/test/culprit_test.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/analysis/predator.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/common/test/predator_for_clusterfuzz_test.py
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/frontend/templates/result_feedback.html
[modify] https://crrev.com/458260d5370407db7b2c3d5503660d4c5e9b08c9/appengine/predator/app/frontend/handlers/clusterfuzz_dashboard.py

Description: Show this description
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/e878ba8a7fa47442fa60ef2f3118a253433f83f8

commit e878ba8a7fa47442fa60ef2f3118a253433f83f8
Author: Sharu Jiang <katesonia@google.com>
Date: Thu Nov 16 00:14:01 2017

[Predator] Store log in datastore for each crash.

Remove the local log.py under analysis/ and create ndb.Model log.py in app.common.model instead.
To collect logs spreading through all the code, we'd better store those log to datastore (for a crash, the key of its log in datastore is the same identifiers as the CrashAnalysis result for it.)

The Log() entity is created at the very beginning in crash_pipeline.py, and it will be passed all the way down to record logs.

log pass workflow:
------------------
crash_pipeline.py (create Log() if needed and put it into datastore with crash_identifiers as key.)
    -> predator_app.py (predator_for_chromecrash.py, predator_for_clusterfuzz.py)
        -> predator.py (the core analysis api entry)
            -> changelist_classifier.py

The log will finally be added to result to push back to client in following cls.

Bug:  769950 
Change-Id: I3244afba5c0276c67ffefaa5e50aee73784dfb02
Reviewed-on: https://chromium-review.googlesource.com/748163
Commit-Queue: Sharu Jiang <katesonia@chromium.org>
Reviewed-by: Shuotao Gao <stgao@chromium.org>

[add] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/analysis/test/log_util_test.py
[delete] https://crrev.com/6d1a8303bac9c8a451b7e76e7b90af2055de9fb8/appengine/predator/analysis/test/log_test.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/analysis/culprit.py
[add] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/analysis/log_util.py
[add] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/app/common/model/test/log_test.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/app/common/predator_for_clusterfuzz.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/analysis/type_enums.py
[add] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/app/common/model/log.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/app/common/predator_for_chromecrash.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/analysis/changelist_classifier.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/app/common/crash_pipeline.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/analysis/analysis_testcase.py
[delete] https://crrev.com/6d1a8303bac9c8a451b7e76e7b90af2055de9fb8/appengine/predator/analysis/log.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/app/common/predator_app.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/analysis/test/changelist_classifier_test.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/app/common/model/crash_analysis.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/analysis/test/culprit_test.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/analysis/predator.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/app/common/appengine_testcase.py
[modify] https://crrev.com/e878ba8a7fa47442fa60ef2f3118a253433f83f8/appengine/predator/app/common/model/test/crash_analysis_test.py

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/405152ea0f1e8a364b21bce8756a29e137291605

commit 405152ea0f1e8a364b21bce8756a29e137291605
Author: Andrii Shyshkalov <tandrii@chromium.org>
Date: Thu Nov 16 04:20:39 2017

Revert "[Predator] Store log in datastore for each crash."

This reverts commit e878ba8a7fa47442fa60ef2f3118a253433f83f8.

Reason for revert: added very flaky test

Original change's description:
> [Predator] Store log in datastore for each crash.
> 
> Remove the local log.py under analysis/ and create ndb.Model log.py in app.common.model instead.
> To collect logs spreading through all the code, we'd better store those log to datastore (for a crash, the key of its log in datastore is the same identifiers as the CrashAnalysis result for it.)
> 
> The Log() entity is created at the very beginning in crash_pipeline.py, and it will be passed all the way down to record logs.
> 
> log pass workflow:
> ------------------
> crash_pipeline.py (create Log() if needed and put it into datastore with crash_identifiers as key.)
>     -> predator_app.py (predator_for_chromecrash.py, predator_for_clusterfuzz.py)
>         -> predator.py (the core analysis api entry)
>             -> changelist_classifier.py
> 
> The log will finally be added to result to push back to client in following cls.
> 
> Bug:  769950 
> Change-Id: I3244afba5c0276c67ffefaa5e50aee73784dfb02
> Reviewed-on: https://chromium-review.googlesource.com/748163
> Commit-Queue: Sharu Jiang <katesonia@chromium.org>
> Reviewed-by: Shuotao Gao <stgao@chromium.org>

TBR=stgao@chromium.org,mbarbella@chromium.org,katesonia@chromium.org

Change-Id: Ie3b6a1631123a6a6347deb958ae68982899874ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  769950 
Reviewed-on: https://chromium-review.googlesource.com/773472
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>

[delete] https://crrev.com/6707984c0a40c819e6b49f3e561e9b87353e53b1/appengine/predator/analysis/test/log_util_test.py
[add] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/analysis/test/log_test.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/analysis/culprit.py
[delete] https://crrev.com/6707984c0a40c819e6b49f3e561e9b87353e53b1/appengine/predator/analysis/log_util.py
[delete] https://crrev.com/6707984c0a40c819e6b49f3e561e9b87353e53b1/appengine/predator/app/common/model/test/log_test.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/app/common/predator_for_clusterfuzz.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/analysis/type_enums.py
[delete] https://crrev.com/6707984c0a40c819e6b49f3e561e9b87353e53b1/appengine/predator/app/common/model/log.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/app/common/predator_for_chromecrash.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/analysis/changelist_classifier.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/app/common/crash_pipeline.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/analysis/analysis_testcase.py
[add] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/analysis/log.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/app/common/predator_app.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/analysis/test/changelist_classifier_test.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/app/common/model/crash_analysis.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/analysis/test/culprit_test.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/analysis/predator.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/app/common/appengine_testcase.py
[modify] https://crrev.com/405152ea0f1e8a364b21bce8756a29e137291605/appengine/predator/app/common/model/test/crash_analysis_test.py

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/20af972ae7ebfb3eb4505f192357095eaf8d2045

commit 20af972ae7ebfb3eb4505f192357095eaf8d2045
Author: Sharu Jiang <katesonia@google.com>
Date: Wed Nov 22 23:17:01 2017

Reland "[Predator] Store log in datastore for each crash."

This is a reland of e878ba8a7fa47442fa60ef2f3118a253433f83f8

After discussion, the flaky tests are because gae unit test The problem is that gae unit tests will share datastore... when they are running parallely.
A simple solution to this is to ensure tests operate on different primary keys.

Original change's description:
> [Predator] Store log in datastore for each crash.
>
> Remove the local log.py under analysis/ and create ndb.Model log.py in app.common.model instead.
> To collect logs spreading through all the code, we'd better store those log to datastore (for a crash, the key of its log in datastore is the same identifiers as the CrashAnalysis result for it.)
>
> The Log() entity is created at the very beginning in crash_pipeline.py, and it will be passed all the way down to record logs.
>
> log pass workflow:
> ------------------
> crash_pipeline.py (create Log() if needed and put it into datastore with crash_identifiers as key.)
>     -> predator_app.py (predator_for_chromecrash.py, predator_for_clusterfuzz.py)
>         -> predator.py (the core analysis api entry)
>             -> changelist_classifier.py
>
> The log will finally be added to result to push back to client in following cls.
>
> Bug:  769950 
> Change-Id: I3244afba5c0276c67ffefaa5e50aee73784dfb02
> Reviewed-on: https://chromium-review.googlesource.com/748163
> Commit-Queue: Sharu Jiang <katesonia@chromium.org>
> Reviewed-by: Shuotao Gao <stgao@chromium.org>

Bug:  769950 
Change-Id: I803996379ed8560fb830632c78da5176267ca350
Reviewed-on: https://chromium-review.googlesource.com/776005
Commit-Queue: Sharu Jiang <katesonia@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Shuotao Gao <stgao@chromium.org>

[add] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/analysis/test/log_util_test.py
[delete] https://crrev.com/90b64a3b3e8c70e04bcf9e103c6ded89eaa7d62b/appengine/predator/analysis/test/log_test.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/analysis/culprit.py
[add] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/analysis/log_util.py
[add] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/app/common/model/test/log_test.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/app/common/predator_for_clusterfuzz.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/analysis/type_enums.py
[add] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/app/common/model/log.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/app/common/predator_for_chromecrash.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/analysis/changelist_classifier.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/app/common/crash_pipeline.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/analysis/analysis_testcase.py
[delete] https://crrev.com/90b64a3b3e8c70e04bcf9e103c6ded89eaa7d62b/appengine/predator/analysis/log.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/app/common/predator_app.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/analysis/test/changelist_classifier_test.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/app/common/model/crash_analysis.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/analysis/test/culprit_test.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/analysis/predator.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/app/common/appengine_testcase.py
[modify] https://crrev.com/20af972ae7ebfb3eb4505f192357095eaf8d2045/appengine/predator/app/common/model/test/crash_analysis_test.py

Labels: -Pri-1 Pri-0
Now predator is sending log to clusterfuzz.
Example:
{
    "client_id": "clusterfuzz", 
    "crash_identifiers": "6270630424215552", 
    "result": {
        "feedback_url": "https://findit-for-me.googleplex.com/clusterfuzz/result-feedback?key=ahpzfmdvb2dsZS5jb206ZmluZGl0LWZvci1tZXJBCxITQ2x1c3RlcmZ1enpBbmFseXNpcyIoNmE4YjQ3ZjYyNjNjZjNlZmQyYzVkNDk5ZTgwZTEzOWJlYmY5MDYyOQw", 
        "found": true, 
        "log": [
            {
                "level": "warning", 
                "message": "Can't find culprits due to unavailable regression range.", 
                "name": "NoRegressionRange"
            }
        ], 
        "suspected_project": "android_os"
    }
}
Status: Fixed (was: Assigned)

Sign in to add a comment