"Hung" compilers apparently weren't killed #232

Closed
mattgodbolt opened this Issue Jan 11, 2017 · 5 comments

Projects

None yet

1 participant

@mattgodbolt
Owner

Had apparently stuck compilers that weren't killed by the timer (it seems):

ubuntu   23987  0.0  0.0  16880  1780 ?        S    17:51   0:00 /opt/compiler-explorer/gcc-7-snapshot/bin/g++ -g -o /tmp/compiler-explorer-compiler117011-4885-1ezdh7m.hjxci60f6r/output.s -xc -Os -pipe /tmp/compiler-explorer-compiler117011-4885-1ezdh7m.hjxci60f6r/example.cpp
ubuntu   23988  0.0  0.7  47636 30688 ?        S    17:51   0:00 /opt/compiler-explorer/gcc-7-20170108/bin/../libexec/gcc/x86_64-linux-gnu/7.0.0/cc1 -quiet -imultiarch x86_64-linux-gnu -iprefix /opt/compiler-explorer/gcc-7-20170108/bin/../lib/gcc/x86_64-linux-gnu/7.0.0/ /tmp/compiler-explorer-compiler117011-4885-1ezdh7m.hjxci60f6r/example.cpp -quiet -dumpbase example.cpp -mtune=generic -march=x86-64 -auxbase example -g -Os -o -
ubuntu   23989  0.0  0.1  13712  4616 ?        S    17:51   0:00 /opt/compiler-explorer/gcc-7-20170108/bin/../lib/gcc/x86_64-linux-gnu/7.0.0/../../../../x86_64-linux-gnu/bin/as --64 -o /tmp/ccOq0Pvf.o
ubuntu   24363  0.0  0.0  16880  1780 ?        S    17:52   0:00 /opt/compiler-explorer/gcc-7-snapshot/bin/g++ -g -o /tmp/compiler-explorer-compiler117011-4885-m7iggn.c46ye97ldi/output.s -xc -Os -pipe /tmp/compiler-explorer-compiler117011-4885-m7iggn.c46ye97ldi/example.cpp
ubuntu   24364  0.0  0.7  47636 30684 ?        S    17:52   0:00 /opt/compiler-explorer/gcc-7-20170108/bin/../libexec/gcc/x86_64-linux-gnu/7.0.0/cc1 -quiet -imultiarch x86_64-linux-gnu -iprefix /opt/compiler-explorer/gcc-7-20170108/bin/../lib/gcc/x86_64-linux-gnu/7.0.0/ /tmp/compiler-explorer-compiler117011-4885-m7iggn.c46ye97ldi/example.cpp -quiet -dumpbase example.cpp -mtune=generic -march=x86-64 -auxbase example -g -Os -o -
ubuntu   24365  0.0  0.1  13712  4612 ?        S    17:52   0:00 /opt/compiler-explorer/gcc-7-20170108/bin/../lib/gcc/x86_64-linux-gnu/7.0.0/../../../../x86_64-linux-gnu/bin/as --64 -o /tmp/ccDPvR47.o
ubuntu   24704  0.0  0.0  10460   928 pts/1    S+   19:18   0:00 grep --color=auto /opt/compiler-explorer/

the compilers persisted for at least 9 seconds (before I manually killed them)

@mattgodbolt mattgodbolt self-assigned this Jan 11, 2017
@mattgodbolt mattgodbolt added the bug label Jan 11, 2017
@mattgodbolt
Owner

And again:

Every 2.0s: ps aux | grep /opt/compiler-explorer/ | grep -v watch | sort                                                              Wed Jan 11 21:05:01 2017

ubuntu   10458  0.0  0.0  16732  1636 ?        S    20:56   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/g++ -g -o /tmp/compiler-explorer-compiler117011-4885-lyu
ubuntu   10459  0.0  0.6  43264 26288 ?        S    20:56   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/../libexec/gcc/x86_64-linux-gnu/6.3.0/cc1 -quiet -v -imu
ubuntu   10460  0.0  0.1  13712  4616 ?        S    20:56   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../x86_64-lin
ubuntu   10574  0.0  0.0  16732  1636 ?        S    20:57   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/g++ -g -o /tmp/compiler-explorer-compiler117011-4885-hoc
ubuntu   10575  0.0  0.6  43264 26288 ?        S    20:57   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/../libexec/gcc/x86_64-linux-gnu/6.3.0/cc1 -quiet -v -imu
ubuntu   10576  0.0  0.1  13712  4616 ?        S    20:57   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../x86_64-lin
ubuntu   10787  0.0  0.0  10460   916 pts/1    S+   21:05   0:00 grep /opt/compiler-explorer/

Seems these have been running for many minutes... :/

@mattgodbolt
Owner

full dump:

ubuntu   10458  0.0  0.0  16732  1636 ?        S    20:56   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/g++ -g -o /tmp/compiler-explorer-compiler117011-4885-lyupwe.8arf3whfr/output.s -xc -trigraphs -v -pipe /tmp/compiler-explorer-compiler117011-4885-lyupwe.8arf3whfr/example.cpp
ubuntu   10459  0.0  0.6  43264 26288 ?        S    20:56   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/../libexec/gcc/x86_64-linux-gnu/6.3.0/cc1 -quiet -v -imultiarch x86_64-linux-gnu -iprefix /opt/compiler-explorer/gcc-6.3.0/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/ /tmp/compiler-explorer-compiler117011-4885-lyupwe.8arf3whfr/example.cpp -quiet -dumpbase example.cpp -mtune=generic -march=x86-64 -auxbase example -g -trigraphs -version -o -
ubuntu   10460  0.0  0.1  13712  4616 ?        S    20:56   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../x86_64-linux-gnu/bin/as -v --64 -o /tmp/ccvwSUwF.o
ubuntu   10574  0.0  0.0  16732  1636 ?        S    20:57   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/g++ -g -o /tmp/compiler-explorer-compiler117011-4885-hockcn.qbleq4zpvi/output.s -xc -trigraphs -v -pipe /tmp/compiler-explorer-compiler117011-4885-hockcn.qbleq4zpvi/example.cpp
ubuntu   10575  0.0  0.6  43264 26288 ?        S    20:57   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/../libexec/gcc/x86_64-linux-gnu/6.3.0/cc1 -quiet -v -imultiarch x86_64-linux-gnu -iprefix /opt/compiler-explorer/gcc-6.3.0/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/ /tmp/compiler-explorer-compiler117011-4885-hockcn.qbleq4zpvi/example.cpp -quiet -dumpbase example.cpp -mtune=generic -march=x86-64 -auxbase example -g -trigraphs -version -o -
ubuntu   10576  0.0  0.1  13712  4616 ?        S    20:57   0:00 /opt/compiler-explorer/gcc-6.3.0/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../x86_64-linux-gnu/bin/as -v --64 -o /tmp/ccMMMYMZ.o
ubuntu   10881  0.0  0.0  10460   932 pts/1    S+   21:05   0:00 grep --color=auto /opt/compiler-explorer/
@mattgodbolt
Owner

Repro (via @amonakov):

If you want to reproduce the timeout, put

  #define path "/proc/self/fd/1"
  #include path

into the source window, and

  -pipe

into the command-line prompt, and

enable the [11010] button ("compile to binary and disassemble the output").
@mattgodbolt
Owner

(those following along at home; please don't try this until I've fixed it!)

@mattgodbolt
Owner

The fix is now deployed to the live site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment