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

SIGTRAP on reloading window #79639

Closed
sguillia opened this issue Aug 22, 2019 · 28 comments
Closed

SIGTRAP on reloading window #79639

sguillia opened this issue Aug 22, 2019 · 28 comments
Assignees
Labels
electron Issues and items related to Electron freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@sguillia
Copy link

I am developing an extension for VS Code, so I work with Typescript and the integrated debugger.

I restarted the debugging session (workbench.action.debug.restart, Ctrl + Shift + F5), when the whole editor and the guest suddenly crashed.

Last line of dmesg in a terminal:

[12917.255906] traps: code-insiders[20724] trap invalid opcode ip:563e5fa8160e sp:7ffe542f6a90 error:0 in code-insiders (deleted)[563e5e038000+4c02000]

I had my extensions enabled.

I will add more info whenever it reproduces.

I guess we can't find the guilty line from the instruction pointer!

VS Code version: Code - Insiders 1.38.0-insider (ada79d7, 2019-08-21T13:25:25.587Z)
OS version: Linux x64 4.15.0-58-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 3900)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 0, 0
Memory (System) 15.51GB (8.55GB free)
Process Argv --unity-launch
Screen Reader no
VM 0%
@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Aug 22, 2019
@sguillia
Copy link
Author

Now I can reproduce on a Linux machine that has apt

  1. Downgrade VS Code
    sudo apt install code-insiders:amd64=1.38.0-1566394450

  2. Open code-insiders or run it in gdb
    gdb /usr/share/code-insiders/code-insiders
    run

  3. Upgrade VS Code
    sudo apt install -y code-insiders:amd64=1.38.0-1566813268

  4. Run command "Developer: Reload Window" or reload existing debugging session

GDB log

Thread 1 "code-insiders" received signal SIGTRAP, Trace/breakpoint trap.
0x0000555558d7660e in ?? ()
(gdb) display/i $pc
1: x/i $pc
=> 0x555558d7660e:	ud2

@weinand
Copy link
Contributor

weinand commented Aug 26, 2019

