TabNine icon indicating copy to clipboard operation
TabNine copied to clipboard

[Bug] TabNine keeps creating sub-process.

Open MurrayC7 opened this issue 4 years ago • 13 comments
trafficstars

please complete the following information:

  • OS version: CentOS 7
  • Editor: VSCode Remote Server
  • Editor version: 1.58.2
  • Programming language: Python
  • TabNine extension version: 3.4.17
  • Engine version (could be located within Tabnine Hub): Not sure

Issue Details:

  • After updating to latest version, TabNine keeps creating sub-process, namely .vscode-server/data/User/globalStorage/tabnine.tabnine-vscode/binaries/3.5.27/x86_64-unknown-linux-musl/TabNine, leading to thousands of processes reach the large ulimit of system anyhow. Then the kernel can not create any other new process.
  • By checking the log file, I found the periodic messages that probably indicates initializing new process as
INFO [watchdog_api::wd_client] [2021-07-26T16:40:41.119555437+08:00][INFO][21830 main][watchdog_api::wd_client][Some("shared/wd_api/src/wd_client.rs")][Some(216)] Starting watchdog...

In the following, ERROR messages as:

ERROR [lunar_local::private_model] [2021-07-26T16:40:41.265970952+08:00][ERROR][21884 private model manager][lunar_local::private_model][Some("deep/lunar_local/src/private_model/mod.rs")][Some(222)] Failed to remove private models from cache: No such file or directory (os error 2)
ERROR [panic_handling] [2021-07-26T16:40:41.267779040+08:00][ERROR][21884 main][panic_handling][Some("tabnine/panic_handling/src/lib.rs")][Some(24)] PanicInfo { payload: Any { .. }, message: Some(assertion failed: res.eax == 0), location: Location { file: "/cargo/registry/src/github.com-1ecc6299db9ec823/raw-cpuid-9.0.0/src/lib.rs", line: 271, col: 13 } },    0: <unknown>                                                    
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>

Thank you for your help.

gz#4268

MurrayC7 avatar Jul 26 '21 09:07 MurrayC7

Engine version could be located in Tabnine Hub (accessible by clicking on Tabnine icon in the status bar): image


Does the issue resolve if you restart your computer (or kill all Tabnine processes)?

boaz-codota avatar Jul 26 '21 09:07 boaz-codota

@boaz-codota Thanks for the instruction and I have found the status bar. For one thing that I used vscode remote server attached to my remote docker container.

  • It is weird that there is no response when clicking on the tabnine icon in the container. image

  • Whereas, I managed to see the information from my local environment. image image


Nope, I have tried to init new containers (i.e., similar to restart the kernel) but the problem still occurs.

MurrayC7 avatar Jul 26 '21 13:07 MurrayC7

Hi @MurrayC7 Seems like a bug on our side, thanks for reaching out! We will fix it and will let you know asap

yonip23 avatar Jul 28 '21 07:07 yonip23

Hi, this zip file contains a new bundle of Tabnine that's not published yet, and we think it should solve your issue: binaries_Linux_Build_3.5.33_artifacts.zip

So please do the following:

  • Close all VSCode instances
  • killall TabNine TabNine-deep-local TabNine-deep-cloud WD-TabNine
  • Replace the folder x86_64-unknown-linux-muslwith the folder from the zip
  • Make sure all binaries are executable (-rwxr-xr-x permissions)
  • Restart VSCode

And let us know if it solves you issue. Thanks!

yonip23 avatar Jul 28 '21 09:07 yonip23

Hi, @yonip23 @boaz-codota Thank you guys for the quick responses. Unfortunately, I have tried several times following the instructions strictly, but this problem still exists, and the log also recorded those ERRORs with <unkwown> lines. :(

MurrayC7 avatar Jul 29 '21 06:07 MurrayC7

Hi, Are you still seeing this log?

[ERROR][21884 main][panic_handling][Some("tabnine/panic_handling/src/lib.rs")][Some(24)] PanicInfo { payload: Any { .. }, message: Some(assertion failed: res.eax == 0), location: Location { file: "/cargo/registry/src/github.com-1ecc6299db9ec823/raw-cpuid-9.0.0/src/lib.rs", line: 271, col: 13 } }

yonip23 avatar Jul 29 '21 07:07 yonip23

Can you show me your Engine Version after you've done the steps?

yonip23 avatar Jul 29 '21 09:07 yonip23

@MurrayC7 I edited the previous message - I replaced the zip file with a new one: binaries_Linux_Build_3.5.33_artifacts.zip

The previous one is ok, but I would appreciate it if you could repeat the same steps with the new zip. The Engine Version should be 3.5.33. Please try it out and lmk!

yonip23 avatar Jul 29 '21 10:07 yonip23

@yonip23 Yes, I still seeing the log. Still, the replaced version failed. I attach the whole log file of a new trial tabnine.log. Hope this will help. Thank you.

MurrayC7 avatar Jul 29 '21 11:07 MurrayC7

The logs were indeed very helpful! We have a mechanism that forces you to use the version that's currently in GA (Global Availability) - which is 3.5.31, and the zip file I sent you is version 3.5.33. Fortunately, 3.5.33 is available in beta currently, so if you'll become a beta user of Tabnine you should get the correct version, which is 3.5.33.

So here's how to do it:

  • In the Hub, check this checkbox image
  • Close your IDE & killall TabNine TabNine-deep-local TabNine-deep-cloud WD-TabNine
  • Restart your IDE
  • To verify: Go to the Hub and see that Engine Version says 3.5.33-XXX

lmk if it solves your issue 😄

yonip23 avatar Jul 29 '21 12:07 yonip23

Again, it failed. And I find that no matter I do the steps as you suggested, or rebuild the remote envrionment, or even reinstall TabNine, it always creates the engine version of 3.5.31 and starts to report the same errors.

Also, the Hub only works locally (I will check this in issue426) while I can just check the remote Hub configs at /root/.config/TabNine/tabnine_config.json tabnine_config.txt. As above sayings, it will recreate this same content, always. :(

MurrayC7 avatar Jul 30 '21 08:07 MurrayC7

I see that you have "beta_enabled": "No", in the config file you attached. You can change it to "Yes" in the config file or check the checkbox in the Hub and restart your IDE (including the killall and all).

yonip23 avatar Aug 01 '21 08:08 yonip23

Update: version 3.5.33 is released to GA now. Can you please try:

  • Close all your IDEs
  • killall TabNine TabNine-deep-local TabNine-deep-cloud WD-TabNine
  • Restart your IDE

You should get version 3.5.33 after that. Once you have this version lmk if the problem still appears

Thanks!

yonip23 avatar Aug 01 '21 12:08 yonip23