brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.88k stars 2.34k forks source link

DCHECK failure from ads::AdjustTimeToBeginningOfMonth() #20104

Closed simonhong closed 2 years ago

simonhong commented 2 years ago

In linux local build, I got below DCHECK failure after enabling rewards.

I built with some npm params shared at https://bravesoftware.slack.com/archives/CB0KCRCQN/p1639545725306400?thread_ts=1639532797.297000&cid=CB0KCRCQN

#0 0x7f4559dba459 base::debug::CollectStackTrace()
#1 0x7f4559cb42d3 base::debug::StackTrace::StackTrace()
#2 0x7f4559db9ee1 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7f45487383c0 (/usr/lib/x86_64-linux-gnu/libpthread-2.31.so+0x153bf)
#4 0x7f4547dc3941 abort
#5 0x7f4559db9065 base::debug::BreakDebuggerAsyncSafe()
#6 0x7f4559cd6e8b logging::LogMessage::~LogMessage()
#7 0x7f4559cd74ae logging::LogMessage::~LogMessage()
#8 0x5573bd6c7068 ads::AdjustTimeToBeginningOfMonth()
#9 0x5573bd6c70da ads::GetTimeAtBeginningOfThisMonth()
#10 0x5573bd5ee681 ads::GetEarningsForThisMonth()
#11 0x5573bd5ee3ce std::__Cr::__function::__policy_invoker<>::__call_impl<>()
#12 0x5573bd66f048 ads::database::table::Transactions::OnGetTransactions()
#13 0x5573bd6545c9 _ZNSt4__Cr6__bindIMN3ads8database10InitializeEFvN4mojo9StructPtrINS1_5mojom17DBCommandResponseEEENS_8functionIFvbEEEEJPS3_RKNS_12placeholders4__phILi1EEERSB_EEclIJS8_EEENS_13__bind_returnISD_NS_5tupleIJSE_SH_SB_EEENSO_IJDpOT_EEEXsr22__is_valid_bind_returnISD_SP_ST_EE5valueEE4typeESS_
#14 0x5573bfbdef8b bat_ads::OnRunDBTransaction()
#15 0x5573bfbdf7c2 base::internal::Invoker<>::RunOnce()
#16 0x5573bda6418e bat_ads::mojom::BatAdsClient_RunDBTransaction_ForwardToCallback::Accept()

cc @aseren

stephendonner commented 2 years ago

@aseren is there a testplan for this? i.e. regression test(s) or other? Or can it be marked as QA/No as it seems covered partially by unittests? 🙏

aseren commented 2 years ago

Sorry for missing a test plan. Current issue could be tested here: https://github.com/brave/brave-browser/issues/20204