Legato suspends when network lost


#1

Hi All,

I have the following scenario: an app is connected to the cellular network - registered with a data connection open ( 3G in my case ) and is transmitting data. Then there is a loss of network - the device moves outside of coverage, signal strength drops below the threshold, etc., the important thing is that there is no more network. At this point, legato seems to suspend - apps don’t run, they freeze; and instead the device does this:

for about 40 seconds to a minute. After some number of those tx_timeouts(), the device stops trying, decides it’s lost the network and apps resume again from the point where they left off ( but at this point the device is not registered on the network ).

Obviously, losing network connectivity is a normal occurrence that any application should be able to handle, but handling it becomes a problem if your app is suspended from running while the device is busy trying to recover the lost network. Note, this is not the modem service that’s entering a blocking thread, it seems to happen at the kernel level to try to continue transmission. When you’re not transmitting, you don’t see this behavior and you wouldn’t notice it anyway.

Is there any way to prevent this and keep apps running ?


#2

Hi mahtab,

interesting, it looks the kernel might be stuck in a loop waiting for data as you mention, otherwise apps wouldn’t freeze like they do.

I’m gonna see if we can try to reproduce the issue.


#3

BTW could you provide versiosn that you’re running with?
cm info
cat /etc/legato/versions
legato version

Thanks


#4

Hi @CoRfr, thanks for the reply,

device/fware/legato version:

Other information that might be relevant: sending (uplink) over UDP continuously using the standard linux udp to a socket, no data is being received on downlink while this happens. There are no errors, no warnings, no crashes from legato - even the modem service just suspends and then carries on normally. Actually it’s the modem service that afterwards registers that there is no longer a network connection, straight after it’s released by the kernel. Quite common and easy for me to reproduce by just disconnecting the antenna while transmitting.