Memory infra cause DEBUG crash during first run on Android |
||||||
Issue description
Chrome Version: TOT
OS: Reproduced on KK (4.4) and L (5.1)
What steps will reproduce the problem?
(1) Build chromium with 'target_os="android" is_debug=true'
(2) Uninstall previously installed chromium
(3) Write /data/local/chrome-trace-config.json file quoted below
(4) Run chromium
{
"startup_duration": 12,
"result_file": "/sdcard/Download/trace.json",
"record_mode": "record-as-much-as-possible",
"trace_config": {
"included_categories": ["disabled-by-default-memory-infra"],
"excluded_categories": ["*"],
"memory_dump_config": {
"triggers": [
{ "mode": "light", "periodic_interval_ms": 50 },
{ "mode": "detailed", "periodic_interval_ms": 1000 }
]
}
}
}
What is the expected result?
Welcome screen, etc.
What happens instead?
F/chromium( 7201): [FATAL:persistent_histogram_allocator.cc(411)] Check failed: false. error=6
...
I/DEBUG ( 178): backtrace:
I/DEBUG ( 178): #00 pc 00021f90 /system/lib/libc.so (tgkill+12)
I/DEBUG ( 178): #01 pc 00012fe1 /system/lib/libc.so (pthread_kill+48)
I/DEBUG ( 178): #02 pc 000131f5 /system/lib/libc.so (raise+10)
I/DEBUG ( 178): #03 pc 00011f2b /system/lib/libc.so
I/DEBUG ( 178): #04 pc 00021844 /system/lib/libc.so (abort+4)
I/DEBUG ( 178): #05 pc 00088923 /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::debug::BreakDebugger()+18)
I/DEBUG ( 178): #06 pc 0009d2eb /data/app-lib/org.chromium.chrome-1/libbase.cr.so (logging::LogMessage::~LogMessage()+606)
I/DEBUG ( 178): #07 pc 000b2009 /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::PersistentHistogramAllocator::AllocateHistogram(base::HistogramType, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, int, int, base::BucketRanges const*, int, unsigned int*)+604)
I/DEBUG ( 178): #08 pc 000ad93f /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::Histogram::Factory::Build()+138)
I/DEBUG ( 178): #09 pc 000ae1e5 /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::LinearHistogram::FactoryGetWithRangeDescription(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, int, int, unsigned int, int, base::LinearHistogram::DescriptionPair const*)+128)
I/DEBUG ( 178): #10 pc 000ae21f /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::LinearHistogram::FactoryGet(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, int, int, unsigned int, int)+14)
I/DEBUG ( 178): #11 pc 000ae363 /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::LinearHistogram::FactoryGet(char const*, int, int, unsigned int, int)+46)
I/DEBUG ( 178): #12 pc 000e8bf9 /data/app-lib/org.chromium.chrome-1/libblink_platform.cr.so (blink::EnumerationHistogram::EnumerationHistogram(char const*, int)+18)
I/DEBUG ( 178): #13 pc 0010f21f /data/app-lib/org.chromium.chrome-1/libblink_platform.cr.so
I/DEBUG ( 178): #14 pc 000119cf /data/app-lib/org.chromium.chrome-1/libwtf.cr.so (WTF::Partitions::reportMemoryUsageHistogram()+66)
I/DEBUG ( 178): #15 pc 00248741 /data/app-lib/org.chromium.chrome-1/libblink_platform.cr.so (blink::ThreadState::collectGarbage(blink::BlinkGC::StackState, blink::BlinkGC::GCType, blink::BlinkGC::GCReason)+1296)
I/DEBUG ( 178): #16 pc 002365b5 /data/app-lib/org.chromium.chrome-1/libblink_platform.cr.so (blink::BlinkGCMemoryDumpProvider::OnMemoryDump(base::trace_event::MemoryDumpArgs const&, base::trace_event::ProcessMemoryDump*)+168)
I/DEBUG ( 178): #17 pc 000ed51b /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::trace_event::MemoryDumpManager::InvokeOnMemoryDump(base::trace_event::MemoryDumpManager::ProcessMemoryDumpAsyncState*)+438)
I/DEBUG ( 178): #18 pc 000ed777 /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::trace_event::MemoryDumpManager::SetupNextMemoryDump(std::__ndk1::unique_ptr<base::trace_event::MemoryDumpManager::ProcessMemoryDumpAsyncState, std::__ndk1::default_delete<base::trace_event::MemoryDumpManager::ProcessMemoryDumpAsyncState> >)+450)
I/DEBUG ( 178): #19 pc 000ed54f /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::trace_event::MemoryDumpManager::InvokeOnMemoryDump(base::trace_event::MemoryDumpManager::ProcessMemoryDumpAsyncState*)+490)
I/DEBUG ( 178): #20 pc 00089237 /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*)+374)
I/DEBUG ( 178): #21 pc 000a3fab /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::MessageLoop::RunTask(base::PendingTask*)+438)
I/DEBUG ( 178): #22 pc 000a4445 /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::MessageLoop::DeferOrRunPendingTask(base::PendingTask)+28)
I/DEBUG ( 178): #23 pc 000a454d /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::MessageLoop::DoWork()+156)
I/DEBUG ( 178): #24 pc 000a6bc3 /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::MessagePumpDefault::Run(base::MessagePump::Delegate*)+90)
I/DEBUG ( 178): #25 pc 000a5a79 /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::MessageLoop::RunHandler()+168)
I/DEBUG ( 178): #26 pc 000bff57 /data/app-lib/org.chromium.chrome-1/libbase.cr.so (base::RunLoop::Run()+86)
I/DEBUG ( 178): #27 pc 00b823e9 /data/app-lib/org.chromium.chrome-1/libcontent.cr.so
I/DEBUG ( 178): #28 pc 00b84295 /data/app-lib/org.chromium.chrome-1/libcontent.cr.so
I/DEBUG ( 178): #29 pc 00b84497 /data/app-lib/org.chromium.chrome-1/libcontent.cr.so
I/DEBUG ( 178): #30 pc 00b83cc1 /data/app-lib/org.chromium.chrome-1/libcontent.cr.so (Java_org_chromium_content_app_ContentMain_nativeStart+252)
I/DEBUG ( 178): #31 pc 0001dbcc /system/lib/libdvm.so (dvmPlatformInvoke+112)
,
Dec 22 2016
The NOTREACHED is important because it's indicating that the memory reserved for persistent histograms is full. If I look at UMA.PersistentAllocator.BrowserMetrics.UsedPct on UMA, though, it never tops 75% so I'm unsure why your debug build is topping out. I can increase the memory reservations -- it's no actual cost unless it's actually used.
,
Dec 22 2016
CL https://codereview.chromium.org/2604433002/ increases the memory allocation from 3MiB to 5MiB. If that doesn't make the failure go away, something else is going on.
,
Jan 3 2017
Brian, don't we fall back to the old allocation strategy when the persisted space is exhausted? If not, we should rather than crash.
,
Jan 4 2017
,
Jan 5 2017
The DCHECK also catches memory corruption and other failures. But I suppose it can be removed since the failure would be caused by something external, which makes it confusing.
,
Jan 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/867f4553745f6106db762b4260397740760aaacf commit 867f4553745f6106db762b4260397740760aaacf Author: bcwhite <bcwhite@chromium.org> Date: Thu Jan 05 17:29:02 2017 Adjust memory sizes of persistent histogram allocations. Most subprocesses have very few histograms and so use little of the memory they are given. 64KiB is a typical minimum allocation, though. Browser histogram memory usage has increased now that subprocess histograms are fully merged into the main process. BUG= 675600 TBR=jochen@chromium.org Review-Url: https://codereview.chromium.org/2604433002 Cr-Commit-Position: refs/heads/master@{#441688} [modify] https://crrev.com/867f4553745f6106db762b4260397740760aaacf/chrome/browser/chrome_browser_field_trials.cc [modify] https://crrev.com/867f4553745f6106db762b4260397740760aaacf/content/browser/browser_child_process_host_impl.cc [modify] https://crrev.com/867f4553745f6106db762b4260397740760aaacf/content/browser/renderer_host/render_process_host_impl.cc
,
Jan 10 2017
Usage is now peaking at about 55% plus a few odd outliers in the 85-90 range (empty from 55-85). Overflow is still safe, just not persistent.
,
Jan 10 2017
Your change meets the bar and is auto-approved for M56. Please go ahead and merge the CL manually. Please contact milestone owner if you have questions. Owners: amineer@(clank), cmasso@(bling), gkihumba@(cros), bustamante@(desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7867c40c4e436908620049ee2311f9a8591a47fe commit 7867c40c4e436908620049ee2311f9a8591a47fe Author: Brian White <bcwhite@chromium.org> Date: Tue Jan 10 15:26:53 2017 Adjust memory sizes of persistent histogram allocations. Most subprocesses have very few histograms and so use little of the memory they are given. 64KiB is a typical minimum allocation, though. Browser histogram memory usage has increased now that subprocess histograms are fully merged into the main process. BUG= 675600 TBR=jochen@chromium.org Review-Url: https://codereview.chromium.org/2604433002 Cr-Commit-Position: refs/heads/master@{#441688} (cherry picked from commit 867f4553745f6106db762b4260397740760aaacf) Review-Url: https://codereview.chromium.org/2619203006 . Cr-Commit-Position: refs/branch-heads/2924@{#714} Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059} [modify] https://crrev.com/7867c40c4e436908620049ee2311f9a8591a47fe/chrome/browser/chrome_browser_field_trials.cc [modify] https://crrev.com/7867c40c4e436908620049ee2311f9a8591a47fe/content/browser/browser_child_process_host_impl.cc [modify] https://crrev.com/7867c40c4e436908620049ee2311f9a8591a47fe/content/browser/renderer_host/render_process_host_impl.cc
,
Jan 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/734c246453da8b9a38d7266fe2bbd272037c99e8 commit 734c246453da8b9a38d7266fe2bbd272037c99e8 Author: bcwhite <bcwhite@chromium.org> Date: Tue Jan 17 18:51:45 2017 Don't crash debug builds for full allocator. The "full" error is caused by things outside of the control of this code so don't crash because of it. BUG= 675600 Review-Url: https://codereview.chromium.org/2638093002 Cr-Commit-Position: refs/heads/master@{#444101} [modify] https://crrev.com/734c246453da8b9a38d7266fe2bbd272037c99e8/base/metrics/persistent_histogram_allocator.cc
,
Jan 17 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by primiano@chromium.org
, Dec 19 2016Owner: bcwh...@chromium.org
Status: Assigned (was: Untriaged)