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

Issue 781363 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug-Regression



Sign in to add a comment

chrome://net-internals/#chromeos: debug-logs are not generated with .tgz extension

Project Member Reported by mkarkada@chromium.org, Nov 3 2017

Issue description

Chrome OS: M63 build (10032.25.0/ 63.0.3239.31) on cave, eve devices
M64 build (10089.0.0/ 64.0.3255.0)


What steps will reproduce the problem?
(1) Goto chrome://net-internals/#chromeos
(2) Click on Store Debug Logs and observe Creating log file.   

What is the expected result?
debug-logs should be generated with .tgz extension. I remember this use to work in previous builds.

What happens instead?
debug-logs are generated with file name missing .tgz extension. As a result when these logs are attached while filing a bug, the developers cannot retrieve system info out of it.

 
Cc: derat@chromium.org vapier@chromium.org
 Issue 778464  has been merged into this issue.

Comment 2 by kotah@chromium.org, Nov 29 2017

Cc: kotah@chromium.org
Cc: thestig@chromium.org
Owner: semenzato@chromium.org
Status: Assigned (was: Untriaged)
StartLogRetrieval is called with some file_name_template (probably FILE_PATH_LITERAL("debug-logs.tgz")):

https://cs.chromium.org/chromium/src/chrome/browser/chromeos/system_logs/debug_log_writer.cc?sq=package:chromium&dr=C&l=217

void StartLogRetrieval(const base::FilePath& file_name_template,
                       bool should_compress,
                       const std::string& sequence_token_name,
                       const DebugLogWriter::StoreLogsCallback& callback) {
  base::FilePath file_path =
      logging::GenerateTimestampedName(file_name_template, base::Time::Now());

But then this CL just drops the extension:
https://chromium-review.googlesource.com/c/chromium/src/+/599026

Assigning to semenzato.
Status: Started (was: Assigned)
Sorry about this.

As a workaround, can you rename the log file before untarring it?
Sure, as a workaround, we can just rename it, and I think we all figured that out, so this is not a very high priority bug ,-)
He he thanks.  I asked that because the initial comment said

"As a result when these logs are attached while filing a bug, the developers cannot retrieve system info out of it"

so I thought there may be some intermediate step that was borked by the missing extension.

My code was really bad---it unnecessarily broke the clear, simple abstraction implicit in the function name.  My only excuse is that I was distracted by a number of complicated issues in the CL, partly due to migration.
 
For future reference:

compile unit tests outside cros-sdk with
  ninja -C out/Default unit_tests  # NOT unittests

run with 
  out/Default/unit_tests --gtest_filter=ChromeLoggingTest.SetUpSymlink

If using ssh, run as

 xvfb-run -s "-screen 0 1024x768x24" ./out/Default/unit_tests ...

Project Member

Comment 9 by bugdroid1@chromium.org, Jan 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/214cd28d863b8c7ad9db93b3d60eb7106a0f915e

commit 214cd28d863b8c7ad9db93b3d60eb7106a0f915e
Author: Luigi Semenzato <semenzato@chromium.org>
Date: Sat Jan 27 01:15:59 2018

logging_chrome: remove log file extension in the right place

An earlier commit needlessly ruined GenerateTimestampedName()
making it indiscriminately remove extensions.  The extension-chopping
code is being put in the right place (at the caller site).

BUG= chromium:781363 
TEST=none

Change-Id: Ic0edf8e082ce9af34b6679bec179e76e8f4797dc
Reviewed-on: https://chromium-review.googlesource.com/838242
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532113}
[modify] https://crrev.com/214cd28d863b8c7ad9db93b3d60eb7106a0f915e/base/files/scoped_temp_dir.h
[modify] https://crrev.com/214cd28d863b8c7ad9db93b3d60eb7106a0f915e/chrome/browser/logging_chrome_unittest.cc
[modify] https://crrev.com/214cd28d863b8c7ad9db93b3d60eb7106a0f915e/chrome/common/logging_chrome.cc
[modify] https://crrev.com/214cd28d863b8c7ad9db93b3d60eb7106a0f915e/chrome/common/logging_chrome.h

Cc: st...@chromium.org semenzato@chromium.org r...@chromium.org snanda@chromium.org
 Issue 758359  has been merged into this issue.
Cc: kirtika@google.com
Labels: RegressedIn-62
Status: Fixed (was: Started)
Looks fixed now. I guess it's a little late to backport to 65.

Sign in to add a comment