New issue
Advanced search Search tips

Issue 694496 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug


Participants' hotlists:
USB


Sign in to add a comment

Chrome_Linux: Crash Report - [Shutdown File Thread hang] base::ReadFileToStringWithMaxSize

Project Member Reported by kkaluri@chromium.org, Feb 21 2017

Issue description

Product name: Chrome_Linux
Magic Signature: [Shutdown File Thread hang] base::ReadFileToStringWithMaxSize

Current link:
https://crash.corp.google.com/browse?q=product.name%3D'Chrome_Linux'%20AND%20product.version%3D'58.0.3013.3'%20AND%20custom_data.ChromeCrashProto.ptype%3D'browser'%20AND%20custom_data.ChromeCrashProto.magic_signature_1.name%3D'%5BShutdown%20File%20Thread%20hang%5D%20base%3A%3AReadFileToStringWithMaxSize'%20AND%20ReportID%3D'2c1306d300000000'&ignore_case=false&enable_rewrite=true&omit_field_name=&omit_field_value=&omit_field_opt=%3D#3


Search properties:
product.name: Chrome_Linux
product.version: 58.0.3013.3
custom_data.chromecrashproto.ptype: browser
custom_data.chromecrashproto.magic_signature_1.name: [Shutdown File Thread hang] base::ReadFileToStringWithMaxSize
reportid: 2c1306d300000000

Metadata :
Product Name: Chrome_Linux
Product Version: 58.0.3013.3
Report ID: 2c1306d300000000
Report Time: Mon, 20 Feb 2017 05:08:15 GMT
Uptime: 7617533 ms
Cumulative Uptime: 0 ms
User Email: 
OS Name: Linux
OS Version: 0.0.0 Linux 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64
CPU Architecture: amd64
CPU Info: family 21 model 2 stepping 0

Stack Trace:
===========================

Thread 14 MAGIC SIGNATURE THREAD
Stack Quality88%Show frame trust levels
0x00007fbeea1346cd	(libc-2.19.so + 0x000eb6cd )	
0x00007fbeea0c22b8	(libc-2.19.so -fileops.c:1438 )	_IO_file_xsgetn
0x00007fbeea0b786e	(libc-2.19.so -iofread.c:42 )	_IO_fread
0x00005619a84ba42d	(chrome -./out/Release/../../base/files/file_util.cc:147 )	base::ReadFileToStringWithMaxSize(base::FilePath const&, std::string*, unsigned long)
0x00005619a96d357e	(chrome -./out/Release/../../device/usb/usb_service_linux.cc:135 )	device::UsbServiceLinux::FileThreadHelper::OnDeviceAdded(udev_device*)
0x00005619a96e159a	(chrome -./out/Release/../../base/callback.h:85 )	device::DeviceMonitorLinux::Enumerate(base::Callback<void (udev_device*), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&)
0x00005619a96d513a	(chrome -./out/Release/../../device/usb/usb_service_linux.cc:111 )	device::UsbServiceLinux::FileThreadHelper::Start()
0x00005619a8530428	(chrome -./out/Release/../../base/callback.h:68 )	base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*)
0x00005619a84c6e8f	(chrome -./out/Release/../../base/message_loop/message_loop.cc:423 )	base::MessageLoop::RunTask(base::PendingTask*)
0x00005619a84c6967	(chrome -./out/Release/../../base/message_loop/message_loop.cc:434 )	base::MessageLoop::DoWork()
0x00005619a84c8bd4	(chrome -./out/Release/../../base/message_loop/message_pump_libevent.cc:218 )	base::MessagePumpLibevent::Run(base::MessagePump::Delegate*)
0x00005619a84e54af	(chrome -./out/Release/../../base/run_loop.cc:37 )	base::RunLoop::Run()
0x00005619a72309bd	(chrome -./out/Release/../../content/browser/browser_thread_impl.cc:251 )	content::BrowserThreadImpl::FileThreadRun(base::RunLoop*)
0x00005619a723064b	(chrome -./out/Release/../../content/browser/browser_thread_impl.cc:304 )	content::BrowserThreadImpl::Run(base::RunLoop*)
0x00005619a8505fbe	(chrome -./out/Release/../../base/threading/thread.cc:333 )	base::Thread::ThreadMain()
0x00005619a8502033	(chrome -./out/Release/../../base/threading/platform_thread_posix.cc:71 )	base::(anonymous namespace)::ThreadFunc(void*)
0x00007fbef06a1183	(libpthread-2.19.so + 0x00008183 )	