@sguillia I do not understand how the 4 steps from above are related to extension debugging?
In step 2 you are using "gdb" to debug VS Code itself (and I'm not aware that this is supported at all).

@weinand weinand added info-needed Issue requires more information from poster and removed debug Debug viewlet, configurations, breakpoints, adapter issues labels Aug 26, 2019
@weinand weinand removed their assignment Aug 26, 2019
@sguillia
Copy link
Author

sguillia commented Aug 26, 2019

@weinand I apologize, I never said that this was related to extension debugging.

The crash can happen when reloading the window, or restarting the debug session, which is the only link with extension debugging.

When opening the issue, I didn't knew what caused the problem. I mentioned it to make it easier to reproduce on your side.

I launched GDB to show that VS Code received a signal because of a trap in your code.

GDB is optional, you can just try to reproduce, and VS Code will crash with no error message other than the one in dmesg.

@weinand
Copy link
Contributor

weinand commented Aug 30, 2019

@sguillia does the problem reproduce if you disable all extensions?

@sguillia
Copy link
Author

@weinand yes

@weinand weinand changed the title trap invalid opcode SIGTRAP on reloading window Sep 3, 2019
@weinand weinand removed the info-needed Issue requires more information from poster label Sep 3, 2019
@bpasero
Copy link
Member

bpasero commented Sep 3, 2019

We are building exploration builds that use a much newer version of our UI framework (Electron version 6.0.x). I wonder if this issue reproduces with one of these builds, could you try? Download:

@bpasero bpasero added the info-needed Issue requires more information from poster label Sep 3, 2019
@sguillia
Copy link
Author

sguillia commented Sep 3, 2019

@bpasero Sure but I need to have two versions of your exploration builds to try reproduce

@sguillia
Copy link
Author

sguillia commented Sep 3, 2019

Yes it still reproduces, sorry

$ code-exploration --version
1.37.0-exploration
960208fdf9aa06e6892aa14c9c84ddd607fbeb2f
x64

$ code-exploration

$ sudo dpkg -i code-exploration_1.38.0-1567147127_amd64.deb

$ code-exploration --version
1.38.0-exploration
6d1e7d3efea60198cf65d06cc519b622a46e33ba
x64

$ # Reload window

Crashes with SIGTRAP:

$ sudo dmesg
...
[217135.857019] traps: code-exploratio[28294] trap invalid opcode ip:558554274dec sp:7fffb71b4910 error:0 in code-exploration (deleted)[558552404000+531d000]

I guess that this issue will affect few users. It happened to me because Insiders updates are very frequent, and I always had VS Code open when running sudo apt upgrade. Then sometimes I launch a debug session or I reload the window.

@bpasero bpasero added electron Issues and items related to Electron upstream Issue identified as 'upstream' component related (exists outside of VS Code) freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues and removed info-needed Issue requires more information from poster labels Sep 3, 2019
@sguillia
Copy link
Author

sguillia commented Sep 3, 2019

@annoying258

disable all extensions?

Yes

Didn't knew there were built-in extension, nor that they aren't disabled by "Disable all extensions".

Still reproduces with all extensions and built-in extensions disabled.

I wish there were a "Disable all built-ins" button, this would have saved me 72 manual disabling (ping #52639).


using "gdb" to debug VS Code itself

SIGTRAP is generated when reloading window
SIGTRAP is also generated when restarting a debug session
There is no difference, VS Code crashes the same way
The SIGTRAP is emitted by the ud2 instruction


Can you reproduce on your side?

@bpasero bpasero added the confirmed Issue has been confirmed by VS Code Team member label Oct 9, 2019
@bpasero
Copy link
Member

bpasero commented Oct 15, 2019

@sguillia to clarify you can now reproduce the crash simply by reloading the window using Exploration builds and Insiders?

@bpasero bpasero added info-needed Issue requires more information from poster and removed confirmed Issue has been confirmed by VS Code Team member labels Oct 15, 2019
@sguillia
Copy link
Author

@bpasero Reproduces from

$ code-insiders --version
1.39.0-insider
9f6a745027fc7b2a12495970f64625e24f410224
x64

I need the link to two exploration builds to reproduce

@bpasero
Copy link
Member

bpasero commented Oct 15, 2019

@sguillia and latest insiders (which is 1.40 and also has an Electron update - same as exploration)?

@sguillia
Copy link
Author

@bpasero Also reproduces when downgrading from this one:

$ code-insiders --version
1.40.0-insider
3f6ed25939b8ef157a7a41e0dc43b517898d4005
x64

To 1.38.0-insider.

@bpasero
Copy link
Member

bpasero commented Oct 15, 2019

@sguillia does it reproduce when you do this:

  • open command line
  • run code-insiders --user-data-dir <some dir on disk>
  • Reload Window

@sguillia
Copy link
Author

The VS Code instance I am reloading have to be open before I do apt install code-insiders. It will not reproduce with these steps.

I will try the following tomorrow:

  • open command line
  • run code-insiders --user-data-dir <some dir on disk>
  • run apt install code-insiders
  • Reload window

@bpasero
Copy link
Member

bpasero commented Oct 16, 2019

Thanks

@sguillia
Copy link
Author

@bpasero It still crashes from 1.40.0-insider with a custom empty user-data-dir

@bpasero
Copy link
Member

bpasero commented Oct 16, 2019

Can you please follow the steps in https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues to get at more details around the crash and attach the result here? Thanks!

@vscodebot vscodebot bot closed this as completed Oct 23, 2019
@vscodebot
Copy link

vscodebot bot commented Oct 23, 2019

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@sguillia
Copy link
Author

Well this still reproduces but I have no time for this until next week

I hope you can re-open when I'll add more info here @bpasero

Please don't lock

@bpasero bpasero reopened this Oct 24, 2019
@bpasero
Copy link
Member

bpasero commented Oct 24, 2019

Can you please follow the steps in https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues to get at more details around the crash and attach the result here? Thanks!

@sguillia
Copy link
Author

You will be disappointed by the backtrace.

(gdb) bt
#0  0x0000556c6891bed1 in ?? ()
#1  0x0000000000000000 in ?? ()
Fulll GDB log
$ gdb /usr/share/code-insiders/code-insiders ./core
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/share/code-insiders/code-insiders...(no debugging symbols found)...done.
[New LWP 20388]
[New LWP 20405]
[New LWP 20404]
[New LWP 20395]
[New LWP 20413]
[New LWP 20401]
[New LWP 20400]
[New LWP 20403]
[New LWP 20414]
[New LWP 20412]
[New LWP 20420]
[New LWP 20407]
[New LWP 20443]
[New LWP 20411]
[New LWP 20397]
[New LWP 20393]
[New LWP 20408]
[New LWP 20399]
[New LWP 20424]
[New LWP 20398]
[New LWP 20419]
[New LWP 20417]
[New LWP 20418]
[New LWP 20422]
[New LWP 20409]
[New LWP 20430]
[New LWP 20406]
[New LWP 20402]
[New LWP 20415]
[New LWP 20421]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/share/code-insiders/code-insiders --no-sandbox .'.
Program terminated with signal SIGILL, Illegal instruction.
#0  0x0000556c6891bed1 in ?? ()
[Current thread is 1 (Thread 0x7fa212f78b40 (LWP 20388))]
(gdb) bt
#0  0x0000556c6891bed1 in ?? ()
#1  0x0000000000000000 in ?? ()

@bpasero

@bpasero
Copy link
Member

bpasero commented Oct 24, 2019

Ok I am sorry I will not be able to help out more. Leaving to Deepak to decide.

@bpasero bpasero removed their assignment Oct 24, 2019
@vscodebot vscodebot bot closed this as completed Oct 31, 2019
@vscodebot
Copy link

vscodebot bot commented Oct 31, 2019

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@sguillia
Copy link
Author

This issue does not need more information (otherwise I can provide them)

@bpasero Can you remove the needs-more-info flag and re-open?

@bpasero bpasero reopened this Oct 31, 2019
@bpasero bpasero removed the info-needed Issue requires more information from poster label Oct 31, 2019
@taintedkernel
Copy link

I'm experiencing this problem as well on v1.63.2. I encounter it when I try to create a new window of code (File, New Window), although it only appears after code has been running for some time (eg: if I reopen it after a crash, I can open several windows without any issue).

kernel: [600032.730954] traps: code[2954934] trap invalid opcode ip:562af0719331 sp:7ffc39fe7fc0 error:0 in code (deleted)[562af036e000+5ee0000]

Version: 1.63.2
Commit: 899d46d
Date: 2021-12-15T09:39:46.686Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.11.0-41-generic

Let me know if I can provide any further info.

@deepak1556
Copy link
Collaborator

If this issue persists with latest version of VSCode, please open an issue with crash dumps following the steps at https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues#creating-and-symbolicating-local-crash-reports, thanks!

@deepak1556 deepak1556 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron Issues and items related to Electron freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

5 participants