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

"Credential is invalid, Duplicate Redemption","statusCode":400" being repeated causing CPU performance issues #8985

Closed
kjozwiak opened this issue Apr 2, 2020 · 2 comments
Labels
closed/duplicate Issue has already been reported

Comments

@kjozwiak
Copy link
Member

kjozwiak commented Apr 2, 2020

Description

Sometimes Brave will get into a state where it will start running into the above error which will repeat itself over and over causing the CPU/performance of Brave to spike. In my particular case, I had the terminal opened and ITerm2 ended up crashing due to the following error being repeatedly repeated for ~30 or more minutes:

[43930:775:0401/221821.312856:INFO:redeem_token.cc(177)] OnCreateConfirmation
[43930:775:0401/221821.312908:INFO:redeem_token.cc(179)] URL Request Response:
[43930:775:0401/221821.312924:INFO:redeem_token.cc(180)]   URL: https://ads-serve.brave.com/v1/confirmation/6cc0dc33-8a0c-4d3e-b941-76135ca9c698/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiUXArcVJmcm9ZTExpNm0vbThiTGZjdkhHL2M5YU5IL0NxL3F5M2RCY0JWTT1cIixcImNyZWF0aXZlSW5zdGFuY2VJZFwiOlwiNTJhYTMyMDUtN2FkNy00MTBjLWI0ZGYtZTUxYmYwYWY2M2ZmXCIsXCJwYXlsb2FkXCI6e30sXCJ0eXBlXCI6XCJ2aWV3XCJ9Iiwic2lnbmF0dXJlIjoia21VcHhxeXJENE80Vmt5K2xEdG9VU2VpSGI1cjJYMEE3V1dGL3BNdWtjREtPTzdIbzdBdzhQNGhOYW14OEFmbEZsZ2IzZjhaYmJEMUwxYUxwN1o0Q3c9PSIsInQiOiJ0TW5mcWRVU29LY3N6WS96QTdjMEZOL0ZZMDI5bGh0VUtjSmltSWhYeE84OVI0VmRUUHM3TUthWktEZU9NOWZPbDVKS0R1RWM0aFZsazVuZDlFNW9FUT09In0=
[43930:775:0401/221821.312942:INFO:redeem_token.cc(181)]   Response Status Code: 400
[43930:775:0401/221821.312954:INFO:redeem_token.cc(182)]   Response: {"error":"Credential is invalid, Duplicate Redemption","statusCode":400}
[43930:775:0401/221821.317218:INFO:redeem_token.cc(183)]   Headers:
[43930:775:0401/221821.317288:INFO:redeem_token.cc(185)]     accept-ranges: bytes
[43930:775:0401/221821.317313:INFO:redeem_token.cc(185)]     access-control-allow-origin: *
[43930:775:0401/221821.317332:INFO:redeem_token.cc(185)]     connection: keep-alive
[43930:775:0401/221821.317351:INFO:redeem_token.cc(185)]     content-length: 72
[43930:775:0401/221821.317371:INFO:redeem_token.cc(185)]     content-type: application/json; charset=utf-8
[43930:775:0401/221821.317391:INFO:redeem_token.cc(185)]     date: Thu, 02 Apr 2020 02:18:21 GMT
[43930:775:0401/221821.317411:INFO:redeem_token.cc(185)]     etag: W/"48-0RAp6ZrZWv+9N0i5xv78QPEAr/g"
[43930:775:0401/221821.317431:INFO:redeem_token.cc(185)]     via: 1.1 varnish
[43930:775:0401/221821.317451:INFO:redeem_token.cc(185)]     x-cache: MISS
[43930:775:0401/221821.317469:INFO:redeem_token.cc(185)]     x-cache-hits: 0
[43930:775:0401/221821.317488:INFO:redeem_token.cc(185)]     x-powered-by: Express
[43930:775:0401/221821.317506:INFO:redeem_token.cc(185)]     x-served-by: cache-yyz4535-YYZ
[43930:775:0401/221821.317524:WARNING:redeem_token.cc(191)] Duplicate confirmation
[43930:775:0401/221821.317543:WARNING:redeem_token.cc(432)] Failed to redeem 6cc0dc33-8a0c-4d3e-b941-76135ca9c698 confirmation id with 52aa3205-7ad7-410c-b4df-e51bf0af63ff creative instance id for view

Example of iTerm2 crashing:

Screen Shot 2020-04-02 at 12 49 12 AM

Could possibly be related to #8846 as I noticed that the Bat Ledger Service was increasing in CPU usage and hitting 100% at times.

Steps to Reproduce

I'm not 100% sure as this is happening on and off with my personal profile. Unfortunately I don't have any STR. Once @tmancey looks into this, maybe we can get a STR/Cases created.

Actual result:

As described above, the "Credential is invalid, Duplicate Redemption","statusCode":400" is repeated over and over till the CPU hits ~100% causing performance issues.

Expected result:

There should be some time of limit of how many retries can happen and not doing them for long periods of time where it causes performance issues with Brave.

Reproduces how often:

I'm not 100% sure but it happens at least once a day on this particular profile.

Brave version (brave://version info)

Brave | 1.8.61 Chromium: 81.0.4044.83 (Official Build) nightly (64-bit)
-- | --
Revision | 5718ca617723806b9aacfb41108a0d911d1bde74-refs/branch-heads/4044@{#853}
OS | macOS Version 10.15.3 (Build 19D76)

Version/Channel Information:

  • Can you reproduce this issue with the current release? I'm not 100% sure but assuming yes
  • Can you reproduce this issue with the beta channel? I'm not 100% sure but assuming yes
  • Can you reproduce this issue with the dev channel? I'm not 100% sure but assuming yes
  • Can you reproduce this issue with the nightly channel? Yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Does the issue resolve itself when disabling Brave Rewards? Yes (after resarting)
  • Is the issue reproducible on the latest version of Chrome? N/A

Miscellaneous Information:

CCing @bsclifton @rebron @NejcZdovc @tmancey

@jsecretan jsecretan added the priority/P2 A bad problem. We might uplift this to the next planned release. label Apr 3, 2020
@tmancey tmancey self-assigned this Apr 4, 2020
@tmancey
Copy link
Contributor

tmancey commented Apr 8, 2020

This issue will be resolved by #7226

@kjozwiak
Copy link
Member Author

This issue will be resolved by #7226

Going to close this off as a duplicate as per the above.

@kjozwiak kjozwiak added closed/duplicate Issue has already been reported and removed QA/Yes bug feature/ads perf priority/P2 A bad problem. We might uplift this to the next planned release. labels Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed/duplicate Issue has already been reported
Projects
None yet
Development

No branches or pull requests

3 participants