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

Electron crashes if it's run with the --single-process flag #11398

Closed
alexeykuzmin opened this issue Dec 11, 2017 · 5 comments
Closed

Electron crashes if it's run with the --single-process flag #11398

alexeykuzmin opened this issue Dec 11, 2017 · 5 comments

Comments

@alexeykuzmin
Copy link
Contributor

alexeykuzmin commented Dec 11, 2017

https://peter.sh/experiments/chromium-command-line-switches/#single-process
Google Chrome works fine with it.

stacktrace
[14163:1211/121259.821930:VERBOSE1:V8Initializer.cpp(78)] V8 error: Entering the V8 API without proper locking in place (HandleScope::HandleScope).  Current memory usage: 208 MB
[14163:1211/121259.821965:FATAL:V8Initializer.cpp(80)]
0   libbase.dylib                       0x000000010eb68e2e base::debug::StackTrace::StackTrace(unsigned long) + 174
1   libbase.dylib                       0x000000010eb68eed base::debug::StackTrace::StackTrace(unsigned long) + 29
2   libbase.dylib                       0x000000010eb6727c base::debug::StackTrace::StackTrace() + 28
3   libbase.dylib                       0x000000010ebf9e4f logging::LogMessage::~LogMessage() + 479
4   libbase.dylib                       0x000000010ebf77b5 logging::LogMessage::~LogMessage() + 21
5   libblink_core.dylib                 0x000000010f2b05a6 blink::V8ContextSnapshot::SetReferenceTable(long*) + 2406
6   libv8.dylib                         0x000000010dd0ab55 v8::HandleScope::Initialize(v8::Isolate*) + 149
7   libblink_core.dylib                 0x000000010f1f47b6 blink::ScriptController::EnableEval() + 54
8   libblink_core.dylib                 0x000000010f1f4efc blink::ScriptController::UpdateDocument() + 60
9   libblink_core.dylib                 0x000000010ffe8e4b blink::LocalDOMWindow::InstallNewDocument(WTF::String const&, blink::DocumentInit const&, bool) + 555
10  libblink_core.dylib                 0x0000000110c68e0e blink::DocumentLoader::InstallNewDocument(blink::KURL const&, blink::Document*, bool, WTF::AtomicString const&, WTF::AtomicString const&, blink::DocumentLoader::InstallNewDocumentReason, blink::ParserSynchronizationPolicy, blink::KURL const&) + 830
11  libblink_core.dylib                 0x0000000110c6874a blink::DocumentLoader::CommitNavigation(WTF::AtomicString const&, blink::KURL const&) + 922
12  libblink_core.dylib                 0x0000000110c66d1b blink::DocumentLoader::CommitData(char const*, unsigned long) + 123
13  libblink_core.dylib                 0x0000000110c66249 blink::DocumentLoader::FinishedLoading(double) + 185
14  libblink_core.dylib                 0x0000000110c69ccb blink::DocumentLoader::MaybeLoadEmpty() + 555
15  libblink_core.dylib                 0x0000000110c69e0c blink::DocumentLoader::StartLoading() + 252
16  libblink_core.dylib                 0x0000000110c7ea59 blink::FrameLoader::Init() + 409
17  libblink_core.dylib                 0x000000010fff3da0 blink::LocalFrame::Init() + 64
18  libblink_core.dylib                 0x000000011006592c blink::WebLocalFrameImpl::InitializeCoreFrame(blink::Page&, blink::FrameOwner*, WTF::AtomicString const&) + 204
19  libblink_core.dylib                 0x0000000110065354 blink::WebLocalFrameImpl::CreateMainFrame(blink::WebView*, blink::WebFrameClient*, blink::InterfaceRegistry*, blink::WebFrame*, blink::WebString const&, blink::WebSandboxFlags) + 404
20  libblink_core.dylib                 0x00000001100651ad blink::WebLocalFrame::CreateMainFrame(blink::WebView*, blink::WebFrameClient*, blink::InterfaceRegistry*, blink::WebFrame*, blink::WebString const&, blink::WebSandboxFlags) + 61
21  libcontent.dylib                    0x000000011bc711c2 content::RenderFrameImpl::CreateMainFrame(content::RenderViewImpl*, int, int, bool, content::ScreenInfo const&, content::CompositorDependencies*, blink::WebFrame*, content::FrameReplicationState const&) + 530
22  libcontent.dylib                    0x000000011bd6c1e1 content::RenderViewImpl::Initialize(content::mojom::CreateViewParams const&, base::RepeatingCallback<void (content::RenderWidget*, blink::WebNavigationPolicy, gfx::Rect const&)> const&) + 4705
23  libcontent.dylib                    0x000000011bd719d5 content::RenderViewImpl::Create(content::CompositorDependencies*, content::mojom::CreateViewParams const&, base::RepeatingCallback<void (content::RenderWidget*, blink::WebNavigationPolicy, gfx::Rect const&)> const&) + 341
24  libcontent.dylib                    0x000000011bd3f321 content::RenderThreadImpl::CreateView(mojo::StructPtr<content::mojom::CreateViewParams>) + 129
25  libcontent.dylib                    0x0000000118ef7a2a content::mojom::RendererStubDispatch::Accept(content::mojom::Renderer*, mojo::Message*) + 650
26  libcontent.dylib                    0x000000011bd46643 content::RenderThreadImpl::NeedsToRecordFirstActivePaint(int) const + 20403
27  libbindings.dylib                   0x000000010f0fde42 mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) + 6002
28  libbindings.dylib                   0x000000010f0fc6c1 mojo::InterfaceEndpointClient::HandleIncomingMessageThunk::Accept(mojo::Message*) + 33
29  libbindings.dylib                   0x000000010f0fa7d5 mojo::FilterChain::Accept(mojo::Message*) + 821
30  libbindings.dylib                   0x000000010f101762 mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*) + 242
31  libipc.dylib                        0x0000000118484a29 IPC::MojoBootstrap::Create(mojo::ScopedHandleBase<mojo::MessagePipeHandle>, IPC::Channel::Mode, scoped_refptr<base::SingleThreadTaskRunner> const&) + 68569
32  libipc.dylib                        0x000000011847871e IPC::MojoBootstrap::Create(mojo::ScopedHandleBase<mojo::MessagePipeHandle>, IPC::Channel::Mode, scoped_refptr<base::SingleThreadTaskRunner> const&) + 18638
33  libipc.dylib                        0x00000001184785ef IPC::MojoBootstrap::Create(mojo::ScopedHandleBase<mojo::MessagePipeHandle>, IPC::Channel::Mode, scoped_refptr<base::SingleThreadTaskRunner> const&) + 18335
34  libipc.dylib                        0x0000000118478556 IPC::MojoBootstrap::Create(mojo::ScopedHandleBase<mojo::MessagePipeHandle>, IPC::Channel::Mode, scoped_refptr<base::SingleThreadTaskRunner> const&) + 18182
35  libipc.dylib                        0x000000011847841c IPC::MojoBootstrap::Create(mojo::ScopedHandleBase<mojo::MessagePipeHandle>, IPC::Channel::Mode, scoped_refptr<base::SingleThreadTaskRunner> const&) + 17868
36  libbase.dylib                       0x000000010eb0a2bf base::BarrierClosure(int, base::OnceCallback<void ()>) + 703
37  libbase.dylib                       0x000000010eb6b53e base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 1102
38  libblink_platform.dylib             0x00000001147265a0 blink::scheduler::TaskQueueManager::ProcessTaskFromWorkQueue(blink::scheduler::internal::WorkQueue*, bool, blink::scheduler::LazyNow, base::TimeTicks*) + 2224
39  libblink_platform.dylib             0x0000000114720b35 blink::scheduler::TaskQueueManager::DoWork(bool) + 2085
40  libblink_platform.dylib             0x000000011472f3c7 blink::scheduler::TaskQueueManager::SweepCanceledDelayedTasks() + 15047
41  libblink_platform.dylib             0x000000011472f2c5 blink::scheduler::TaskQueueManager::SweepCanceledDelayedTasks() + 14789
42  libblink_platform.dylib             0x000000011472f23d blink::scheduler::TaskQueueManager::SweepCanceledDelayedTasks() + 14653
43  libblink_platform.dylib             0x000000011472f14c blink::scheduler::TaskQueueManager::SweepCanceledDelayedTasks() + 14412
44  libbase.dylib                       0x000000010eb0a2bf base::BarrierClosure(int, base::OnceCallback<void ()>) + 703
45  libbase.dylib                       0x000000010eb6b53e base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 1102
46  libbase.dylib                       0x000000010ec42a66 base::MessageLoop::RunTask(base::PendingTask*) + 710
47  libbase.dylib                       0x000000010ec42ed7 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) + 71
48  libbase.dylib                       0x000000010ec43d28 base::MessageLoop::DoWork() + 568
49  libbase.dylib                       0x000000010ec528cf base::MessagePumpCFRunLoopBase::RunWork() + 95
50  libbase.dylib                       0x000000010ec5285c base::MessagePumpCFRunLoopBase::CanInvalidateCFRunLoopTimers() + 716
51  libbase.dylib                       0x000000010ec023da base::mac::CallWithEHFrame(void () block_pointer) + 10
52  libbase.dylib                       0x000000010ec51d65 base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 101
53  CoreFoundation                      0x00007fffbb52a321 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
54  CoreFoundation                      0x00007fffbb50b21d __CFRunLoopDoSources0 + 557
55  CoreFoundation                      0x00007fffbb50a716 __CFRunLoopRun + 934
56  CoreFoundation                      0x00007fffbb50a114 CFRunLoopRunSpecific + 420
57  libbase.dylib                       0x000000010ec52ecc base::MessagePumpCFRunLoop::DoRun(base::MessagePump::Delegate*) + 76
58  libbase.dylib                       0x000000010ec5154e base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 110
59  libbase.dylib                       0x000000010ec422ab base::MessageLoop::Run() + 299
60  libbase.dylib                       0x000000010ed2ef4d base::RunLoop::Run() + 125
61  libbase.dylib                       0x000000010ee21c44 base::Thread::Run(base::RunLoop*) + 228

