Modify

Opened 6 years ago

Last modified 23 months ago

#11903 new defect

sysupgrade kills network before writing to flash nuking ssh session

Reported by: Scott Shambarger <scott-openwrt@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: base-files Cc:

Description

I notice that at random times, running sysupgrade over ssh will disconnect me before the upgrade starts.

I tracked down the problem to the lib/upgrade/common.sh:kill_remaining()

It has a whitelist of processes not to kill, but that whitelist doesn't include udhcpc -- which wouldn't normally be a problem, *UNLESS* udhcpc is killed before netifd -- because netifd will attempt to restart the network, and take the interface down.

If netifd is killed first, it kills the child udhcpc processes, and the network is left running as expected.

Whitelisting udhcpc therefore still results in the process being killed, but without kicking me off the box :)

Here's a quick patch that fixes the bug:

--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -99,7 +99,7 @@ kill_remaining() { # [ <signal> ]
 
                case "$name" in
                        # Skip essential services
-                       *ash*|*init*|*watchdog*|*ssh*|*dropbear*|*telnet*|*login*|*hostapd*|*wpa_supplicant*) : ;;
+                       *ash*|*init*|*watchdog*|*ssh*|*dropbear*|*telnet*|*login*|*hostapd*|*wpa_supplicant*|*udhcpc*) : ;;
 
                        # Killable process
                        *)

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:2 Changed 23 months ago by Daniel Miranda <danielkza2@…

I'm seeing a similar issue in Chaos Calmer with a TP-LINK TL-WDR4300. Trying to sysupgrade always freezes the SSH connection after killing pppd, but modifying the protected process lists to include '*dhcp*' allows everything to proceed normally, allowing all other processes to be killed and for the image to be flashed. Otherwise I get a reboot and nothing is flashed.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.