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 16: Renderer Crash in Recursive Watcher (Parcel) Integration test on linux #137430

Closed
deepak1556 opened this issue Nov 18, 2021 · 5 comments
Assignees
Labels
electron-16-update Issues related to electron 16 update file-watcher File watcher freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues integration-test-failure linux Issues with VS Code on Linux
Milestone

Comments

@deepak1556
Copy link
Collaborator

Refs #137241

The following two suites when enabled causes the renderer process to terminate with segmentation fault

subsequent watch updates watchers (path)
subsequent watch updates watchers (excludes)

@deepak1556 deepak1556 changed the title Electron 16: Renderer Crash in Recursive Watcher (Parcel) Integration test Electron 16: Renderer Crash in Recursive Watcher (Parcel) Integration test on linux Nov 18, 2021
@deepak1556 deepak1556 added electron-16-update Issues related to electron 16 update freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues integration-test-failure linux Issues with VS Code on Linux labels Nov 18, 2021
@bpasero bpasero added this to the November 2021 milestone Nov 18, 2021
@bpasero
Copy link
Member

bpasero commented Nov 19, 2021

crashes.zip

@deepak1556
Copy link
Collaborator Author

Crash reason:  SIGSEGV /0x00000080
Crash address: 0x0
Process uptime: 4 seconds

Thread 0 (crashed)
 0  code-oss!napi_is_exception_pending [v8-persistent-handle.h : 116 + 0x0]
    rax = 0x0000000000000001   rdx = 0x00001d5801594000
    rcx = 0x0000000000000080   rbx = 0x00007ffced01ba88
    rsi = 0x00007ffced01baa0   rdi = 0xdeadbeefdeadbeef
    rbp = 0x00007ffced01ba00   rsp = 0x00007ffced01ba00
     r8 = 0x00001546080023b5    r9 = 0x00001d5801401c80
    r10 = 0x0000557768caab68   r11 = 0x0000000000000064
    r12 = 0x00001d5800387a80   r13 = 0x00007ffced01baa0
    r14 = 0x00001d58003a4160   r15 = 0x00001d58001c0028
    rip = 0x0000557768393fc3
    Found by: given as instruction pointer in context
 1  watcher.node!Watcher::fireCallbacks(uv_async_s*) + 0x3f8
    rbx = 0x00007ffced01ba88   rbp = 0x00007ffced01bb70
    rsp = 0x00007ffced01ba10   r12 = 0x00001d5800387a80
    r13 = 0x00007ffced01baa0   r14 = 0x00001d58003a4160
    r15 = 0x00001d58001c0028   rip = 0x00007f65643dca48
    Found by: call frame info
 2  code-oss!uv__async_io [async.c : 163 + 0x5]
    rbx = 0x0000000000000000   rbp = 0x00007ffced01bfc0
    rsp = 0x00007ffced01bb80   r12 = 0x00001d5801b7e068
    r13 = 0x00001d5801b7e000   r14 = 0x0000557768c52310
    r15 = 0x0000557768c524c8   rip = 0x00005577620054a0
    Found by: call frame info
 3  code-oss!uv__io_poll [epoll.c : 374 + 0xa]
    rbx = 0x0000000000000001   rbp = 0x00007ffced01f0d0
    rsp = 0x00007ffced01bfd0   r12 = 0x0000000000000001
    r13 = 0x0000557768c524e0   r14 = 0x0000557768c52310
    r15 = 0x00007ffced01bfd0   rip = 0x0000557762013ce6
    Found by: call frame info
 4  code-oss!uv_run [core.c : 389 + 0x8]
    rbx = 0x00007ffced01f000   rbp = 0x00007ffced01f140
    rsp = 0x00007ffced01f0e0   r12 = 0x000055776117d9e0
    r13 = 0x0000557768c52360   r14 = 0x0000557768c52301
    r15 = 0x0000557768c52310   rip = 0x0000557762005871
    Found by: call frame info
 5  code-oss!electron::NodeBindings::UvRunOnce() [node_bindings.cc : 631 + 0xa]
    rbx = 0x00001d580005c800   rbp = 0x00007ffced01f1d0
    rsp = 0x00007ffced01f150   r12 = 0x0000000000000000
    r13 = 0x00001d580083dc00   r14 = 0x00001d580014bde0
    r15 = 0x0000000000000001   rip = 0x000055776214c073
    Found by: call frame info
 6  code-oss!base::TaskAnnotator::RunTask(char const*, base::PendingTask*) [callback.h : 142 + 0x3]
    rbx = 0x00007ffced01f260   rbp = 0x00007ffced01f2c0
    rsp = 0x00007ffced01f1e0   r12 = 0x0000000000000000
    r13 = 0xaaaaaaaaaaaaaaaa   r14 = 0x0000000000000000
    r15 = 0x00007ffced01f200   rip = 0x0000557764bfff45
    Found by: call frame info
 7  code-oss!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow*) [thread_controller_with_message_pump_impl.cc : 357 + 0xf]
    rbx = 0x0000557768ca99f0   rbp = 0x00007ffced01f5c0
    rsp = 0x00007ffced01f2d0   r12 = 0x0000000000000000
    r13 = 0x0000557760f450d0   r14 = 0x00001d58000e41c0
    r15 = 0x00001d5800398000   rip = 0x0000557764c15f56
    Found by: call frame info
 8  code-oss!non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() [thread_controller_with_message_pump_impl.cc : 260 + 0xb]
    rbx = 0x00001d58000e41c8   rbp = 0x00007ffced01f610
    rsp = 0x00007ffced01f5d0   r12 = 0x00001d58000e42c8
    r13 = 0x00007ffced01f5d0   r14 = 0x00001d58000e41c0
    r15 = 0x00007ffced01f630   rip = 0x0000557764c170ef
    Found by: call frame info
 9  code-oss!base::MessagePumpDefault::Run(base::MessagePump::Delegate*) [message_pump_default.cc : 38 + 0xb]
    rbx = 0x00001d58000e41c8   rbp = 0x00007ffced01f680
    rsp = 0x00007ffced01f620   r12 = 0xaaaaaaaaaaaaaaaa
    r13 = 0x00001d5800114ae8   r14 = 0x00001d5800114af0
    r15 = 0x00007ffced01f630   rip = 0x0000557764bca45e
    Found by: call frame info
