Skip to content

Increasing the limit of maximum open files causes a crash #21061

Description

Type: Bug

  1. Raise the OS max open files limit per process from 1024 to 4096.
ulimit -n 4096
  1. Start vscode
code
  1. Open any Python file in the editor. Even an empty file will do.
    After several seconds vscode crashes with
The window terminated unexpectedly (reason: 'crashed', code: '133').

Sometimes instead of a crash it freezes.

Note that with a limit of 8192 open files I did not observe the crash.

Extension version: 2023.6.0
VS Code version: Code 1.77.3 (704ed70d4fd1c6bd6342c436f1ede30d1cff4710, 2023-04-12T09:16:52.732Z)
OS version: Linux x64 5.15.0-69-generic
Modes:
Sandboxed: No

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz (16 x 2500)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 1, 2, 1
Memory (System) 31.11GB (21.80GB free)
Process Argv --crash-reporter-id aee7e0be-4af2-4aea-a5ac-a548492d0a10
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vscaac:30438847
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30610678
nodejswelcome1cf:30587006
2e4cg342:30602488
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
vsccsb:30705552
azdwalk:30687957
pythonms35:30701012
pythonclientmvcf:30713944

Activity

  1. JonKsander1984 commented on Apr 15, 2023

    @JonKsander1984

    Так делать не стоит процессор может перегреться

  2. karthiknadig commented on Apr 17, 2023

    @karthiknadig
    Member

    Boian Petkantchin (@sogartar) Is this python specific or general VS Code?

  3. sogartar commented on Apr 17, 2023

    @sogartar
    Author

    Karthik Nadig (@karthiknadig) It happens only when the Python extension is enabled.

  4. karrtikr commented on Apr 17, 2023

    @karrtikr

    Please provide the logs as mentioned in the issue template. Set python.logging.level to debug in User settings, reload window, then perform the steps to reproduce before providing the logs.

    Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

    XXX
    

  5. sogartar commented on Apr 17, 2023

    @sogartar
    Author

    Kartik Raj (@karrtikr) how do I tell vscode to log to a file without buffering? I need this since the vscode app crashes before I can copy the log from within.

  6. karrtikr commented on May 9, 2023

    @karrtikr

    Karthik Nadig (@karthiknadig) Do we currently have a way to capture logs in a file in that manner, perhaps an environment variable?

    Boian Petkantchin (@sogartar) Does the workspace folder you're working on contain a huge number of files? Perhaps you can use the following setting to exclude such directories:
    image

  7. added and removed
    info-neededIssue requires more information from poster
    on May 9, 2023
  8. 12 remaining items

  9. sogartar commented on Jul 25, 2023

    @sogartar
    Author

    Based on logs it seems you have opened several workspace folders at the same time, is that accurate?

    Yes.

  10. eleanorjboyd commented on Jul 31, 2023

    @eleanorjboyd
    Member

    Kartik Raj (@karrtikr) and Karthik Nadig (@karthiknadig), it makes sense to change the file watcher to restrict test searching in too many places. Do we have normal set of file structures we ignore such as the image below? Want to make sure I choose ones we are confident do not apply. Thanks

    Perhaps you can use the following setting to exclude such directories: image

  11. eleanorjboyd commented on Aug 2, 2023

    @eleanorjboyd
    Member

    This change will be out on vscode insiders tomorrow if you want to give it a chance and see if it improves your experience! Thanks

  12. locked as resolved and limited conversation to collaborators on Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-editor-*User-facing catch-allarea-testingbugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions