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

Fix crash when clearing IPFS cache #7635

Merged
merged 1 commit into from
Jan 18, 2021
Merged

Fix crash when clearing IPFS cache #7635

merged 1 commit into from
Jan 18, 2021

Conversation

bbondy
Copy link
Member

@bbondy bbondy commented Jan 17, 2021

The problem is the TracingDataTypes are stored in a set, so if you re-use one of them that's already used it will crash.
See std::set<TracingDataType> pending_sub_tasks_.

So I just patched in a new tracing data type and now the crash is gone.

Resolves brave/brave-browser#13625

Submitter Checklist:

  • There is a ticket for my issue.
  • Used Github auto-closing keywords in the commit message.
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed).
  • Requested a security/privacy review as needed.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

  • Load an ipfs:// URI so go-ipfs is running
  • Go to chrome://settings and clear browsing data
  • Turn ON all 3 checkboxes and clear
    Before it would crash, now it should not crash.

@bbondy bbondy requested review from yrliou and mkarolin January 17, 2021 23:49
@bbondy bbondy requested a review from a team as a code owner January 17, 2021 23:49
@bbondy bbondy self-assigned this Jan 17, 2021
Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patches change LGTM

@bbondy bbondy force-pushed the ipfs-cache-crash-fix branch from 4392cf0 to e9448bd Compare January 18, 2021 01:05
The problem is the TracingDataTypes are stored in a set, so if you re-use one of them that's already used it will crash.
See `std::set<TracingDataType> pending_sub_tasks_`.

So I just patched in a new tracing data type and now the crash is gone.
@bbondy bbondy force-pushed the ipfs-cache-crash-fix branch from e9448bd to 3b4fb82 Compare January 18, 2021 01:40
@bbondy bbondy merged commit 83db4e7 into master Jan 18, 2021
@bbondy bbondy deleted the ipfs-cache-crash-fix branch January 18, 2021 01:42
@kjozwiak kjozwiak added this to the 1.21.x - Nightly milestone Jan 18, 2021
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

Successfully merging this pull request may close these issues.

crash when clearing "Cached images and files" while IPFS enabled/running
4 participants