← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1941819] Re: A mistack caused by temporary_mutation reentry

 

** Project changed: fuel-plugin-contrail => nova

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1941819

Title:
  A mistack caused by temporary_mutation reentry

Status in OpenStack Compute (nova):
  New

Bug description:
  nova.virt.libvirt./driver.py:LibvirtDriver._live_migration() spawn a thread to execute _live_migration_operation(called after threadA).Original thread execute _live_migration_monitor (called after threadB).
  Assignment statement inst_type=instance.flavor call nova/objects/instance.py:obj_load_attr in function _live_migration_operation.
  Function _live_migration_monitor call func _live_migration_data_gb。Assignment statement ram_gb = instance.flavor.memory_mb * units.Mi / units.Gi also call nova/objects/instance.py:obj_load_attr. 
  Function temporary_mutation is called by obj_load_attr. The mistack caused by the temporary_mutation is called by two threads simultaneously。
  Time0: self._context[‘read.deleted’] is ‘no’
  Time1: ThreadA called temporary_mutation, self._context[‘read.deleted’] is assigned a value of ‘yes’. Old value is ‘no’.
  Time2: ThreadB called temporary_mutation, self._context[‘read.deleted’] is assigned a value of ‘yes’. Old value is ‘yes’.
  Time3: ThreadA executing finally code of temporary_mutation, the value of  self._context[‘read.deleted’] is restored to ‘no’.
  Time3: ThreadA executing finally code of temporary_mutation, the value of  self._context[‘read.deleted’] is restored to ‘yes’.
  Result : Two calls to temporary_mutation cause the value of self._context[‘read.deleted’] to change from ‘no’ to ‘yes’. When Source host calling update_available_resource(ctxt) in _post_live_migration, Grabbing all instances assigned to this node will read deleted instances, which is time-consuming.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1941819/+subscriptions