Commit 51ae055c authored by Wei Lee's avatar Wei Lee Committed by Commit Bot

camera: Add socket information when create/delete socket

These lines are added to collect more information for debugging
crbug.com/1053569

Bug: 1053569
Test: Information appear in logs
Change-Id: Ifb1ed1c4762f1470bb1f626936a6b9a11f63dffe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083979Reviewed-by: default avatarShik Chen <shik@chromium.org>
Commit-Queue: Wei Lee <wtlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751252}
parent 813d6c04
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <vector> #include <vector>
#include "base/bind.h" #include "base/bind.h"
#include "base/files/file.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/files/file_util.h" #include "base/files/file_util.h"
#include "base/posix/eintr_wrapper.h" #include "base/posix/eintr_wrapper.h"
...@@ -237,6 +238,17 @@ void CameraHalDispatcherImpl::CreateSocket(base::WaitableEvent* started) { ...@@ -237,6 +238,17 @@ void CameraHalDispatcherImpl::CreateSocket(base::WaitableEvent* started) {
return; return;
} }
// TODO(crbug.com/1053569): Remove these lines once the issue is solved.
base::File::Info info;
if (!base::GetFileInfo(socket_path, &info)) {
LOG(WARNING) << "Failed to get the socket info after building Mojo channel";
} else {
LOG(WARNING) << "Building Mojo channel. Socket info:"
<< " creation_time: " << info.creation_time
<< " last_accessed: " << info.last_accessed
<< " last_modified: " << info.last_modified;
}
// Change permissions on the socket. // Change permissions on the socket.
struct group arc_camera_group; struct group arc_camera_group;
struct group* result = nullptr; struct group* result = nullptr;
...@@ -392,6 +404,18 @@ void CameraHalDispatcherImpl::OnCameraHalClientConnectionError( ...@@ -392,6 +404,18 @@ void CameraHalDispatcherImpl::OnCameraHalClientConnectionError(
void CameraHalDispatcherImpl::StopOnProxyThread() { void CameraHalDispatcherImpl::StopOnProxyThread() {
DCHECK(proxy_task_runner_->BelongsToCurrentThread()); DCHECK(proxy_task_runner_->BelongsToCurrentThread());
// TODO(crbug.com/1053569): Remove these lines once the issue is solved.
base::File::Info info;
if (!base::GetFileInfo(base::FilePath(kArcCamera3SocketPath), &info)) {
LOG(WARNING) << "Failed to get socket info before deleting";
} else {
LOG(WARNING) << "Delete socket. Socket info:"
<< " creation_time: " << info.creation_time
<< " last_accessed: " << info.last_accessed
<< " last_modified: " << info.last_modified;
}
if (!base::DeleteFile(base::FilePath(kArcCamera3SocketPath), if (!base::DeleteFile(base::FilePath(kArcCamera3SocketPath),
/* recursive */ false)) { /* recursive */ false)) {
LOG(ERROR) << "Failed to delete " << kArcCamera3SocketPath; LOG(ERROR) << "Failed to delete " << kArcCamera3SocketPath;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment