1. 13 8月, 2012 13 次提交
    • J
      server rpc: Remove APIs for manipulating filters on locked client · f8e65111
      Jiri Denemark 提交于
      We don't need to add or remove filters when client object is already
      locked anymore. There's no reason to keep the *Locked variants of those
      APIs.
      (cherry picked from commit d9ad4166)
      f8e65111
    • J
      rpc: Remove unused parameter in virKeepAliveStopInternal · 6180670c
      Jiri Denemark 提交于
      The previous commit removed the only usage of ``all'' parameter in
      virKeepAliveStopInternal, which was actually the only reason for having
      virKeepAliveStopInternal. This effectively reverts most of commit
      6446a9e2.
      (cherry picked from commit 0ec514b3)
      6180670c
    • J
      rpc: Do not use timer for sending keepalive responses · 4d695acd
      Jiri Denemark 提交于
      When a libvirt API is called from the main event loop (which seems to be
      common in event-based glib apps), the client IO loop would properly
      handle keepalive requests sent by a server but will not actually send
      them because the main event loop is blocked with the API. This patch
      gets rid of response timer and the thread which is processing keepalive
      requests is also responsible for queueing responses for delivery.
      (cherry picked from commit bb85f229)
      4d695acd
    • J
      client rpc: Separate call creation from running IO loop · 400a5a92
      Jiri Denemark 提交于
      This makes it possible to create and queue new calls while we are
      running IO loop.
      (cherry picked from commit c57103e5)
      400a5a92
    • J
      rpc: Add APIs for direct triggering of keepalive timer · e4859677
      Jiri Denemark 提交于
      Add virKeepAliveTimeout and virKeepAliveTrigger APIs that can be used to
      set poll timeouts and trigger keepalive timer. virKeepAliveTrigger
      checks if it is called to early and does nothing in that case.
      (cherry picked from commit 28c75382)
      e4859677
    • J
      rpc: Refactor keepalive timer code · 2c5b4c56
      Jiri Denemark 提交于
      The code that needs to be run every keepalive interval of inactivity was
      only called from a timer and thus from the main event loop. We will need
      to call the code directly from another place.
      (cherry picked from commit a2ba8686)
      2c5b4c56
    • J
      client rpc: Drop unused return value of virNetClientSendNonBlock · 419cb872
      Jiri Denemark 提交于
      As we never drop non-blocking calls, the return value that used to
      indicate a call was dropped is no longer needed.
      (cherry picked from commit ca9b13e3)
      419cb872
    • J
      client rpc: Just queue non-blocking call if another thread has the buck · 4779cf0f
      Jiri Denemark 提交于
      As non-blocking calls are no longer dropped, we don't really need to
      care that much about their fate and wait for the thread with the buck
      to process them. If another thread has the buck, we can just push a
      non-blocking call to the queue and be done with it.
      (cherry picked from commit ef392614)
      4779cf0f
    • J
      client rpc: Don't drop non-blocking calls · 5badf8c4
      Jiri Denemark 提交于
      So far, we were dropping non-blocking calls whenever sending them would
      block. In case a client is sending lots of stream calls (which are not
      supposed to generate any reply), the assumption that having other calls
      in a queue is sufficient to get a reply from the server doesn't work. I
      tried to fix this in b1e374a7 but
      failed and reverted that commit.
      
      With this patch, non-blocking calls are never dropped (unless the
      connection is being closed) and will always be sent.
      (cherry picked from commit 78602c4e)
      5badf8c4
    • J
      client rpc: Use event loop for writing · 8cb0d089
      Jiri Denemark 提交于
      Normally, when every call has a thread associated with it, the thread
      may get the buck and be in charge of sending all calls until its own
      call is done. When we introduced non-blocking calls, we had to add
      special handling of new non-blocking calls. This patch uses event loop
      to send data if there is no thread to get the buck so that any
      non-blocking calls left in the queue are properly sent without having to
      handle them specially. It also avoids adding even more cruft to client
      IO loop in the following patches.
      
      With this change in, non-blocking calls may see unpredictable delays in
      delivery when the client has no event loop registered. However, the only
      non-blocking calls we have are keepalives and we already require event
      loop for them, which makes this a non-issue until someone introduces new
      non-blocking calls.
      (cherry picked from commit 9e747e5c)
      8cb0d089
    • J
      client rpc: Improve debug messages in virNetClientIO · b1dcd198
      Jiri Denemark 提交于
      When analyzing our debug log, I'm always confused about what each of the
      pointers mean. Let's be explicit.
      (cherry picked from commit 71689f95)
      b1dcd198
    • P
      keepalive: Add ability to disable keepalive messages · 6f429469
      Peter Krempa 提交于
      The docs for virConnectSetKeepAlive() advertise that this function
      should be able to disable keepalives on negative or zero interval time.
      
      This patch removes the check that prohibited this and adds code to
      disable keepalives on negative/zero interval.
      
      * src/libvirt.c: virConnectSetKeepAlive(): - remove check for negative
                                                   values
      * src/rpc/virnetclient.c
      * src/rpc/virnetclient.h: - add virNetClientKeepAliveStop() to disable
                                  keepalive messages
      * src/remote/remote_driver.c: remoteSetKeepAlive(): -add ability to
                                                           disable keepalives
      (cherry picked from commit 6446a9e2)
      6f429469
    • C
      Fix daemon auto-spawning · cf640bdf
      Christophe Fergeau 提交于
      Commit 32a9aac2 switched libvirt to use the XDG base directories
      to locate most of its data/config. In particular, the per-user socket
      for qemu:///session is now stored in the XDG runtime directory.
      This directory is located by looking at the XDG_RUNTIME_DIR environment
      variable, with a fallback to ~/.cache/libvirt if this variable is not
      set.
      
      When the daemon is autospawned because a client application wants
      to use qemu:///session, the daemon is ran in a clean environment
      which does not contain XDG_RUNTIME_DIR. It will create its socket
      in ~/.cache/libvirt. If the client application has XDG_RUNTIME_DIR
      set, it will not look for the socket in the fallback place, and will
      fail to connect to the autospawned daemon.
      
      This patch adds XDG_RUNTIME_DIR to the daemon environment before
      auto-starting it. I've done this in virNetSocketForkDaemon rather
      than in virCommandAddEnvPassCommon as I wasn't sure we want to pass
      these variables to other commands libvirt spawns. XDG_CACHE_HOME
      and XDG_CONFIG_HOME are also added to the daemon env as it makes use
      of those as well.
      (cherry picked from commit efe6c802)
      cf640bdf
  2. 15 6月, 2012 3 次提交
    • R
      Fix sync issue in virNetClientStreamEventRemoveCallback · 25a35c9c
      Radu Caragea 提交于
      The stream lock is unlocked twice instead of being locked and then
      unlocked. Probably a typo.
      (cherry picked from commit 107f51b6)
      
      Conflicts:
      
      	AUTHORS
      25a35c9c
    • D
      Fix check for socket existance / daemon spawn · eb6ef1f5
      Daniel P. Berrange 提交于
      When you try to connect to a socket in the abstract namespace,
      the error will be ECONNREFUSED for a non-listening daemon. With
      the non-abstract namespace though, you instead get ENOENT. Add
      a check for this extra errno when auto-spawning the daemon
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      (cherry picked from commit 54c4d9d9)
      eb6ef1f5
    • J
      Revert "rpc: Discard non-blocking calls only when necessary" · d4d87744
      Jiri Denemark 提交于
      This reverts commit b1e374a7, which was
      rather bad since I failed to consider all sides of the issue. The main
      things I didn't consider properly are:
      
      - a thread which sends a non-blocking call waits for the thread with
        the buck to process the call
      - the code doesn't expect non-blocking calls to remain in the queue
        unless they were already partially sent
      
      Thus, the reverted patch actually breaks more than what it fixes and
      clients (which may even be libvirtd during p2p migrations) will likely
      end up in a deadlock.
      (cherry picked from commit 63643f67)
      d4d87744
  3. 27 4月, 2012 1 次提交
    • J
      rpc: Discard non-blocking calls only when necessary · 0129b9ac
      Jiri Denemark 提交于
      Currently, non-blocking calls are either sent immediately or discarded
      in case sending would block. This was implemented based on the
      assumption that the non-blocking keepalive call is not needed as there
      are other calls in the queue which would keep the connection alive.
      However, if those calls are no-reply calls (such as those carrying
      stream data), the remote party knows the connection is alive but since
      we don't get any reply from it, we think the connection is dead.
      
      This is most visible in tunnelled migration. If it happens to be longer
      than keepalive timeout (30s by default), it may be unexpectedly aborted
      because the connection is considered to be dead.
      
      With this patch, we only discard non-blocking calls when the last call
      with a thread is completed and thus there is no thread left to keep
      sending the remaining non-blocking calls.
      0129b9ac
  4. 26 4月, 2012 1 次提交
    • E
      virnetserver: handle sigaction correctly · ac620c2e
      Eric Blake 提交于
      POSIX says that sa_sigaction is only safe to use if sa_flags
      includes SA_SIGINFO; conversely, sa_handler is only safe to
      use when flags excludes that bit.  Gnulib doesn't guarantee
      an implementation of SA_SIGINFO, but does guarantee that
      if SA_SIGINFO is undefined, we can safely define it to 0 as
      long as we don't dereference the 2nd or 3rd argument of
      any handler otherwise registered via sa_sigaction.
      
      Based on a report by Wen Congyang.
      
      * src/rpc/virnetserver.c (SA_SIGINFO): Stub for mingw.
      (virNetServerSignalHandler): Avoid bogus dereference.
      (virNetServerFatalSignal, virNetServerNew): Set flags properly.
      (virNetServerAddSignalHandler): Drop unneeded #ifdef.
      ac620c2e
  5. 16 4月, 2012 1 次提交
  6. 30 3月, 2012 1 次提交
  7. 08 3月, 2012 2 次提交
    • E
      rpc: generalize solution for VPATH builds · 4d2e8355
      Eric Blake 提交于
      Commit 5d4b0c4c tried to fix certain classes of VPATH builds,
      but was too limited.  In particular, Guannan Ren reported:
      
      >    For example: The libvirt source code resides in /home/testuser,
      >                 I make dist in /tmp/buildvpath, the XDR routine .c file will
      >                 include full path of the header file like:
      >
      >                 #include "/home/testuser/src/rpc/virnetprotocol.h"
      >                 #include "internal.h"
      >                 #include <arpa/inet.h>
      >
      >    If we distribute the tarball to another machine to compile,
      >    it will report error as follows:
      >
      >    rpc/virnetprotocol.c:7:59: fatal error:
      >    /home/testuser/src/rpc/virnetprotocol.h: No such file or directory
      
      * src/rpc/genprotocol.pl: Fix more include lines.
      4d2e8355
    • E
      xml: use long long internally, to centralize overflow checks · 73b99771
      Eric Blake 提交于
      On 64-bit platforms, unsigned long and unsigned long long are
      identical, so we don't have to worry about overflow checks.
      On 32-bit platforms, anywhere we narrow unsigned long long back
      to unsigned long, we have to worry about overflow; it's easier
      to do this in one place by having most of the code use the same
      or wider types, and only doing the narrowing at the last minute.
      Therefore, the memory set commands remain unsigned long, and
      the memory get command now centralizes the overflow check into
      libvirt.c, so that drivers don't have to repeat the work.
      
      This also fixes a bug where xen returned the wrong value on
      failure (most APIs return -1 on failure, but getMaxMemory
      must return 0 on failure).
      
      * src/driver.h (virDrvDomainGetMaxMemory): Use long long.
      * src/libvirt.c (virDomainGetMaxMemory): Raise overflow.
      * src/test/test_driver.c (testGetMaxMemory): Fix driver.
      * src/rpc/gendispatch.pl (name_to_ProcName): Likewise.
      * src/xen/xen_hypervisor.c (xenHypervisorGetMaxMemory): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainGetMaxMemory): Likewise.
      * src/xen/xend_internal.c (xenDaemonDomainGetMaxMemory):
      Likewise.
      * src/xen/xend_internal.h (xenDaemonDomainGetMaxMemory):
      Likewise.
      * src/xen/xm_internal.c (xenXMDomainGetMaxMemory): Likewise.
      * src/xen/xm_internal.h (xenXMDomainGetMaxMemory): Likewise.
      * src/xen/xs_internal.c (xenStoreDomainGetMaxMemory): Likewise.
      * src/xen/xs_internal.h (xenStoreDomainGetMaxMemory): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDomainGetMaxMemory):
      Likewise.
      * src/esx/esx_driver.c (esxDomainGetMaxMemory): Likewise.
      * src/libxl/libxl_driver.c (libxlDomainGetMaxMemory): Likewise.
      * src/qemu/qemu_driver.c (qemudDomainGetMaxMemory): Likewise.
      * src/lxc/lxc_driver.c (lxcDomainGetMaxMemory): Likewise.
      * src/uml/uml_driver.c (umlDomainGetMaxMemory): Likewise.
      73b99771
  8. 05 3月, 2012 1 次提交
    • J
      rpc: Fix client crash on connection close · 720bee30
      Jiri Denemark 提交于
      A multi-threaded client with event loop may crash if one of its threads
      closes a connection while event loop is in the middle of sending
      keep-alive message (either request or response). The right place for it
      is inside virNetClientIOEventLoop() between poll() and
      virNetClientLock(). We should only close a connection directly if no-one
      is using it and defer the closing to the last user otherwise. So far we
      only did so if the close was initiated by keep-alive timeout.
      720bee30
  9. 02 3月, 2012 1 次提交
    • E
      build: fix output of pid values · 355ec281
      Eric Blake 提交于
      Nuke the last vestiges of printing pid_t values with the wrong
      types, at least in code compiled on mingw64.  There may be other
      places, but for now they are only compiled on systems where the
      existing %d doesn't trigger gcc warnings.
      
      * src/rpc/virnetsocket.c (virNetSocketNew): Use %lld and casting,
      rather than assuming any particular int type for pid_t.
      * src/util/command.c (virCommandRunAsync, virPidWait)
      (virPidAbort): Likewise.
      (verify): Drop a now stale assertion.
      355ec281
  10. 04 2月, 2012 2 次提交
    • P
      virterror.c: Fix several spelling mistakes · 99d24ab2
      Philipp Hahn 提交于
      compat{a->i}bility
      erron{->e}ous
      nec{c->}essary.
      Either "the" or "a".
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      99d24ab2
    • E
      build: prohibit raw malloc and free · a7cfd709
      Eric Blake 提交于
      Our HACKING discourages use of malloc and free, for at least
      a couple of years now.  But we weren't enforcing it, until now :)
      
      For now, I've exempted python and tests, and will clean those up
      in subsequent patches.  Examples should be permanently exempt,
      since anyone copying our examples won't have use of our
      internal-only memory.h via libvirt_util.la.
      
      * cfg.mk (sc_prohibit_raw_allocation): New rule.
      (exclude_file_name_regexp--sc_prohibit_raw_allocation): and
      exemptions.
      * src/cpu/cpu.c (cpuDataFree): Avoid false positive.
      * src/conf/network_conf.c (virNetworkDNSSrvDefParseXML): Fix
      offenders.
      * src/libxl/libxl_conf.c (libxlMakeDomBuildInfo, libxlMakeVfb)
      (libxlMakeDeviceModelInfo): Likewise.
      * src/rpc/virnetmessage.c (virNetMessageSaveError): Likewise.
      * tools/virsh.c (_vshMalloc, _vshCalloc): Likewise.
      a7cfd709
  11. 02 2月, 2012 1 次提交
    • E
      block rebase: add new API virDomainBlockRebase · 99fd69c3
      Eric Blake 提交于
      Qemu is adding the ability to do a partial rebase.  That is, given:
      
      base <- intermediate <- current
      
      virDomainBlockPull will produce:
      
      current
      
      but qemu now has the ability to leave base in the chain, to produce:
      
      base <- current
      
      Note that current qemu can only do a forward merge, and only with
      the current image as the destination, which is fully described by
      this API without flags.  But in the future, it may be possible to
      enhance this API for additional scenarios by using flags:
      
      Merging the current image back into a previous image (that is,
      undoing a live snapshot), could be done by passing base as the
      destination and flags with a bit requesting a backward merge.
      
      Merging any other part of the image chain, whether forwards (the
      backing image contents are pulled into the newer file) or backwards
      (the deltas recorded in the newer file are merged back into the
      backing file), could also be done by passing a new flag that says
      that base should be treated as an XML snippet rather than an
      absolute path name, where the XML could then supply the additional
      instructions of which part of the image chain is being merged into
      any other part.
      
      * include/libvirt/libvirt.h.in (virDomainBlockRebase): New
      declaration.
      * src/libvirt.c (virDomainBlockRebase): Implement it.
      * src/libvirt_public.syms (LIBVIRT_0.9.10): Export it.
      * src/driver.h (virDrvDomainBlockRebase): New driver callback.
      * src/rpc/gendispatch.pl (long_legacy): Add exemption.
      * docs/apibuild.py (long_legacy_functions): Likewise.
      99fd69c3
  12. 28 1月, 2012 1 次提交
    • M
      Introduce virDomainPMSuspendForDuration API · 8f8b0802
      Michal Privoznik 提交于
      This API allows a domain to be put into one of S# ACPI states.
      Currently, S3 and S4 are supported. These states are shared
      with virNodeSuspendForDuration.
      However, for now we don't support any duration other than zero.
      The same apply for flags.
      8f8b0802
  13. 19 1月, 2012 3 次提交
    • D
      Fix rpc generator to anchor matches for method names · 91f79d27
      Daniel P. Berrange 提交于
      The RPC generator transforms methods matching certain
      patterns like 'id' or 'uuid', etc but does not anchor
      its matches to the end of the word. So if a method
      contains 'id' in the middle (eg virIdentity) then the
      RPC generator munges that.
      
      * src/rpc/gendispatch.pl: Anchor matches
      91f79d27
    • D
      Rename APIs for fetching UNIX socket credentials · 2f9dc36d
      Daniel P. Berrange 提交于
      To avoid a namespace clash with forthcoming identity APIs,
      rename the virNet*GetLocalIdentity() APIs to have the form
      virNet*GetUNIXIdentity()
      
      * daemon/remote.c, src/libvirt_private.syms: Update
        for renamed APIs
      * src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h,
        src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: s/LocalIdentity/UNIXIdentity/
      2f9dc36d
    • D
      Also retrieve GID from SO_PEERCRED · 59cf0398
      Daniel P. Berrange 提交于
      * daemon/remote.c, src/rpc/virnetserverclient.c,
        src/rpc/virnetserverclient.h, src/rpc/virnetsocket.c,
        src/rpc/virnetsocket.h: Add gid parameter
      59cf0398
  14. 12 1月, 2012 1 次提交
    • M
      stream: Check for stream EOF · 833b901c
      Michal Privoznik 提交于
      If client stream does not have any data to sink and neither received
      EOF, a dummy packet is sent to the daemon signalising client is ready to
      sink some data. However, after we added event loop to client a race may
      occur:
      
      Thread 1 calls virNetClientStreamRecvPacket and since no data are cached
      nor stream has EOF, it decides to send dummy packet to server which will
      sent some data in turn. However, during this decision and actual message
      exchange with server -
      
      Thread 2 receives last stream data from server. Therefore an EOF is set
      on stream and if there is a call waiting (which is not yet) it is woken
      up. However, Thread 1 haven't sent anything so far, so there is no call
      to be woken up. So this thread sent dummy packet to daemon, which
      ignores that as no stream is associated with such packet and therefore
      no reply will ever come.
      
      This race causes client to hang indefinitely.
      833b901c
  15. 20 12月, 2011 1 次提交
    • E
      rpc: handle param_int, plug memory leaks · 4e394dea
      Eric Blake 提交于
      The RPC code had several latent memory leaks and an attempt to
      free the wrong string, but thankfully nothing triggered them
      (blkiotune was the only one returning a string, and always as
      the last parameter).  Also, our cleanups for rpcgen ended up
      nuking a line of code that renders VIR_TYPED_PARAM_INT broken,
      because it was the only use of 'i' in a function, even though
      it was a member usage rather than a standalone declaration.
      
      * daemon/remote.c (remoteSerializeTypedParameters): Free the
      correct array element.
      (remoteDispatchDomainGetSchedulerParameters)
      (remoteDispatchDomainGetSchedulerParametersFlags)
      (remoteDispatchDomainBlockStatsFlags)
      (remoteDispatchDomainGetMemoryParameters): Don't leak strings.
      * src/rpc/genprotocol.pl: Don't nuke member-usage of 'buf' or 'i'.
      4e394dea
  16. 08 12月, 2011 2 次提交
    • D
      Fix updating of haveTheBuck in RPC client to be race-free · e9708637
      Daniel P. Berrange 提交于
      When one thread passes the buck to another thread, it uses
      virCondSignal to wake up the target thread. The variable
      'haveTheBuck' is not updated in a race-free manner when
      this occurs. The current thread sets it to false, and the
      woken up thread sets it to true. There is a window where
      a 3rd thread can come in and grab the buck.
      
      Even if this didn't lead to crashes & deadlocks, this would
      still result in unfairness in the buckpassing algorithm.
      
      A better solution is to *never* set haveTheBuck to false
      when we're passing the buck. Only set it to false when there
      is no further thread waiting for the buck.
      
      * src/rpc/virnetclient.c: Only set haveTheBuck to false
        if no thread is waiting
      e9708637
    • D
      Revert fd066925 · 50a4f49c
      Daniel P. Berrange 提交于
      Commit fd066925 tried to fix
      a race condition in
      
        commit fa959500
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Fri Nov 11 15:28:41 2011 +0000
      
          Explicitly track whether the buck is held in remote client
      
      Unfortunately there is a second race condition whereby the
      event loop can trigger due to incoming data to read. Revert
      this fix, so a complete fix for the problem can be cleanly
      applied
      
      * src/rpc/virnetclient.c: Revert fd066925
      50a4f49c
  17. 07 12月, 2011 1 次提交
    • D
      Improve error reporting when libvirtd is not installed · 13c881dc
      Daniel P. Berrange 提交于
      Currently if you try to connect to a local libvirtd when
      libvirtd is not in $PATH, you'll get an error
      
        error: internal error invalid use of command API
      
      This is because remoteFindDaemonPath() returns NULL, which
      causes us to pass NULL into virNetSocketConnectUNIX which
      in turn causes us to pass NULL into virCommandNewArgList.
      
      Adding missing error checks improves this to
      
        error: internal error Unable to locate libvirtd daemon in $PATH
      
      * src/remote/remote_driver.c: Report error if libvirtd
        cannot be found
      * src/rpc/virnetsocket.c: Report error if caller requested
        spawning of daemon, but provided no binary path
      13c881dc
  18. 04 12月, 2011 2 次提交
    • E
      maint: fix improper use of 'an' · 3a9ce767
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=648855 mentioned a
      misuse of 'an' where 'a' is proper; that has since been fixed,
      but a search found other problems (some were a spelling error for
      'and', while most were fixed by 'a').
      
      * daemon/stream.c: Fix grammar.
      * src/conf/domain_conf.c: Likewise.
      * src/conf/domain_event.c: Likewise.
      * src/esx/esx_driver.c: Likewise.
      * src/esx/esx_vi.c: Likewise.
      * src/rpc/virnetclient.c: Likewise.
      * src/rpc/virnetserverprogram.c: Likewise.
      * src/storage/storage_backend_fs.c: Likewise.
      * src/util/conf.c: Likewise.
      * src/util/dnsmasq.c: Likewise.
      * src/util/iptables.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * src/xen/xs_internal.c: Likewise.
      * tools/virsh.c: Likewise.
      3a9ce767
    • E
      build: fix build on Cygwin · c74a2a03
      Eric Blake 提交于
      The RPC fixups needed on Linux are also needed on cygwin, and
      worked without further tweaking to the list of fixups.  Also,
      unlike BSD, Cygwin exports 'struct ifreq', but unlike Linux,
      Cygwin lacks the ioctls that we were using 'struct ifreq' to
      access.  This patch allows compilation under cygwin.
      
      * src/rpc/genprotocol.pl: Also perform fixups on cygwin.
      * src/util/virnetdev.c (HAVE_STRUCT_IFREQ): Also require AF_PACKET
      definition.
      * src/util/virnetdevbridge.c (virNetDevSetupControlFull): Only
      compile if SIOCBRADDBR works.
      c74a2a03
  19. 02 12月, 2011 1 次提交
    • P
      client: Check if other thread claims it has the buck before claiming it. · fd066925
      Peter Krempa 提交于
      Originaly, the code checked if another client is the queue and infered
      ownership of the buck from that. Commit fa959500
      added a separate variable to track the buck. That caused, that a new
      call might enter claiming it has the buck, while another thread was
      signalled to take the buck. This ends in two threads claiming they hold
      the buck and entering poll(). This happens due to a race on waking up
      threads on the client lock mutex.
      
      This caused multi-threaded clients to hang, most prominently visible and
      reproducible on python based clients, like virt-manager.
      
      This patch causes threads, that have been signalled to take the buck to
      re-check if buck is held by another thread.
      fd066925
  20. 01 12月, 2011 1 次提交