New issue
Advanced search Search tips

Issue 757041 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Aug 31
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

DCHECK hit in wallpaper_manager.cc

Project Member Reported by sky@chromium.org, Aug 18 2017

Issue description

Specifically the DCHECK in HashWallpaperFilesIdStr() that salt is not-null. I seem to rather easily hit this when running a debug build of chrome in gdb. Often times I'll hit a breakpoint, continue, then hit the DCHECK.

Here's the trace:

#0  base::debug::(anonymous namespace)::DebugBreak () at ../../base/debug/debugger_posix.cc:239
#1  0x00007ffff758e828 in base::debug::BreakDebugger () at ../../base/debug/debugger_posix.cc:258
#2  0x00007ffff761b819 in logging::LogMessage::~LogMessage (this=0x7fffffffaef0) at ../../base/logging.cc:784
#3  0x00005555573ca96b in chromeos::(anonymous namespace)::HashWallpaperFilesIdStr (files_id_unhashed=...) at ../../chrome/browser/chromeos/login/users/wallpaper/w\
allpaper_manager.cc:183
#4  0x00005555573ca790 in chromeos::WallpaperManager::GetFilesId (this=0x1c008547a720, account_id=...) at ../../chrome/browser/chromeos/login/users/wallpaper/wallp\
aper_manager.cc:1359
#5  0x00007fffe705f680 in wallpaper::WallpaperManagerBase::MoveLoggedInUserCustomWallpaper (this=0x1c008547a720) at ../../components/wallpaper/wallpaper_manager_ba\
se.cc:874
#6  0x0000555555f6c23f in base::internal::FunctorTraits<void (google_apis::UrlFetchRequestBase::*)(), void>::Invoke<base::WeakPtr<google_apis::drive::SingleBatchab\
leDelegateRequest> const&> (method=&virtual table offset 328, receiver_ptr=...) at ../../base/bind_internal.h:194
#7  0x00005555563162aa in base::internal::InvokeHelper<true, void>::MakeItSo<void (extensions::RequirementsChecker::* const&)(), base::WeakPtr<extensions::Requirem\
entsChecker> const&> (functor=@0x1c0085a5f540: &virtual table offset 328, weak_ptr=...) at ../../base/bind_internal.h:283
#8  0x00005555573d4380 in base::internal::Invoker<base::internal::BindState<void (wallpaper::WallpaperManagerBase::*)(), base::WeakPtr<chromeos::WallpaperManager> \
>, void ()>::RunImpl<void (wallpaper::WallpaperManagerBase::*)(), std::__1::tuple<base::WeakPtr<chromeos::WallpaperManager> >, 0ul>(void (wallpaper::WallpaperManag\
erBase::*&&)(), std::__1::tuple<base::WeakPtr<chromeos::WallpaperManager> >&&, std::__1::integer_sequence<unsigned long, 0ul>) (functor=<unknown type in /secondary\
/builds/build1/src/out/Debug2/chrome, CU 0x0, DIE 0x5125a>, bound=<unknown type in /secondary/builds/build1/src/out/Debug2/chrome, CU 0x0, DIE 0x51267>) at ../../b\
ase/bind_internal.h:335
#9  0x00005555573d42d9 in base::internal::Invoker<base::internal::BindState<void (wallpaper::WallpaperManagerBase::*)(), base::WeakPtr<chromeos::WallpaperManager> \
>, void ()>::RunOnce(base::internal::BindStateBase*) (base=0x1c0085a5f520) at ../../base/bind_internal.h:304
#10 0x00007ffff7541211 in base::Callback<void (), (base::internal::CopyMode)0, (base::internal::RepeatMode)0>::Run() && (this=0x7fffffffc318) at ../../base/callbac\
k.h:91
#11 0x00007ffff7597b0d in base::debug::TaskAnnotator::RunTask (this=0x1c0084efccb0, queue_function=0x7ffff79171d1 "MessageLoop::PostTask", pending_task=0x7fffffffc\
300) at ../../base/debug/task_annotator.cc:59
#12 0x00007ffff76458c5 in base::MessageLoop::RunTask (this=0x1c0084efcb20, pending_task=0x7fffffffc300) at ../../base/message_loop/message_loop.cc:406
#13 0x00007ffff7645b27 in base::MessageLoop::DeferOrRunPendingTask (this=0x1c0084efcb20, pending_task=...) at ../../base/message_loop/message_loop.cc:417
#14 0x00007ffff7647113 in base::MessageLoop::DoDelayedWork (this=0x1c0084efcb20, next_delayed_work_time=0x1c0084d6f240) at ../../base/message_loop/message_loop.cc:\
564
#15 0x00007ffff764eacd in base::MessagePumpLibevent::Run (this=0x1c0084d6f230, delegate=0x1c0084efcb20) at ../../base/message_loop/message_pump_libevent.cc:230
#16 0x00007ffff7645176 in base::MessageLoop::Run (this=0x1c0084efcb20) at ../../base/message_loop/message_loop.cc:346
#17 0x00007ffff76f6727 in base::RunLoop::Run (this=0x7fffffffcdd8) at ../../base/run_loop.cc:123
#18 0x00005555583d9cc5 in ChromeBrowserMainParts::MainMessageLoopRun (this=0x1c0084d5eb20, result_code=0x1c0084d5e8f8) at ../../chrome/browser/chrome_browser_main.\
cc:1916
#19 0x00007ffff108b29b in content::BrowserMainLoop::RunMainMessageLoopParts (this=0x1c0084d5e8e0) at ../../content/browser/browser_main_loop.cc:1173
#20 0x00007ffff1093105 in content::BrowserMainRunnerImpl::Run (this=0x1c0084dbaaa0) at ../../content/browser/browser_main_runner.cc:152
#21 0x00007ffff107f6db in content::BrowserMain (parameters=...) at ../../content/browser/browser_main.cc:46
#22 0x00007ffff2ba3209 in content::RunNamedProcessTypeMain (process_type=..., main_function_params=..., delegate=0x7fffffffe0d8) at ../../content/app/content_main_\
runner.cc:410
#23 0x00007ffff2ba5bb6 in content::ContentMainRunnerImpl::Run (this=0x1c0084d6e2f0) at ../../content/app/content_main_runner.cc:693
#24 0x00007ffff2ba0b1d in content::ContentServiceManagerMainDelegate::RunEmbedderProcess (this=0x7fffffffe040) at ../../content/app/content_service_manager_main_de\
legate.cc:51
#25 0x00007ffff7e7bfac in service_manager::Main (params=...) at ../../services/service_manager/embedder/main.cc:469
#26 0x00007ffff2ba215b in content::ContentMain (params=...) at ../../content/app/content_main.cc:19
#27 0x0000555555cdac3a in ChromeMain (argc=4, argv=0x7fffffffe288) at ../../chrome/app/chrome_main.cc:122
#28 0x0000555555cdaaf2 in main (argc=4, argv=0x7fffffffe288) at ../../chrome/app/chrome_exe_main_aura.cc:17

My cursory looks is that WallpaperManagerBase::MoveLoggedInUserCustomWallpaper() does not ensure the salt has been fetched when it calls GetFilesId(), which leads to the DCHECK. I don't know enough about the surrounding code as to why this code doesn't need to wait for salt to be ready like other code in WallpaperManager (for example, SetPolicyControlledWallpaper checks to see if it's safe to call GetFilesId). Maybe part of the problem is WallpaperManagerBase defines GetFilesId, where it isn't at all obvious that it may not be safe to call GetFilesId().

Another possibility is perhaps this is a threading issue. Seems like there are multiple threads at play here and it isn't obvious to me what code can run where.

Also note that I've been running gdb on chrome for quite a long time, and this just started happening to me in the past couple of days.
 

Comment 1 by sky@chromium.org, Sep 18 2017

I'm still hitting this. I seem to trigger more often when a breakpoint is set early on, which likely indicates a timing issue.
|MoveLoggedInUserCustomWallpaper| has been deprecated with |wallpaper_manager|. This can be closed.
Status: WontFix (was: Assigned)

Sign in to add a comment