Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 361689 Running chrome with --single-process trips AssertIOAllowed on thread join after ChannelImpl::ClosePipeOnError
Starred by 2 users Project Member Reported by rdsmith@chromium.org, Apr 9 2014 Back to list
Status: Untriaged
Owner: ----
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment
Seen in clean build from r261961.  When I run chrome with --single-process --disable-gpu, I (sometimes) get the following crash:

#0  base::debug::(anonymous namespace)::DebugBreak ()
    at ../../base/debug/debugger_posix.cc:246
#1  0x00007ffff4f42919 in base::debug::BreakDebugger ()
    at ../../base/debug/debugger_posix.cc:259
#2  0x00007ffff4fd6adf in logging::LogMessage::~LogMessage (
    this=0x7fffce568858) at ../../base/logging.cc:658
#3  0x00007ffff50e3d1f in base::ThreadRestrictions::AssertIOAllowed ()
    at ../../base/threading/thread_restrictions.cc:38
#4  0x00007ffff50c33d7 in base::PlatformThread::Join (thread_handle=...)
    at ../../base/threading/platform_thread_posix.cc:227
#5  0x00007ffff50d7b08 in base::Thread::Stop (this=0x1d4001e510b0)
    at ../../base/threading/thread.cc:135
#6  0x00007fffea969b0f in content::InProcessUtilityThread::~InProcessUtilityThread (this=0x1d4001e510b0)
    at ../../content/utility/in_process_utility_thread.cc:21
#7  0x00007fffea969b69 in content::InProcessUtilityThread::~InProcessUtilityThread (this=0x1d4001e510b0)
    at ../../content/utility/in_process_utility_thread.cc:20
#8  0x00007fffe996d652 in base::DefaultDeleter<base::Thread>::operator() (
    this=0x1d40019cea58, ptr=0x1d4001e510b0)
    at ../../base/memory/scoped_ptr.h:137
#9  0x00007fffe9970224 in base::internal::scoped_ptr_impl<base::Thread, base::DefaultDeleter<base::Thread> >::~scoped_ptr_impl (this=0x1d40019cea58)
    at ../../base/memory/scoped_ptr.h:220
#10 0x00007fffe996a615 in scoped_ptr<base::Thread, base::DefaultDeleter<base::Thread> >::~scoped_ptr (this=0x1d40019cea58)
    at ../../base/memory/scoped_ptr.h:432
#11 0x00007fffea1c9cc6 in content::UtilityProcessHostImpl::~UtilityProcessHostImpl (this=0x1d40019ce9c0)
    at ../../content/browser/utility_process_host_impl.cc:120
#12 0x00007fffea1c9da9 in content::UtilityProcessHostImpl::~UtilityProcessHostImpl (this=0x1d40019ce9c0)
    at ../../content/browser/utility_process_host_impl.cc:116
#13 0x00007fffea1c9ddc in non-virtual thunk to content::UtilityProcessHostImpl::~UtilityProcessHostImpl() ()
    at ../../content/browser/utility_process_host_impl.cc:120
#14 0x00007fffe99561e2 in content::BrowserChildProcessHostImpl::OnChildDisconnected (this=0x1d4002895160)
    at ../../content/browser/browser_child_process_host_impl.cc:299
#15 0x00007fffe995633c in non-virtual thunk to content::BrowserChildProcessHostImpl::OnChildDisconnected() ()
    at ../../content/browser/browser_child_process_host_impl.cc:300
#16 0x00007fffea3cbed3 in content::ChildProcessHostImpl::OnChannelError (
    this=0x1d4000831160)
    at ../../content/common/child_process_host_impl.cc:292
#17 0x00007fffea3cbefc in non-virtual thunk to content::ChildProcessHostImpl::OnChannelError() () at ../../content/common/child_process_host_impl.cc:293
#18 0x00007ffff30aefec in IPC::Channel::ChannelImpl::ClosePipeOnError (
    this=0x1d4002250020) at ../../ipc/ipc_channel_posix.cc:745
