Re: Accessing previously freed data.



On Thu, 2009-02-26 at 10:43 -0700, Drew Moseley wrote:
> Hello,
> 
> I am using a system based on Network Manager 0.7.0.
> 
> I see an intermittent problem where for some reason the UDI_REMOVED
> message is not received for some reason.  In this case, eventually
> nm_device_finalize() is called freeing the priv->udi field (among
> others).  Unfortunately the device is still in the priv->devices
> list being processed by the hal_manager_udi_added_cb() and
> hal_manager_udi_removed_cb() functions in nm_manager.c.  The next
> time either of these functions are called they traverse the list
> and access the udi field and Network Manager segfaults since that
> data has been freed.

Hmm; I wouldn't expect the device to be finalized until UDI_REMOVED is
called.  Basically, if the device gets added to NM, it's very surprising
to me that the device is ever destroyed if UDI_REMOVED doesn't happen.
Any idea what's causing that?  My first thought would be an error in
device recounting; debugging that would require some logs of NM behavior
when the device destruction happens.

Dan

> I am not able to reproduce this reliably but based on the the last
> time I saw it I'm fairly certain that my description is accurate.
> Obviously the correct solution is to ensure that the UDI_REMOVED
> message is received and processed properly but is there a way to
> force this to occur in the nm_device_finalize() routine so that
> Network Manager does not crash?
> 
> Thanks,
> Drew
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]