This paper discusses the problem of controlling a Petri net whose marking cannot be measured but is estimated using an observer. The control objective is that of enforcing a set of generalized mutual exclusion constraints (GMEC) and all transitions are assumed to be controllable. The use of marking estimates (as opposed to the exact knowledge of the actual marking of the plant) leads to a worse performance of the closed-loop system and it may also be the case that, as a result of this, the controlled system reaches a deadlock. We present a general approach, based on siphon analysis, to recover from such an "observer induced" deadlock. The most interesting feature of our approach is that the observer, controller and deadlock recovery algorit...