10  code-oss!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) [thread_controller_with_message_pump_impl.cc : 462 + 0x6]
    rbx = 0x00001d58000e41c0   rbp = 0x00007ffced01f6c0
    rsp = 0x00007ffced01f690   r12 = 0x00001d58000e4288
    r13 = 0x7fffffffffffffff   r14 = 0x0000000000000001
    r15 = 0x00001d58000e4268   rip = 0x0000557764c17554
    Found by: call frame info
11  code-oss!base::RunLoop::Run(base::Location const&) [run_loop.cc : 140 + 0x12]
    rbx = 0x00007ffced01f738   rbp = 0x00007ffced01f770
    rsp = 0x00007ffced01f6d0   r12 = 0x00007ffced01f7a0
    r13 = 0x00007ffced01f790   r14 = 0x00007ffced01f800
    r15 = 0x00007ffced01f7a0   rip = 0x0000557764be8bb2
    Found by: call frame info
12  code-oss!content::RendererMain(content::MainFunctionParams const&) [renderer_main.cc : 265 + 0x8]
    rbx = 0x00007ffced01f7a0   rbp = 0x00007ffced01f870
    rsp = 0x00007ffced01f780   r12 = 0x00001d580008f580
    r13 = 0x00007ffced01f790   r14 = 0x0000557768c016b0
    r15 = 0x00007ffced01f7a0   rip = 0x000055776817ae3b
    Found by: call frame info
13  code-oss!content::ContentMainRunnerImpl::Run(bool) [content_main_runner_impl.cc : 982 + 0x5]
    rbx = 0x00007ffced01f8b0   rbp = 0x00007ffced01f930
    rsp = 0x00007ffced01f880   r12 = 0x00001d580006d8c0
    r13 = 0x00007ffced01f8e0   r14 = 0xaaaaaaaaaaaaaaaa
    r15 = 0x00001d580006a380   rip = 0x0000557762fe2823
    Found by: call frame info
