jsii icon indicating copy to clipboard operation
jsii copied to clipboard

JSII Kernel fills disk space using CDK on Cloud9

Open vaneek opened this issue 6 years ago • 7 comments
trafficstars

:bug: Bug Report

Affected Languages

  • [ ] TypeScript or Javascript
  • [X] Python
  • [ ] Java
  • [ ] .NET (C#, F#, ...)

General Information

  • JSII Version: 0.14.3
  • Platform: Cloud9 Amazon Linux Linux ip-172-31-27-45 4.14.133-88.105.amzn1.x86_64 #1 SMP Thu Jul 11 00:44:15 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

What is the problem?

Every cdk execution creates a jsii-kernel-XXXXXX directory in /tmp eventually the filesystem fills up and /tmp must be manually cleaned.

eg.

drwx------ 3 ec2-user ec2-user 4096 Aug 13 11:10 jsii-kernel-pAzPv3
drwx------ 3 ec2-user ec2-user 4096 Aug 13 11:12 jsii-kernel-36wtyP
drwx------ 3 ec2-user ec2-user 4096 Aug 13 11:12 jsii-kernel-VzoqYO
drwx------ 3 ec2-user ec2-user 4096 Aug 13 11:13 jsii-kernel-TxZxZE

Verbose Log

https://gist.github.com/vaneek/1292391ce7a02fce283607c6d786b8ef

vaneek avatar Aug 13 '19 11:08 vaneek

Yeah I think we're not quite diligent enough when it comes to cleaning up temporary files behind ourselves. Thanks for reporting!

RomainMuller avatar Aug 13 '19 18:08 RomainMuller

It accumulates quite a lot of space (and not specific to Cloud9). I currently have 80 directories on my Linux Mint:

image

jeshan avatar Aug 27 '19 20:08 jeshan

We experienced a similar problem when upgrading from 1.17.1 to 1.20.0. The jsii-kernel directories cluttered our tmp directy until our pod ran out of disk-space. After the rollback to 1.17.1 it worked just fine.

jdiebold avatar Feb 12 '21 16:02 jdiebold

@jdiebold also using Python?

RomainMuller avatar Feb 24 '21 12:02 RomainMuller

This error still persists I have a 1GB of EC2 instance and I get this error whenever I am running cdk synth and I also can't seem to find the jsii-kernel files in /tmp directory so that I can manually delete them myself.

Saad-Mohsin-Khan avatar Oct 20 '21 08:10 Saad-Mohsin-Khan

I'm seeing this in go as well: github.com/aws/jsii-runtime-go v1.66.0

du -sch ./jsii-k*
262M    ./jsii-kernel-7uwjpU
58M     ./jsii-kernel-C5C15a
262M    ./jsii-kernel-I4aoXu
262M    ./jsii-kernel-IFBPyV
844M    total

mjrlee avatar Sep 02 '22 13:09 mjrlee

@MartinLeedotOrg in Go, do you start your main function with defer jsii.Close()? If not - does it help if you do?

RomainMuller avatar Sep 26 '22 14:09 RomainMuller