#19 0x00007ffff30aee6e in IPC::Channel::ChannelImpl::OnFileCanReadWithoutBlocking (this=0x1d4002250020, fd=125) at ../../ipc/ipc_channel_posix.cc:689
#20 0x00007ffff30af022 in non-virtual thunk to IPC::Channel::ChannelImpl::OnFileCanReadWithoutBlocking(int) () at ../../ipc/ipc_channel_posix.cc:705
#21 0x00007ffff4ef79cd in base::MessagePumpLibevent::FileDescriptorWatcher::OnFileCanReadWithoutBlocking (this=0x1d4002251070, fd=125, pump=0x1d400049dec0)
    at ../../base/message_loop/message_pump_libevent.cc:99
#22 0x00007ffff4ef8c1e in base::MessagePumpLibevent::OnLibeventNotification (
    fd=125, flags=2, context=0x1d4002251070)
    at ../../base/message_loop/message_pump_libevent.cc:356
#23 0x00007ffff5129560 in event_process_active (base=0x1d40006b0520)
    at ../../third_party/libevent/event.c:385
#24 0x00007ffff5128b42 in event_base_loop (base=0x1d40006b0520, flags=1)
    at ../../third_party/libevent/event.c:525
#25 0x00007ffff4ef9051 in base::MessagePumpLibevent::Run (
    this=0x1d400049dec0, delegate=0x1d400049c220)
    at ../../base/message_loop/message_pump_libevent.cc:269
#26 0x00007ffff4ffbb77 in base::MessageLoop::RunHandler (this=0x1d400049c220)
    at ../../base/message_loop/message_loop.cc:399
#27 0x00007ffff506f472 in base::RunLoop::Run (this=0x7fffce56a5f8)
    at ../../base/run_loop.cc:49
#28 0x00007ffff4ffb3a1 in base::MessageLoop::Run (this=0x1d400049c220)
    at ../../base/message_loop/message_loop.cc:292
#29 0x00007ffff50d8169 in base::Thread::Run (this=0x1d4000679c80, 
    message_loop=0x1d400049c220) at ../../base/threading/thread.cc:172
#30 0x00007fffe99a0e98 in content::BrowserThreadImpl::IOThreadRun (
    this=0x1d4000679c80, message_loop=0x1d400049c220)
    at ../../content/browser/browser_thread_impl.cc:162
#31 0x00007fffe99a1026 in content::BrowserThreadImpl::Run (
    this=0x1d4000679c80, message_loop=0x1d400049c220)
    at ../../content/browser/browser_thread_impl.cc:188
#32 0x00007ffff50d8381 in base::Thread::ThreadMain (this=0x1d4000679c80)
    at ../../base/threading/thread.cc:225
#33 0x00007ffff50c35bf in base::(anonymous namespace)::ThreadFunc (
    params=0x7fffffffc188) at ../../base/threading/platform_thread_posix.cc:80
#34 0x00007fffe6ed9e9a in start_thread (arg=0x7fffce56b700)
    at pthread_create.c:308
#35 0x00007fffe32163fd in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#36 0x0000000000000000 in ?? ()

I'm not sure what's going on, but I think the key is in Channel::ChannelImpl::OnFileCanReadWithoutBlocking:

  } else if (fd == pipe_) {
    if (waiting_connect_ && (mode_ & MODE_SERVER_FLAG)) {
      waiting_connect_ = false;
    }
    if (!ProcessIncomingMessages()) {
      // ClosePipeOnError may delete this object, so we mustn't call
      // ProcessOutgoingMessages.
      ClosePipeOnError();
      return;
    }

I'm not sure why the ClosePipeOnError() is being called, but it leads to a thread join, which leads to an AssertIOAllowed() because thread joins can take a long time.  

 
I see UtilityProcessHost in the stack. I wonder if this is related to simulating the utility process as a thread. I know the extensions system uses the utility process for extension unpack/install -- I wonder if there's some other operation that fires up a utility process that only runs sometimes.

Comment 2 by n77...@gmail.com, Aug 18 2015
اسسس
Sign in to add a comment