Comment 26 for bug 1533508

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

This is how the bug is apparently produced:

1. NM asks ofono to activate a context
2. Network is gone just a moment after that and modem detaches
3. Attached property is set to FALSE by ofono, then it tries to deactivate activated contexts, but there are none (no response yet from the request sent in step 1)
4. A few seconds later, the context is activated. Obviously the modem has registered again, but no event has triggered for that yet.
5. Modem says it is registered, right AFTER it has activated the context (which is maybe not the most correct sequence of events). Ofono detects that there are active context and it assumes it asked these context to close when it set Attached to FALSE. But that is not true as there were no active context when we did that. We do not change Attached property because ofono waits for old contexts to close before setting Attached to TRUE.
6. We stall until the active context is finally closed by some external event, which might happen hours later. While we are in this situation there is an active context, but probably it is not used by NM as it does nothing with ofono until Attached is TRUE. This last thing needs confirmation.