PDP-10 / its

Incompatible Timesharing System
Other
868 stars 84 forks source link

pdp10-ka emulator doesn't always terminate when invoked from expect during build #1651

Closed eswenson1 closed 5 years ago

eswenson1 commented 5 years ago

I'm running a build right now, and am in the final phase of the build, where the "boot2" script is being used to build the various components. Doing a "ps -elf | grep pdp10-ka" shows:

eswenson@localhost:~/ex-its-ka/es-its/ws/its/build$ ps -elf | grep pdp10
0 S eswenson 28812 28809  6  80   0 - 21194 -      21:46 pts/19   00:05:10 ./tools/sims/BIN/pdp10-ka build/es-its/init
0 S eswenson 29118 28809  2  80   0 - 10967 -      22:07 pts/20   00:01:21 ./tools/sims/BIN/pdp10-ka build/es-its/boot
0 R eswenson 29196 28809 24  80   0 -  9064 -      22:13 pts/21   00:11:49 ./tools/sims/BIN/pdp10-ka build/es-its/boot2
0 S eswenson 29887 19901  0  80   0 -  3555 -      23:01 pts/15   00:00:00 grep --color=auto pdp10
0 R eswenson 30650 30649 42  80   0 - 10967 -      Jul15 pts/12   10:50:31 tools/sims/BIN/pdp10-ka build/pdp10-kl/run

Now, the last entry is for a running pdp10-kl system that is not running under expect. It should be there. The grep, of course, is irrelevant.

However, notice that there are 3 pdp10-ka processes, having been started with the "init", "boot", and "boot2" scripts. The expect script launches each of these in that order. Now it is executing the one with the "boot2" script. The other two ("init", and "boot") should have gone away when the emulators were executed as part of the expect script.

All of these pdp10-ka instances are currently running and consuming about 30% cpu.

My host system is an Ubuntu 16.04 Linux system.

I had a user of one of my Multics systems report that the system was very sluggish. When I checked, there were 12 pdp10-ka processes running. All of these had been launched through the ITS build's expect script(s). I killed all but the ones that I needed and performance improved. They were all running with 30%+ cpu utilization.

rcornwell commented 5 years ago

I have seen this when the build script terminates without finishing. Or is interrupted. Expect does not kill the sub process.

larsbrinkhoff commented 5 years ago

I second @rcornwell's observation. I always check for lingering processes after a failed build.

eswenson1 commented 5 years ago

Ok, so I should close this ticket as it is expect’s fault, right?

larsbrinkhoff commented 5 years ago

I can try to see if there's a way to fix this in expect.

larsbrinkhoff commented 5 years ago

Fixed by #1729.