New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 733861 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Not on Chrome anymore
Closed: Sep 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

log noise in SupervisedUserWhitelistInstallerTest

Project Member Reported by sorin@chromium.org, Jun 15 2017

Issue description

Can some that understands the Chrome profiles and the user white lists take a look at this please?

On Windows when running the SupervisedUserWhitelistInstallerTest, some stderr noise is output in the console, such as

[ RUN      ] SupervisedUserWhitelistInstallerTest.GetHashFromCrxId
[110244:116580:0615/153345.771:2080072671:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_28325\client-id did not exist when trying to create profile icon
[110244:116580:0615/153345.781:2080072671:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_28325\other-client-id did not exist when trying to create profile icon
[110244:116580:0615/153345.788:2080072687:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_28325\client-id did not exist when trying to create profile icon
[       OK ] SupervisedUserWhitelistInstallerTest.GetHashFromCrxId (42 ms)

I've tried to fix the issue by creating the profile directory but this resulted in Windows creating lots of Chrome desktop links to the profile everytime the unit tests were run: https://chromium-review.googlesource.com/c/530444/

Meanwhile, some of the changes introduced above have been reverted, since the links on the desktop are not acceptable.



 

Comment 1 by bauerb@chromium.org, Jun 16 2017

Status: Assigned (was: Untriaged)
Does the log spam occur only with SupervisedUserWhitelistInstallerTest.GetHashFromCrxId or also with other tests? SupervisedUserWhitelistInstallerTest.GetHashFromCrxId only tests static methods, so in principle we could just skip the test fixture.

It is a bit weird that we are trying to create the shortcuts at all though. From what I can tell, this happens if the ProfileShortcutManager is enabled, which should only be the case on Windows if the --enable-profile-shortcut-manager command line flag is set.

Comment 2 by sorin@chromium.org, Jun 16 2017

Thank you!

My observation is that the noise occurs in all tests using the SupervisedUserWhitelistInstallerTest test fixture.

[----------] 3 tests from SupervisedUserWhitelistInstallerTest
[ RUN      ] SupervisedUserWhitelistInstallerTest.GetHashFromCrxId
[110244:116580:0615/153345.771:2080072671:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_28325\client-id did not exist when trying to create profile icon
[110244:116580:0615/153345.781:2080072671:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_28325\other-client-id did not exist when trying to create profile icon
[110244:116580:0615/153345.788:2080072687:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_28325\client-id did not exist when trying to create profile icon
[       OK ] SupervisedUserWhitelistInstallerTest.GetHashFromCrxId (42 ms)
[ RUN      ] SupervisedUserWhitelistInstallerTest.InstallNewWhitelist
[110244:116580:0615/153345.820:2080072718:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_12140\client-id did not exist when trying to create profile icon
[110244:116580:0615/153345.826:2080072718:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_12140\other-client-id did not exist when trying to create profile icon
[110244:116580:0615/153345.833:2080072734:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_12140\client-id did not exist when trying to create profile icon
[       OK ] SupervisedUserWhitelistInstallerTest.InstallNewWhitelist (77 ms)
[ RUN      ] SupervisedUserWhitelistInstallerTest.RegisterAndUninstallExistingWhitelist
[110244:116580:0615/153345.927:2080072828:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_19272\client-id did not exist when trying to create profile icon
[110244:116580:0615/153345.938:2080072828:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_19272\other-client-id did not exist when trying to create profile icon
[110244:116580:0615/153345.951:2080072843:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_19272\client-id did not exist when trying to create profile icon
[110244:116580:0615/153345.977:2080072875:ERROR:profile_shortcut_manager_win.cc(177)] Profile directory C:\Users\sorin\AppData\Local\Temp\scoped_dir110244_19272\client-id did not exist when trying to create profile icon
[       OK ] SupervisedUserWhitelistInstallerTest.RegisterAndUninstallExistingWhitelist (104 ms)
[----------] 3 tests from SupervisedUserWhitelistInstallerTest (254 ms total)

Comment 3 by bauerb@chromium.org, Jun 16 2017

Thanks! I'm still not quite sure why the ProfileManager is trying to create the shortcuts... Can you try getting a stack trace for when that log statement happens? I don't have a Windows machine myself right now.

Comment 4 by sorin@chromium.org, Jun 16 2017

At the high level, it seems that the function CreateOrUpdateShortcutIconForProfile is creating the shortcuts:

SkBitmap app_icon_bitmap =
      family->CreateExact(kShortcutIconSize, kShortcutIconSize).AsBitmap();

then it tells Windows to refresh the desktop. 

This function above is invoked on the file thread by a task posted from the stack trace below:

unit_tests.exe!ProfileShortcutManagerWin::CreateOrUpdateShortcutsForProfileAtPath(profile_path, create_mode, action) Line 994	C++
unit_tests.exe!ProfileShortcutManagerWin::CreateOrUpdateProfileIcon(profile_path) Line 813	C++
unit_tests.exe!ProfileShortcutManagerWin::OnProfileAdded(profile_path) Line 871	C++
unit_tests.exe!ProfileInfoCache::AddProfileToCache(profile_path, name, gaia_id, user_name, icon_index, supervised_user_id) Line 218	C++
unit_tests.exe!ProfileInfoCache::AddProfile(profile_path, name, gaia_id, user_name, icon_index, supervised_user_id) Line 1122	C++
unit_tests.exe!component_updater::SupervisedUserWhitelistInstallerTest::SetUp() Line 218	C++
unit_tests.exe!testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(object, method, location) Line 2457	C++
unit_tests.exe!testing::Test::Run() Line 2469	C++
 	

Comment 5 by bauerb@chromium.org, Jun 19 2017

Components: Services>SupervisedUser
Status: Started (was: Assigned)
Duh, turns out I misread the logic in ProfileShortcutManager::IsFeatureEnabled() -- the profile shortcut manager is enabled *unless* the --user-data-dir command line is set, but SupervisedUserWhitelistInstallerTest bypasses the command line. I have a CL up at https://chromium-review.googlesource.com/539342, and I'll check whether it gets rid of the log spam.

Comment 6 by bauerb@chromium.org, Sep 28 2017

Status: Fixed (was: Started)
For some reason this didn't get picked up by bugdroid, but it should be fixed with r480851.

Sign in to add a comment