Trace/BPT trap: 5

/cc @zcbenz

@MarshallOfSound
Copy link
Member

This is by design and not technically possible afaik @alexeykuzmin

Node.JS itself isn't designed to have multiple instances in the same process. See #6903

We should probably just catch that flag somehow and prevent it taking effect while logging out a nice error 😄

@alexeykuzmin
Copy link
Contributor Author

alexeykuzmin commented Dec 11, 2017

This is by design and not technically possible

Ok, then the question is does it crash where it's supposed to crash or not?
Added stacktrace in the description.

We should probably just catch that flag somehow and prevent it taking effect while logging out a nice error

Makes sense 👍

@zcbenz
Copy link
Contributor

zcbenz commented Dec 18, 2017

We uses v8::Lock in the main process (to follow Node's convention), while the renderer process does not use it (to follow Chromium's convention). That's the reason of the crash.

@CapOM
Copy link
Contributor

CapOM commented Mar 6, 2019

Does the last comment mean it is fixable ?

@codebytere
Copy link
Member

Given that this has been open for years, that this isn't currently on our roadmap, and in the interest of our issue tracker more closely reflecting our workstreams, i'm going to go ahead and label this a wontfix. However, should someone determine a workable solution we would be potentially open to accepting a PR.

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

No branches or pull requests

6 participants