Reliability of no shutdown/shutdown loop

Holger Freyther holger at freyther.de
Mon Nov 13 10:43:30 UTC 2017


Hi,

as part of adding bindings I wrote code that is doing shutdown/no shutdown every second. Actually I call mobile_init/mobile_exit with a script like this:

local start = false
osmo.ms().start()
function toggle_it()
	osmo.timeout(1, function()
		if start then
			start = false
			osmo.ms().start()
		else
			start = true
			osmo.ms().stop()
		end
		toggle_it() -- start the timer again
	end
end
toggle_it()

And while debugging I have nothing connected for the l1ctl. This means the l1ctl reset ack is not being received by the application. So when doing the above the following happens.

mobile_init()
mobile_exit()
mobile_init()
	|-> busy loop of adding a timer already in the tree


Turns out that mobile_exit checks the state and then takes an early exit without stopping the timers. So let's use the force option that is meant to not send a IMSI detach. Let's try it again.

mobile_init()
mobile_exit()
mobile_init()
	|-> busy loop of adding a timer already in the tree

Why is that? Even force mobile_exit() will exit early and mobile_init() doesn't take the device out of shutdown. From my point of view a mobile_exit(ms, force) should really take the device down and never fail. Any objections to modify the code for this?

regards

	holger


More information about the baseband-devel mailing list