root@provisioned:~# for i in `ps -ef | grep ifup | grep -v grep | awk '{print $2}'`; do echo $i; cat /proc/$i/environ; done
618
...UPSTART_INSTANCE=eth2...
...UPSTART_INSTANCE=eth1...
...UPSTART_INSTANCE=lo...
...UPSTART_INSTANCE=eth0...
...INSTANCE=UPSTART_JOB=networking...
---
As I said before, sysv scripts and upstart scripts were depending on
each other to run in parallel (unfortunately with race conditions)
to configure bonding. We can see here that one of upstart networking
processes (networking or network-instance) got the lock and is
on an infinite loop waiting for other instance.. who is waiting for
the lock.
And you can check that upstart got deadlocked:
---
root@provisioned:~# ps -ef | grep ifup
root 618 1 0 10:21 ? 00:00:00 ifup --allow auto eth2
root 619 1 0 10:21 ? 00:00:00 ifup --allow auto eth1
root 620 1 0 10:21 ? 00:00:00 ifup --allow auto lo
root 621 1 0 10:21 ? 00:00:00 ifup --allow auto eth0
root 726 1 0 10:21 ? 00:00:00 ifup --allow auto bond0
root 739 733 0 10:21 ? 00:00:00 ifup -a
root@provisioned:~# for i in `ps -ef | grep ifup | grep -v grep | awk '{print $2}'`; do echo $i; cat /proc/$i/environ; done INSTANCE= eth2... INSTANCE= eth1... INSTANCE= lo... INSTANCE= eth0... UPSTART_ JOB=networking. ..
618
...UPSTART_
...UPSTART_
...UPSTART_
...UPSTART_
...INSTANCE=
---
As I said before, sysv scripts and upstart scripts were depending on
each other to run in parallel (unfortunately with race conditions)
to configure bonding. We can see here that one of upstart networking
processes (networking or network-instance) got the lock and is
on an infinite loop waiting for other instance.. who is waiting for
the lock.
--- if-pre- up.d/ifenslave
root@provisioned:~# ps -ef | grep ifenslave
root 647 641 0 10:21 ? 00:00:00 /bin/sh /etc/network/
---