Terraform v0.10.8
aws_instance
aws_ebs_volume
aws_volume_attachment
general terraform issue
the aws plugin take ~16% and terraform master process take another 16%
Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log
.
Terraform should not be taking 30% of my cpu just to start a couple of instances at aws.
This seems like excessive cpu load.
if I understand correctly, terraform is a wrapper around aws api, with a bunch of sophisticated logic ontop.
my cpu is a: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
ram: 16GB
very high (37% peak) cpu load
Please list the steps required to reproduce the issue, for example:
terraform apply
very basic aws configuration, with handful of remote exec to setup puppet. booting 3 instances using count variables. One instance has an attached ebs volume.
Hi @jgrammen-agilitypr!
I agree that this CPU usage seems excessive. Unfortunately, with the information given it's hard to guess what aspect of Terraform's work here was causing all this CPU work. If you're able to share a small config that causes this problem for you, we may be able to reproduce it and understand via profiling which aspect of the AWS provider and Terraform is using the CPU here.
Providing what I can, with names changed to protect the innocent.
As far as I am concerned this is a pretty bog standard terraform setup for aws instances
variable "run_master" { default = true }
# master -- jenkins master
resource "aws_instance" "master" {
key_name = "${var.keypair}"
ami = "${var.ami_xenial}"
instance_type = "${var.server_type["master"]}"
subnet_id = "${var.subnet_production}"
private_ip = "${var.server_ip["master"]}"
vpc_security_group_ids = "${var.sg_production}"
root_block_device {
volume_type = "gp2"
volume_size = "${var.root_volsize["master"]}"
}
lifecycle {
ignore_changes = ["tags"]
}
count = "${var.master}"
user_data = "#cloud-config\nhostname: master.domain\nfqdn: master.domain"
depends_on = ["aws_instance.slave"]
tags {
type = "jenkins"
role = "master"
name = "master"
}
provisioner "remote-exec" {
inline = [
"printf '\n${var.server_ip["master"]} master.domain' | sudo tee -a /etc/hosts",
"wget --quiet -O /tmp/puppetlabs-release-pc1-$(lsb_release -sc).deb https://apt.puppetlabs.com/puppetlabs-release-pc1-$(lsb_release -sc).deb",
"sudo dpkg -i /tmp/puppetlabs-release-pc1-$(lsb_release -sc).deb",
"sudo apt-get update",
"sudo apt-get install puppet-agent -y",
"sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=stopped enable=false",
"nohup sudo /opt/puppetlabs/bin/puppet agent -t --waitforcert 180 &",
"sleep 1" # trick to get terraform to finish above command before closing ssh conn
# command || true # force command to exit and allow terraform to continue
]
connection {
type = "ssh"
user = "ubuntu"
}
}
}
resource "aws_ebs_volume" "master_data" {
availability_zone = "${var.az_production}"
# standard = magnetic , gp2 = standard ssd
type = "gp2"
size = "${var.data_volsize["master"]}"
tags {
Name = "master-data"
}
count = "1"
}
resource "aws_volume_attachment" "master_data_vole" {
# new kernerls will rename /dev/sdf to /dev/xvdf anyways
device_name = "/dev/xvdf"
volume_id = "${aws_ebs_volume.master_data.id}"
instance_id = "${aws_instance.master.id}"
provisioner "remote-exec" {
inline = [
"sudo umount -A /dev/xvdf || true",
]
when = "destroy"
connection {
type = "ssh"
host = "${aws_instance.master.private_ip}"
user = "ubuntu"
}
}
count = "1"
}
resource "aws_instance" "slave" {
key_name = "${var.keypair}"
ami = "${var.ami_xenial}"
instance_type = "${var.server_type["slave"]}"
subnet_id = "${var.subnet_production}"
private_ip = "${var.ent_ip[count.index + 1]}"
vpc_security_group_ids = "${var.sg_production}"
root_block_device {
volume_type = "gp2"
volume_size = "${var.root_volsize["slave"]}"
}
lifecycle {
ignore_changes = ["tags"]
}
count = "${var.slave_count["slave"]}"
user_data = "#cloud-config\nhostname: slave0${count.index + 1}.domain\nfqdn: slave0${count.index + 1}.domain"
tags {
type = "jenkins"
role = "slave"
sub_role = "slave"
Name = "slave0${count.index + 1}"
}
provisioner "remote-exec" {
inline = [
"wget --quiet -O /tmp/puppetlabs-release-pc1-$(lsb_release -sc).deb https://apt.puppetlabs.com/puppetlabs-release-pc1-$(lsb_release -sc).deb",
"sudo dpkg -i /tmp/puppetlabs-release-pc1-$(lsb_release -sc).deb",
"sudo apt-get update",
"sudo apt-get install puppet-agent -y",
"sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=stopped enable=false",
"nohup sudo /opt/puppetlabs/bin/puppet agent -t --waitforcert 180 &",
"sleep 1" # trick to get terraform to finish above command before closing ssh conn
# command || true # force command to exit and allow terraform to continue
]
connection {
type = "ssh"
user = "ubuntu"
}
}
}
Thanks for the additional information, @jgrammen-agilitypr.
When we get a chance we'll try to reproduce your results and, if we can, try to diagnose with a profiler.
Hello everyone.
I also have CPU load (100%, screenshot in attachment), but in my case I have not very strong CPU (i5-7200U).
I use Ubuntu subsystem on Windows 10.
I am also getting high CPU utilisation running terraform. I am launching it from withing WSL Ubuntu on Windows, I get 100% CPU utilisation on all cores whilst terraform is sitting at the apply prompt.
Plan: 1 to add, 1 to change, 1 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value:
The CPU utilisation appears to be occurring in the kernel (it shows as red in Process Explorer).
Something terraform is doing is causing the kernel to be very busy.
Whilst waiting for user input before doing anything should require ~0 CPU utilisation.
As soon as I answer no or hit ctrl-c the high CPU load stops.
I'm not using the AWS provider, I'm not sure if the underlying root cause of OPs problem is the same or different.
! terraform version
Terraform v0.11.3
+ provider.acme (unversioned)
+ provider.azurerm v1.1.1
+ provider.local v1.1.0
+ provider.null v1.0.0
+ provider.template v1.0.0
+ provider.tls v1.0.1
! WSL Ubuntu version
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
I'm on WSL Ubuntu also.
Here's a strace -c -f for null_resource provider during destroy (so when it's not supposed to do anything).
% time seconds usecs/call calls errors syscall
0.00 0.000000 0 45 21 read
0.00 0.000000 0 24 write
0.00 0.000000 0 1 close
0.00 0.000000 0 3 rt_sigprocmask
0.00 0.000000 0 27 sched_yield
0.00 0.000000 0 1 clone
0.00 0.000000 0 2 sigaltstack
0.00 0.000000 0 1 arch_prctl
0.00 0.000000 0 2 gettid
0.00 0.000000 0 205 22 futex
0.00 0.000000 0 423 clock_gettime
0.00 0.000000 0 2724378 epoll_wait
0.00 0.000000 0 1 epoll_ctl
0.00 0.000000 0 3 2 unlinkat
0.00 0.000000 0 175 pselect6
100.00 0.000000 2725291 45 total
Same goes when on when waiting for user confirm, all the provider seem to be doing is spinning on epoll_wait
I will provide more details later, but this appears to be a real problem.
When running a terraform up, it appears that terraform is cpu limited.
I ran a up that takes 15 minutes but for a colleague it took 1.5 hours. He has a slower cpu (2 cores vs my 4 cores).
Terraform in my understanding is just parsing the terraform configuration and invoking provider api calls, why the crazy cpu usage?
Test terraform project
I built a brand new project just for testing purposes, with the minimalist configuration I can think of, and the cpu utlizations is still crazy high, for why should be api calls to aws.
It seems even more strange the the high cpu happens before I even accept the apply.
That means terrform is using tons of cpu just waiting to actually do anything.
This is now impacting our ability to use terraform, because colleagues with really beefy cpus are unable to use terraform to build our infrastructure.
cpu utilization while terraform is waiting for me to type yes, to accept the apply:
servers.tfvars
# ca04test01
resource "aws_instance" "ca04test01" {
key_name = "${var.keypair}"
ami = "${var.ami_xenial}"
instance_type = "${var.server_type["ca04test01"]}"
subnet_id = "${var.subnet_production["ent_app_preprod"]}"
private_ip = "${var.server_ip["ca04test01"]}"
# vpc_security_group_ids has to be a list, so enclose in [] to make it a 1 item list
vpc_security_group_ids = ["${var.sg_production["ent_app_preprod"]}"]
lifecycle {
ignore_changes = ["tags"]
}
count = "1"
user_data = "#cloud-config\nhostname: ca04test01.agilitypr.internal\nfqdn: ca04test01.agilitypr.internal"
tags {
type = "test"
role = "test"
Name = "ca04test01"
}
provisioner "remote-exec" {
inline = [
"printf '\n${var.server_ip["ca04test01"]} ca04test01.agilitypr.internal' | sudo tee -a /etc/hosts",
"sleep 1" # trick to get terraform to finish above command before closing ssh conn
# command || true # force command to exit and allow terraform to continue
]
connection {
type = "ssh"
user = "ubuntu"
}
}
}
terraform -v
Terraform v0.11.3
+ provider.aws v1.21.0
WSL / ubuntu for windows (on windows 10 build 1709)
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
strace output
jason@thunderbird:/Documents/terraform/test$ strace terraform apply
execve("/usr/bin/terraform", ["terraform", "apply"], [/* 18 vars */]) = 0
arch_prctl(ARCH_SET_FS, 0x460d3a8) = 0
sched_getaffinity(0, 8192, [ff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...]) = 64
mmap(0xc000000000, 65536, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
munmap(0xc000000000, 65536) = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f71b3fb0000
mmap(0xc420000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc420000000
mmap(0xc41fff8000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc41fff8000
mmap(0xc000000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f71b3fa0000
clock_gettime(CLOCK_MONOTONIC, {288850, 547450000}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f71b3f90000
clock_gettime(CLOCK_MONOTONIC, {288850, 547759000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 547881000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 547997000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 548223000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 548363000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 548480000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 548596000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 548713000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 548829000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 548944000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 549086000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 549212000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 549345000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 549461000}) = 0
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 553974000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 554393000}) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
sigaltstack({ss_sp=0xc420002000, ss_flags=0, ss_size=32768}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettid() = 8168
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGHUP, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGINT, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGQUIT, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGILL, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGILL, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGTRAP, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGTRAP, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGABRT, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGABRT, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGBUS, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGFPE, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGFPE, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGUSR1, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGUSR1, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGSEGV, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGSEGV, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGUSR2, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGUSR2, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGPIPE, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGPIPE, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGALRM, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGALRM, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGTERM, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGSTKFLT, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGSTKFLT, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [CHLD], SA_RESTORER|SA_RESTART, 0x7f68922654b0}, 8) = 0
rt_sigaction(SIGCHLD, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGURG, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGURG, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGXCPU, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGXCPU, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGXFSZ, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGXFSZ, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGVTALRM, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGVTALRM, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGPROF, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGPROF, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGWINCH, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGWINCH, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGIO, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGIO, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGPWR, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGPWR, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGSYS, NULL, {SIG_DFL, [], SA_RESTORER, 0x7ff25b2254b0}, 8) = 0
rt_sigaction(SIGSYS, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRTMIN, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_1, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_2, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_2, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_3, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_3, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_4, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_4, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_5, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_5, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_6, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_6, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_7, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_7, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_8, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_8, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_9, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_9, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_10, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_10, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_11, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_11, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_12, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_12, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_13, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_13, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_14, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_14, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_15, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_15, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_16, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_16, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_17, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_17, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_18, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_18, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_19, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_19, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_20, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_20, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_21, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_21, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_22, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_22, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_23, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_23, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_24, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_24, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_25, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_25, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_26, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_26, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_27, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_27, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_28, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_28, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_29, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_29, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_30, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_30, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_31, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_31, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
rt_sigaction(SIGRT_32, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f4347a654b0}, 8) = 0
rt_sigaction(SIGRT_32, {0x459fa0, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x45a0d0}, NULL, 8) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 581172000}) = 0
rt_sigprocmask(SIG_SETMASK, ~[], [], 8) = 0
clone(child_stack=0xc420040000, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM) = 8169
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 581931000}) = 0
rt_sigprocmask(SIG_SETMASK, ~[], [], 8) = 0
clone(child_stack=0xc42003c000, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM) = 8170
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[], [], 8) = 0
clone(child_stack=0xc42003e000, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM) = 8172
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc42005e110, FUTEX_WAKE, 1) = 1
readlinkat(AT_FDCWD, "/proc/self/exe", "/etc/terraform/terraform", 128) = 24
futex(0xc420030810, FUTEX_WAKE, 1) = 1
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f71b3f50000
openat(AT_FDCWD, "/proc/sys/net/core/somaxconn", O_RDONLY|O_CLOEXEC) = 3
epoll_create1(EPOLL_CLOEXEC) = 4
epoll_ctl(4, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3019198320, u64=140126327230320}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc420041b4c) = -1 ENOENT (No such file or directory)
read(3, "128\n", 4096) = 4
read(3, "", 4092) = 0
close(3) = 0
mmap(0xc420100000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc420100000
mmap(0xc41fff0000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc41fff0000
clock_gettime(CLOCK_MONOTONIC, {288850, 592601000}) = 0
futex(0xc42005e110, FUTEX_WAKE, 1) = 1
clock_gettime(CLOCK_REALTIME, {1527797407, 357742900}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 595708000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 596156000}) = 0
mmap(NULL, 1439992, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f71b3df0000
clock_gettime(CLOCK_REALTIME, {1527797407, 360222100}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 598020000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 598484000}) = 0
futex(0xc42005e110, FUTEX_WAKE, 1) = 1
mmap(0xc420200000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc420200000
mmap(0xc41ffe8000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc41ffe8000
clock_gettime(CLOCK_MONOTONIC, {288850, 599647000}) = 0
getuid() = 1000
getgid() = 1000
clock_gettime(CLOCK_REALTIME, {1527797407, 365314900}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 603078000}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/etc/terraform/terraform", 128) = 24
clock_gettime(CLOCK_REALTIME, {1527797407, 366964500}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 604711000}) = 0
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
futex(0xc420030810, FUTEX_WAKE, 1) = 1
clock_gettime(CLOCK_REALTIME, {1527797407, 377522000}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 615287000}) = 0
getuid() = 1000
getgid() = 1000
clock_gettime(CLOCK_REALTIME, {1527797407, 380830700}) = 0
clock_gettime(CLOCK_MONOTONIC, {288850, 618685000}) = 0
getpid() = 8168
openat(AT_FDCWD, "/tmp/terraform-log085201699", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = 3
epoll_ctl(4, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3019198320, u64=140126327230320}}) = 0
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
futex(0xc420030810, FUTEX_WAKE, 1) = 1
pipe2([5, 6], O_CLOEXEC) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 5, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3019198128, u64=140126327230128}}) = 0
fcntl(5, F_GETFL) = 0 (flags O_RDONLY)
fcntl(5, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 6, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3019197936, u64=140126327229936}}) = 0
fcntl(6, F_GETFL) = 0x1 (flags O_WRONLY)
fcntl(6, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
pipe2([7, 8], O_CLOEXEC) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3019197744, u64=140126327229744}}) = 0
fcntl(7, F_GETFL) = 0 (flags O_RDONLY)
fcntl(7, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3019197552, u64=140126327229552}}) = 0
fcntl(8, F_GETFL) = 0x1 (flags O_WRONLY)
fcntl(8, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
fcntl(6, F_GETFL) = 0x801 (flags O_WRONLY|O_NONBLOCK)
fcntl(6, F_SETFL, O_WRONLY) = 0
fcntl(8, F_GETFL) = 0x801 (flags O_WRONLY|O_NONBLOCK)
fcntl(8, F_SETFL, O_WRONLY) = 0
pipe2([9, 10], O_CLOEXEC) = 0
getpid() = 8168
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[], NULL, 8) = 0
clone(child_stack=0, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 8174
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
close(10) = 0
read(9, "", 8) = 0
close(9) = 0
epoll_ctl(4, EPOLL_CTL_DEL, 6, 0xc4201f59c4) = 0
close(6) = 0
epoll_ctl(4, EPOLL_CTL_DEL, 8, 0xc4201f59c4) = 0
close(8) = 0
futex(0xc420030b90, FUTEX_WAKE, 1) = 1
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE SEGV STKFLT CHLD PROF RTMIN RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[INT ILL TRAP BUS FPE SEGV STKFLT CHLD PROF RTMIN RT_1], NULL, 8) = 0
futex(0xc42039c110, FUTEX_WAKE, 1) = 1
futex(0xc4200789b8, FUTEX_WAKE, 1) = 1
rt_sigprocmask(SIG_SETMASK, ~[INT ILL TRAP BUS FPE SEGV TERM STKFLT CHLD PROF RTMIN RT_1], NULL, 8) = 0
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc42039c110, FUTEX_WAKE, 1) = 1
futex(0x460d450, FUTEX_WAIT, 0, NULL
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
+ aws_instance.ca04test01
id: <computed>
ami: "ami-obscured"
associate_public_ip_address: <computed>
availability_zone: <computed>
ebs_block_device.#: <computed>
ephemeral_block_device.#: <computed>
get_password_data: "false"
instance_state: <computed>
instance_type: "t2.nano"
ipv6_address_count: <computed>
ipv6_addresses.#: <computed>
key_name: "obscured"
network_interface.#: <computed>
network_interface_id: <computed>
password_data: <computed>
placement_group: <computed>
primary_network_interface_id: <computed>
private_dns: <computed>
private_ip: "10.4.10.100"
public_dns: <computed>
public_ip: <computed>
root_block_device.#: <computed>
security_groups.#: <computed>
source_dest_check: "true"
subnet_id: "subnet-obscured"
tags.%: "3"
tags.Name: "ca04test01"
tags.role: "test"
tags.type: "test"
tenancy: <computed>
user_data: "obscured"
volume_tags.%: <computed>
vpc_security_group_ids.#: "1"
vpc_security_group_ids.3525068387: "sg-obscured"
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: no
Error: Apply cancelled.
) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8174, si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE SEGV TERM STKFLT CHLD PROF RTMIN RT_1], NULL, 8) = 0
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0xc420337990, FUTEX_WAKE, 1) = 1
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE SEGV STKFLT CHLD PROF RTMIN RT_1], NULL, 8) = 0
futex(0xc420030490, FUTEX_WAKE, 1) = 1
futex(0x460d450, FUTEX_WAIT, 0, NULL <unfinished ...>
+++ exited with 1 +++
Adding a debug log from the same project (no changes to configuration or manifest)
waited until the "Do you want to perform these actions?" prompt. Saw high cpu usage in task manager. ctrl-c'ed the terraform apply, canceling the apply
terraform_debug.log
@jgrammen-agilitypr try strace -c -f
, I suspect you'll see epoll_wait
has the highest count. WSL has had several epoll bugs. I suspect this is a bug in WSL.
yup epoll_wait has the highest count
jason@thunderbird:/mnt/c/Users/jason/Documents/terraform/test$ strace -c -f terraform apply
strace: Process 39 attached
strace: Process 40 attached
strace: Process 41 attached
strace: Process 42 attached
strace: Process 43 attached
strace: Process 44 attached
strace: Process 45 attached
strace: Process 46 attached
strace: Process 47 attached
strace: Process 48 attached
strace: Process 49 attached
strace: Process 50 attached
strace: Process 51 attached
strace: Process 52 attached
strace: Process 53 attached
strace: Process 54 attached
strace: Process 55 attached
strace: Process 56 attached
strace: Process 57 attached
strace: Process 58 attached
strace: Process 59 attached
strace: Process 60 attached
strace: Process 61 attached
strace: Process 62 attached
strace: Process 63 attached
strace: Process 64 attached
strace: Process 65 attached
strace: Process 66 attached
strace: Process 67 attached
strace: Process 68 attached
strace: Process 69 attached
strace: Process 70 attached
strace: Process 71 attached
strace: Process 72 attached
strace: Process 73 attached
strace: Process 74 attached
strace: Process 75 attached
strace: Process 76 attached
strace: Process 77 attached
strace: Process 78 attached
strace: Process 79 attached
strace: Process 80 attached
strace: Process 81 attached
strace: Process 82 attached
strace: Process 83 attached
strace: Process 84 attached
strace: Process 85 attached
strace: Process 86 attached
strace: Process 87 attached
strace: Process 88 attached
strace: Process 89 attached
strace: Process 90 attached
strace: Process 91 attached
strace: Process 92 attached
^Cstrace: Process 38 detached
strace: Process 39 detached
strace: Process 40 detached
strace: Process 41 detached
strace: Process 42 detached
strace: Process 43 detached
strace: Process 44 detached
strace: Process 45 detached
strace: Process 46 detached
strace: Process 47 detached
strace: Process 48 detached
strace: Process 49 detached
strace: Process 50 detached
strace: Process 51 detached
strace: Process 52 detached
strace: Process 53 detached
strace: Process 54 detached
Interrupt received.
strace: Process 55 detached
Please wait for Terraform to exit or data loss may occur.
strace: Process 56 detached
Gracefully shutting down...
strace: Process 57 detached
strace: Process 58 detached
strace: Process 59 detached
strace: Process 60 detached
strace: Process 61 detached
strace: Process 62 detached
strace: Process 63 detached
strace: Process 64 detached
strace: Process 65 detached
strace: Process 66 detached
strace: Process 67 detached
strace: Process 68 detached
strace: Process 69 detached
strace: Process 70 detached
strace: Process 71 detached
strace: Process 72 detached
strace: Process 73 detached
strace: Process 74 detached
strace: Process 75 detached
strace: Process 76 detached
strace: Process 77 detached
strace: Process 78 detached
strace: Process 79 detached
strace: Process 80 detached
strace: Process 81 detached
strace: Process 82 detached
strace: Process 83 detached
strace: Process 84 detached
strace: Process 85 detached
strace: Process 86 detached
strace: Process 87 detached
strace: Process 88 detached
strace: Process 89 detached
strace: Process 90 detached
strace: Process 91 detached
strace: Process 92 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
0.00 0.000000 0 4143 391 read
0.00 0.000000 0 744 write
0.00 0.000000 0 585 close
0.00 0.000000 0 21 6 stat
0.00 0.000000 0 533 fstat
0.00 0.000000 0 553 lstat
0.00 0.000000 0 115 mmap
0.00 0.000000 0 4 munmap
0.00 0.000000 0 624 rt_sigaction
0.00 0.000000 0 188 rt_sigprocmask
0.00 0.000000 0 60 54 rt_sigreturn
0.00 0.000000 0 11880 sched_yield
0.00 0.000000 0 12 dup2
0.00 0.000000 0 6 getpid
0.00 0.000000 0 16 socket
0.00 0.000000 0 14 2 connect
0.00 0.000000 0 2 bind
0.00 0.000000 0 2 listen
0.00 0.000000 0 17 getsockname
0.00 0.000000 0 14 getpeername
0.00 0.000000 0 26 setsockopt
0.00 0.000000 0 2 getsockopt
0.00 0.000000 0 56 clone
0.00 0.000000 0 4 execve
0.00 0.000000 0 1160 fcntl
0.00 0.000000 0 2 2 fsync
0.00 0.000000 0 6 getuid
0.00 0.000000 0 6 getgid
0.00 0.000000 0 110 sigaltstack
0.00 0.000000 0 55 arch_prctl
0.00 0.000000 0 106 gettid
0.00 0.000000 0 33491 25296 futex
0.00 0.000000 0 4 sched_getaffinity
0.00 0.000000 0 28 getdents64
0.00 0.000000 0 1 1 restart_syscall
0.00 0.000000 0 98171 clock_gettime
0.00 0.000000 0 1382518 epoll_wait
0.00 0.000000 0 1169 12 epoll_ctl
0.00 0.000000 0 573 13 openat
0.00 0.000000 0 3 unlinkat
0.00 0.000000 0 7 readlinkat
0.00 0.000000 0 17639 15 pselect6
0.00 0.000000 0 2 1 accept4
0.00 0.000000 0 4 epoll_create1
0.00 0.000000 0 13 pipe2
0.00 0.000000 0 7 getrandom
------ ----------- ----------- --------- --------- ----------------
100.00 0.000000 1554696 25793 total
based on @berney suggestion I tried the windows version of terraform. No high cpu utilization, using the same test project. This strongly suggests that its a WSL bug, and everyone else who complained about high cpu in this thread were also running WSL.
I will have opened a bug report with WSL : https://github.com/Microsoft/WSL/issues/3276
Issue was addressed in WSL, can this be closed?
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
Most helpful comment
based on @berney suggestion I tried the windows version of terraform. No high cpu utilization, using the same test project. This strongly suggests that its a WSL bug, and everyone else who complained about high cpu in this thread were also running WSL.
I will have opened a bug report with WSL : https://github.com/Microsoft/WSL/issues/3276