14  code-oss!content::RunContentProcess(content::ContentMainParams const&, content::ContentMainRunner*) [content_main.cc : 394 + 0x8]
    rbx = 0x00007ffced01fa70   rbp = 0x00007ffced01fb20
    rsp = 0x00007ffced01f940   r12 = 0x00005577615698e0
    r13 = 0x00007ffced01fbf0   r14 = 0x00001d580006d8c0
    r15 = 0x0000000000000000   rip = 0x0000557762fe014f
    Found by: call frame info
15  code-oss!content::ContentMain(content::ContentMainParams const&) [content_main.cc : 422 + 0xb]
    rbx = 0x00007ffced01fbf0   rbp = 0x00007ffced01fb50
    rsp = 0x00007ffced01fb30   r12 = 0x00005577615698e0
    r13 = 0xaaaaaaaaaaaaaaaa   r14 = 0x00007ffced01fbf0
    r15 = 0x00007ffced01fb30   rip = 0x0000557762fe0b39
    Found by: call frame info
16  code-oss!main [electron_main.cc : 317 + 0x8]
    rbx = 0x00007ffced01fbf0   rbp = 0x00007ffced01fc50
    rsp = 0x00007ffced01fb60   r12 = 0x00005577615698e0
    r13 = 0xaaaaaaaaaaaaaaaa   r14 = 0x00001d580006a380
    r15 = 0x00007ffced01fb60   rip = 0x000055776201657c
    Found by: call frame info
17  libc.so.6!__libc_start_main [libc-start.c : 308 + 0x1a]
    rbx = 0x0000000000000000   rbp = 0x0000557761fd3cf0
    rsp = 0x00007ffced01fc60   r12 = 0x0000557761cabf00
    r13 = 0x00007ffced01fd30   r14 = 0x0000000000000000
    r15 = 0x0000000000000000   rip = 0x00007f656f3181e3
    Found by: call frame info
18  code-oss!_start + 0x2a
    rbx = 0x0000000000000000   rbp = 0x0000000000000000
    rsp = 0x00007ffced01fd20   r12 = 0x0000557761cabf00
    r13 = 0x00007ffced01fd30   r14 = 0x0000000000000000
    r15 = 0x0000000000000000   rip = 0x0000557761cabf2a
    Found by: call frame info
19  0x7ffced01fd28
    rbx = 0x0000000000000000   rbp = 0x0000000000000000
    rsp = 0x00007ffced01fd28   r12 = 0x0000557761cabf00
    r13 = 0x00007ffced01fd30   r14 = 0x0000000000000000
    r15 = 0x0000000000000000   rip = 0x00007ffced01fd28
    Found by: call frame info

@bpasero
Copy link
Member

bpasero commented Nov 19, 2021

Ask from Deepak:

Can you check in the native module when you call unsubscribe does it eventually end up calling https://github.com/parcel-bundler/watcher/blob/fa1b33fbb626f1e406dd1cb174676de9025f8d5f/src/Watcher.cc#L179 which would then clear the Watcher::FireCallbacks by https://github.com/parcel-bundler/watcher/blob/fa1b33fbb626f1e406dd1cb174676de9025f8d5f/src/Watcher.cc#L190

bpasero added a commit that referenced this issue Nov 19, 2021
@bpasero
Copy link
Member

bpasero commented Nov 19, 2021

Mitigated test crash via 3a81c25

@bpasero
Copy link
Member

bpasero commented Nov 19, 2021

Verified builds on Linux are green now.

@bpasero bpasero closed this as completed Nov 19, 2021
@bpasero bpasero added the file-watcher File watcher label Nov 28, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron-16-update Issues related to electron 16 update file-watcher File watcher freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues integration-test-failure linux Issues with VS Code on Linux
Projects
Archived in project
Development

No branches or pull requests

2 participants