Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on app quit at atom::AtomCTDelegate::ClearCTExcludedHostsList #10051

Closed
juturu opened this issue Jul 17, 2017 · 2 comments · Fixed by #11125
Closed

Crash on app quit at atom::AtomCTDelegate::ClearCTExcludedHostsList #10051

juturu opened this issue Jul 17, 2017 · 2 comments · Fixed by #11125

Comments

@juturu
Copy link
Contributor

juturu commented Jul 17, 2017

  • Electron version: 1.7.1
  • Operating system: Windows / Mac

Expected behavior

no crash on quit

Actual behavior

Crash on app quit

Thread 23 Crashed:: Chrome_IOThread
0   com.github.electron.framework 	0x000000010e3761f2 std::__1::__tree<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::destroy(std::__1::__tree_node<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, void*>*) + 18 (__tree:1828)
1   com.github.electron.framework 	0x000000010dac0047 std::__1::__tree<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::clear() + 23 (__tree:1831)
2   com.github.electron.framework 	0x000000010dabffed atom::AtomCTDelegate::ClearCTExcludedHostsList() + 13 (atom_ct_delegate.cc:23)
3   com.github.electron.framework 	0x000000010dabe69a atom::AtomCertVerifier::Verify(net::CertVerifier::RequestParams const&, net::CRLSet*, net::CertVerifyResult*, base::Callback<void (int), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, std::__1::unique_ptr<net::CertVerifier::Request, std::__1::default_delete<net::CertVerifier::Request> >*, net::NetLogWithSource const&) + 58 (atom_cert_verifier.cc:170)
4   com.github.electron.framework 	0x000000010f5104fa net::SSLClientSocketImpl::DoVerifyCert(int) + 586 (ssl_client_socket_impl.cc:1273)
5   com.github.electron.framework 	0x000000010f50e3a0 net::SSLClientSocketImpl::DoHandshakeLoop(int) + 160 (ssl_client_socket_impl.cc:1404)
6   com.github.electron.framework 	0x000000010f50ffd5 net::SSLClientSocketImpl::OnHandshakeIOComplete(int) + 21 (ssl_client_socket_impl.cc:1370)
7   com.github.electron.framework 	0x000000010f5192e3 net::TCPClientSocket::DidCompleteRead(base::Callback<void (int), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, int) + 115 (tcp_client_socket.cc:357)
8   com.github.electron.framework 	0x000000010f51c09f net::TCPSocketPosix::ReadCompleted(scoped_refptr<net::IOBuffer> const&, base::Callback<void (int), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, int) + 31 (tcp_socket_posix.cc:590)
9   com.github.electron.framework 	0x000000010f4d972f net::SocketPosix::ReadCompleted() + 207 (socket_posix.cc:465)
10  com.github.electron.framework 	0x000000010f4d9626 net::SocketPosix::OnFileCanReadWithoutBlocking(int) + 310 (trace_event.h:1033)
11  com.github.electron.framework 	0x000000010dc4c8b7 base::MessagePumpLibevent::OnLibeventNotification(int, short, void*) + 215 (message_pump_libevent.cc:341)
12  com.github.electron.framework 	0x000000010dcb7e85 event_base_loop + 1205 (event.c:521)
13  com.github.electron.framework 	0x000000010dc4cadf base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) + 127 (message_pump_libevent.cc:224)
14  com.github.electron.framework 	0x000000010dc498ee base::MessageLoop::RunHandler() + 94 (message_loop.cc:388)
15  com.github.electron.framework 	0x000000010dc634f3 base::RunLoop::Run() + 115 (run_loop.cc:38)
16  com.github.electron.framework 	0x000000010ded33d8 content::BrowserThreadImpl::IOThreadRun(base::RunLoop*) + 24 (browser_thread_impl.cc:278)
17  com.github.electron.framework 	0x000000010ded3566 content::BrowserThreadImpl::Run(base::RunLoop*) + 294 (browser_thread_impl.cc:312)
18  com.github.electron.framework 	0x000000010dc83c59 base::Thread::ThreadMain() + 393 (thread.cc:336)
19  com.github.electron.framework 	0x000000010dc57a87 base::(anonymous namespace)::ThreadFunc(void*) + 87 (platform_thread_posix.cc:73)
20  libsystem_pthread.dylib       	0x00007fff8344c99d _pthread_body + 131
21  libsystem_pthread.dylib       	0x00007fff8344c91a _pthread_start + 168
22  libsystem_pthread.dylib       	0x00007fff8344a351 thread_start + 13

How to reproduce

No consistent repro. May be happening after #7651

cc: @kevinsawicki @deepak1556

@juturu
Copy link
Contributor Author

juturu commented Jul 17, 2017

This looks identical to #9878 @bpasero fyi

@hansonw
Copy link

hansonw commented Aug 17, 2017

Seeing this quite consistently (maybe 5% failure rate?) in our CI jobs

facebook-github-bot pushed a commit to facebookarchive/nuclide that referenced this issue Aug 18, 2017
Summary:
Atom 1.19+ segfaults much more frequently during integration tests now.

I've discovered the root cause (electron/electron#10051), but we probably won't get a fix for a while...
This function gets called when a test exits *just as* a web request comes back - so I think this is happening when we try to make web requests in integration tests.

I think it's fine if we just stub out all fetches in tests.
It's not safe to assume that fetches are going to work on CI, anyway.

Reviewed By: matthewwithanm

Differential Revision: D5656739

fbshipit-source-id: e80d8a954bb7d6b4b928f3de29707d5232452e3d
tarruda added a commit that referenced this issue Nov 15, 2017
tarruda added a commit that referenced this issue Nov 15, 2017
tarruda added a commit that referenced this issue Nov 15, 2017
tarruda added a commit that referenced this issue Nov 16, 2017
tarruda added a commit that referenced this issue Nov 16, 2017
Move AtomCTDelegate to brightray as RequireCTDelegate and transfer ownership to
brightray::URLRequestContextGetter. This fixes the wrong lifetime assumptions
that result in AtomCTDelegate being used after free in some scenarios.

Close #10051
tarruda added a commit that referenced this issue Nov 17, 2017
Move AtomCTDelegate to brightray as RequireCTDelegate and transfer ownership to
brightray::URLRequestContextGetter. This fixes the wrong lifetime assumptions
that result in AtomCTDelegate being used after free in some scenarios.

Close #10051
tarruda added a commit that referenced this issue Nov 17, 2017
Move AtomCTDelegate to brightray as RequireCTDelegate and transfer ownership to
brightray::URLRequestContextGetter. This fixes the wrong lifetime assumptions
that result in AtomCTDelegate being used after free in some scenarios.

Close #10051
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants