1. 07 11月, 2014 10 次提交
  2. 06 11月, 2014 19 次提交
  3. 05 11月, 2014 2 次提交
    • P
      remote: Fix memory leak in remoteConnectGetAllDomainStats · bf1f8e28
      Peter Krempa 提交于
      The remote call actually doesn't free the arguments array so we leak
      memory in case a domain list is specified. As the remote domain list
      array consists only of stolen pointers from the actual domain objects
      it's sufficient just to free the array.
      
      Valgrind message:
      ==1081452== 64 bytes in 1 blocks are definitely lost in loss record 632 of 726
      ==1081452==    at 0x4C296D0: calloc (vg_replace_malloc.c:618)
      ==1081452==    by 0x4EA5CB4: virAllocN (viralloc.c:191)
      ==1081452==    by 0x505D21E: remoteConnectGetAllDomainStats (remote_driver.c:7785)
      ==1081452==    by 0x50081AA: virDomainListGetStats (libvirt-domain.c:11080)
      ==1081452==    by 0x155249: cmdDomstats (virsh-domain-monitor.c:2147)
      ==1081452==    by 0x12FB73: vshCommandRun (virsh.c:1935)
      ==1081452==    by 0x133FEB: main (virsh.c:3719)
      bf1f8e28
    • P
      Memory: Use consistent type for all memory elements. · d426431f
      Prerna Saxena 提交于
      Domain memory elements such as max_balloon and cur_balloon are
      implemented as 'unsigned long long', whereas the 'memory' element
      in NUMA cells is implemented as 'unsigned int'.
      
      Use the same data type (unsigned long long) for 'memory' element
      in NUMA cells.
      Signed-off-by: NPrerna Saxena <prerna@linux.vnet.ibm.com>
      d426431f
  4. 04 11月, 2014 7 次提交
  5. 03 11月, 2014 2 次提交
    • M
      examples: add systemtap script to ease lock debugging · 4480cd28
      Martin Kletzander 提交于
      As discussed before, this simple script should help with debugging
      deadlocks, although there are still some caveats.  RWLocks are not
      handled by this and if your deadlock if very racy, it may not lock
      up when running with this script due to the slowdown.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      4480cd28
    • M
      qemu: avoid rare race when undefining domain · b629c64e
      Martin Kletzander 提交于
      When one domain is being undefined and at the same time started, for
      example, there is a possibility of a rare problem occuring.
      
       - Thread 1 does virDomainUndefine(), has the lock, checks that the
         domain is active and because it's not, calls
         virDomainObjListRemove().
      
       - Thread 2 does virDomainCreate() and tries to lock the domain.
      
       - Thread 1 needs to lock domain list in order to remove the domain from
         it, but must unlock domain first (proper order is to lock domain list
         first and the domain itself second).
      
       - Thread 2 grabs the lock, starts the domain and releases the lock.
      
       - Thread 1 grabs the lock and removes the domain from list.
      
      With this patch:
      
       - qemuDomainRemoveInactive() creates a QEMU_JOB_MODIFY if that's
         possible, but since it must remove the domain from list either way,
         it continues even when starting the job failed.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1150505Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      b629c64e