withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.05k stars 63 forks source link

bug: memory leak, fig is overflowing ram & swap partition #2882

Open Grimille opened 10 months ago

Grimille commented 10 months ago

Checks

Operating system

macOS Sonoma 14.1.2

Expected behaviour

Fig is taking a huge amount of memory, filling up RAM and Swap Partition to maximum and causing macOS instability.

Actual behaviour

Capture d’écran 2024-01-20 à 22 21 00 Capture d’écran 2024-01-20 à 22 22 26 Capture d’écran 2024-01-20 à 22 24 53

Steps to reproduce

It was the first time it happened.

I didn't turn off my Mac Studio for 3 days. I didn't replicate the issue yet.

Environment

fig-details:
  - 2.17.0
hardware-info:
  - model:
  - model-id:
  - chip-id: Apple M1 Ultra
  - cores: 20
  - mem: 64.00 GB
os-info:
  - macOS 14.1.2 (23B92)
environment:
  - shell: /bin/zsh
  - terminal: iterm
  - cwd: /Users/mickael
  - exe-path: /Users/mickael/.fig/bin/fig
  - install-method: unknown
  - env-vars:
    - FIGTERM_SESSION_ID: a189c0c3-f126-40a6-8957-405deb0dcd1c
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.17.0
    - PATH: /Users/mickael/.bun/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/mickael/.fig/bin:/Users/mickael/.local/bin
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: com.googlecode.iterm2
    - FIG_PID: 71065
    - FIG_SET_PARENT: a189c0c3-f126-40a6-8957-405deb0dcd1c
joshfedo commented 9 months ago

I can confirm i have the same issue.

softwaredeveloptam commented 9 months ago

I can confirm I'm having the same issue as well on my Mac Mini M1

mschrage commented 9 months ago

Hi @softwaredeveloptam @joshfedo @Grimille! Thanks for reporting. The team is investigating why this memory leak is limited to Fig and doesn't impact CodeWhisperer.

If you only use autocomplete (and not Scripts, Dotfiles, Servers), try using Amazon CodeWhisperer for CLI. You'll get effectively the same autocomplete experience, minus these performance issues.

dammy001 commented 9 months ago

@mschrage i have the same experience with scripts and Dotfiles so it's not just autocomplete.

funkadelic commented 8 months ago

same memory issue here. using fig 2.17.1 and got an OS X alert saying my system is out of memory. I killed iterm and then noticed that the fig process is trying to use 35GB of RAM (OS X Sonoma 14.3.1 on a M1 13" MBP).

This has been going on for some time...if I forget to check on the fig process it and/or restart it, it'll memory leak into oblivion

SCR-20240229-fj3

heitorlisboa commented 8 months ago

Also having the same issue. I'm using Fig 2.17.1 on a MacBook Air M1 with 8 GB of RAM and running macOS Sonoma 14.3.1

Fig memory leak
castroalves commented 7 months ago

Same issue here! Running on MacOS Ventura 13, M2, 16GB of RAM

Screenshot 2024-04-12 at 18 36 46