This crash is first started from 56.0.2924.28 and observed the spike in latest dev 58.0.3013.3 so far seeing 4 instances from 2 clients.

Link to the list of builds
---------------------------

https://crash.corp.google.com/browse?q=product.name%3D%27Chrome_Linux%27%20AND%20custom_data.ChromeCrashProto.ptype%3D%27browser%27%20AND%20custom_data.ChromeCrashProto.magic_signature_1.name%3D%27%5BShutdown%20File%20Thread%20hang%5D%20base%3A%3AReadFileToStringWithMaxSize%27&ignore_case=false&enable_rewrite=true&omit_field_name=&omit_field_value=&omit_field_opt=%3D

Change log 
-------------
https://chromium.googlesource.com/chromium/src/+log/58.0.2988.0..58.0.3013.0?pretty=fuller&n=10000

Review-Url: https://codereview.chromium.org/2688303002

reillyg@,could you please look into this issue if it is related to your change, else please route this to an appropriate dev person.

Thank You...




 
Project Member

Comment 1 by sheriffbot@chromium.org, Feb 21 2017

Labels: FoundIn-M-58 Fracas
Users experienced this crash on the following builds:

Linux Dev 58.0.3013.3 -  0.97 CPM, 3 reports, 1 clients (signature [Shutdown File Thread hang] base::ReadFileToStringWithMaxSize)

If this update was incorrect, please add "Fracas-Wrong" label to prevent future updates.

- Go/Fracas
Components: -Platform>Apps>API IO>USB
It's not likely related to that particular change but it is interesting. The file being read is in sysfs and should contain data cached by the kernel so it is strange that it is causing a hang. I will have to look at the distribution of systems that this occurs on to see if there is a pattern.
Project Member

Comment 3 by sheriffbot@chromium.org, Apr 1 2017

Labels: FoundIn-M-59
Users experienced this crash on the following builds:

Linux Dev 59.0.3053.3 -  0.51 CPM, 1 reports, 1 clients (signature [Shutdown File Thread hang] base::ReadFileToStringWithMaxSize)

If this update was incorrect, please add "Fracas-Wrong" label to prevent future updates.

- Go/Fracas

Comment 4 by scheib@chromium.org, Apr 26 2017

Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, May 1 2017

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

commit 221e92f4f397ace9c60dd7361c306e7f7a1c4851
Author: reillyg <reillyg@chromium.org>
Date: Mon May 01 22:26:04 2017

Use the task scheduler for blocking tasks in the USB service on Linux

This patch switches UsbServiceLinux to being initialized with a
SequencedTaskRunner that puts it on its own non-shutdown-blocking
sequence. Individual device connections are also put on their own
sequences because there is no dependency between them and the global
service.

As DeviceMonitorLinux is global and owned by the FILE thread a new
UdevWatcher class has been added which can be owned by each service
that needs to monitor udev and lives on its own sequence.

This should resolve  issue 694496  by allowing Chrome to exit even if a
faulty driver or device has locked up the USB service.

BUG= 694496 

Review-Url: https://codereview.chromium.org/2849953003
Cr-Commit-Position: refs/heads/master@{#468456}

[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/udev_linux/BUILD.gn
[add] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/udev_linux/udev_watcher.cc
[add] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/udev_linux/udev_watcher.h
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_device_android.cc
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_device_android.h
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_device_handle_android.cc
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_device_handle_android.h
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_device_handle_unittest.cc
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_device_linux.cc
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_device_linux.h
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_service.cc
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_service.h
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_service_android.cc
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_service_android.h
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_service_linux.cc
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_service_linux.h
[modify] https://crrev.com/221e92f4f397ace9c60dd7361c306e7f7a1c4851/device/usb/usb_service_unittest.cc

Labels: -Restrict-View-Google
Status: Fixed (was: Started)
Removing Restrict-View-Google because a shutdown hang isn't security sensitive.
Issue 733966 has been merged into this issue.

Sign in to add a comment