/home/chronos/user/log/chrome isn't a symlink and isn't rotated?

2,037 views
Skip to first unread message

Ian Barkley-Yeung

unread,
Feb 4, 2022, 5:35:05 PM2/4/22
to Chromium OS Development
So, I was trying to understand why we weren't getting some info we expected on some crash reports, and I realized that /home/chronos/user/log/chrome isn't a symlink in the way that /var/log/chrome/chrome is. Instead, as far as I can tell, it's a real file which is never rotated.

On my real laptop (not in dev mode), file:///home/chronos/user/log/ displays:

Name                          Size        Date Modified
chrome                         24.4 MB    2/4/22, 12:45:29 PM
libassistant.log               204 kB     6/16/21, 8:46:16 PM
libassistant.log_rotationlock  0 B        6/15/21, 12:10:19 PM

There's no timestamped chrome_20220127-094449 files like there is in file:///var/log/chrome/. 

And looking at file:///home/chronos/user/log/chrome, I see entries all the way back to June of last year, which I think is when I acquired this machine. 24MB is really big and file:///home/chronos/user/log/chrome takes a long time to load.

https://chromium.googlesource.com/chromium/src/+/main/docs/chrome_os_logging.md suggests that /home/chronos/user/log/chrome should have the same layout as /var/log/chrome/, with the timestamped files next to a chrome symlink.

So -- is the current layout wrong or is there a reason for it? Having an unrotated log file seems like we risk having the disk fill up eventually.

I can update the docs and the crash_reporter_logs.config file if the current layout is correct, but my first instinct is to try & make file:///home/chronos/user/log closer to file:///var/log/chrome/


Jorge Lucangeli Obes

unread,
Feb 4, 2022, 5:38:41 PM2/4/22
to Ian Barkley-Yeung, Chromium OS Development
I don't know of a reason for /h/c/u/l/chrome to not be a symlink.

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev

Jorge Lucangeli Obes

unread,
Feb 4, 2022, 5:57:52 PM2/4/22
to Sarthak Kukreti, Ian Barkley-Yeung, Chromium OS Development
It sounds like we should implement the rotation that Ian suggested?

On Fri, Feb 4, 2022 at 2:45 PM Sarthak Kukreti <sarthak...@google.com> wrote:
It's a bug: it's tracked in crbug.com/1231192.

Best
Sarthak
--
Sarthak Kukreti | Software Engineer | sarthak...@google.com | 650-203-5572

Ian Barkley-Yeung

unread,
Feb 4, 2022, 6:24:59 PM2/4/22
to Jorge Lucangeli Obes, Gwendal Grignou, Victor-Gabriel Savu, Sarthak Kukreti, Chromium OS Development
What's the expected end-state of the /home/chronos/user/log/ directory then? Crash reporter is currently not getting logs because it's assuming the same structure as /var/log/chrome.

Comment 149 on the bug makes it sound like go/deviceruncleanuponlogin is just a bandaid.

Should we move to just reading /home/chronos/user/log/chrome and /home/chronos/user/log/chrome.PREVIOUS? Are those going to become "real" files? 

Thanks,
Ian


Demarco Simmons

unread,
Feb 4, 2022, 7:54:51 PM2/4/22
to Ian Barkley-Yeung, Jorge Lucangeli Obes, Gwendal Grignou, Victor-Gabriel Savu, Sarthak Kukreti, Chromium OS Development
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Ian Barkley-Yeung

unread,
Feb 4, 2022, 9:00:55 PM2/4/22
to Chromium OS Development, simmonsd...@gmail.com, Jorge Lucangeli Obes, Gwendal Grignou, Victor-Gabriel Savu, Sarthak Kukreti, Chromium OS Development, Ian Barkley-Yeung
For posterity (this seems to have been bounced from the group alias), Sarthak wrote:

Longer term, yes (I'll defer to Gwendal on the actual details on the
logging side). User cryptohomes are mounted with 'nosymfollow' so the
path forward is keeping chrome logs as text files instead of going
back to the symlink usage.

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.

Mike Frysinger

unread,
Feb 5, 2022, 12:55:05 AM2/5/22
to Ian Barkley-Yeung, Jorge Lucangeli Obes, Gwendal Grignou, Victor-Gabriel Savu, Sarthak Kukreti, Chromium OS Development
isn't this a question for the Chromium team ?  don't they own/manage the entire contents of /home/chronos/user/ ?  there's nothing CrOS specific there afaict.

would be nice if we could never use symlinks in the home dir.  i assume the Chromium folks already figured that out since e.g. Windows doesn't handle them well.
-mike

Ian Barkley-Yeung

unread,
Feb 6, 2022, 12:51:11 AM2/6/22
to Mike Frysinger, Jorge Lucangeli Obes, Gwendal Grignou, Victor-Gabriel Savu, Sarthak Kukreti, Chromium OS Development
No, on Windows, Chrome doesn't log by default, and when it does, it just makes a single log which is overwritten each time:

All the log rotation stuff is a ChromeOS-specific thing, as far as I can tell.

Satoru Takabayashi

unread,
Feb 6, 2022, 7:22:16 PM2/6/22
to Ian Barkley-Yeung, Mike Frysinger, Jorge Lucangeli Obes, Gwendal Grignou, Victor-Gabriel Savu, Sarthak Kukreti, Chromium OS Development
My /home/chronos/user/log/chrome is also pretty large. I think this is a problem that needs to be fixed. I think it would be good to add UMA so that we can see the impact of the fix.

Igor

unread,
Feb 7, 2022, 4:31:27 AM2/7/22
to Chromium OS Development, Satoru Takabayashi, Mike Frysinger, Jorge Lucangeli Obes, Gwendal Grignou, Victor-Gabriel Savu, Sarthak Kukreti, Chromium OS Development, Ian Barkley-Yeung
AFAIK, that is true only for devices that use a test image. And it is done for easier development. For verified boot those files get rotated. Guess the verified boot option can be verified by collecting the device logs (https://support.google.com/chrome/a/answer/3293821) and checking the data there. 

Satoru Takabayashi

unread,
Feb 7, 2022, 4:55:23 AM2/7/22
to Igor, Chromium OS Development, Mike Frysinger, Jorge Lucangeli Obes, Gwendal Grignou, Victor-Gabriel Savu, Sarthak Kukreti, Ian Barkley-Yeung
My device has been running the official build in the verified mode (i.e. not a test image). Perhaps the rotation logic regressed at some point?

Daniil Lunev

unread,
Feb 7, 2022, 7:34:34 PM2/7/22
to Satoru Takabayashi, Igor, Chromium OS Development, Mike Frysinger, Jorge Lucangeli Obes, Gwendal Grignou, Victor-Gabriel Savu, Sarthak Kukreti, Ian Barkley-Yeung

---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.


--
Daniil Lunev
ChromeOS Platform Storage
Reply all
Reply to author
Forward
0 new messages