I ran into this again and found a new (?) way of fixing the situation once it has happened that is slightly less crazy than the exhaust-all-pids script: The /proc/sys/kernel/ns_last_pid knob can be used to get a process with the correct PID.
I used
echo $(($n-2)) | sudo tee /proc/sys/kernel/ns_last_pid && bash -c 'sleep 60 &'
Where $n is the PID that upstart is tracking (output of 'status'). The -2 is necessary because the bash process gets a pid first. The sleep should wind up with the tracked PID and as a child of the init process.
Maybe there is a simpler way, but this worked for me.
Note that is a relatively "new" kernel feature. It works with the saucy kernel, I don't know about earlier releases.
I ran into this again and found a new (?) way of fixing the situation once it has happened that is slightly less crazy than the exhaust-all-pids script: The /proc/sys/ kernel/ ns_last_ pid knob can be used to get a process with the correct PID.
I used kernel/ ns_last_ pid && bash -c 'sleep 60 &'
echo $(($n-2)) | sudo tee /proc/sys/
Where $n is the PID that upstart is tracking (output of 'status'). The -2 is necessary because the bash process gets a pid first. The sleep should wind up with the tracked PID and as a child of the init process.
Maybe there is a simpler way, but this worked for me.
Note that is a relatively "new" kernel feature. It works with the saucy kernel, I don't know about earlier releases.