Re: [libvirt] only 256 active networks

2012-09-29 Thread Laine Stump
On 09/29/2012 04:22 PM, Dan Kenigsberg wrote: > Hi List, Laine, > > Maybe you can help here. > > We define 256 bridged networks such as > > > vdsm-test244 > c3acd4c3-37be-3f9d-ee6b-317513015f9e > > > > > and end up killing `virsh net-list` with > > error: Fai

Re: [libvirt] Potential race condition problem

2012-09-29 Thread Guannan Ren
On 09/29/2012 09:06 PM, Benjamin Wang (gendwang) wrote: > > Hi, > > I think you misunderstand my meaning. My solution includes step1 + > step2. Step1 is used to implement thread mutex. Step2 is used to > > handle “initialized” visibility. Without step2, the initialization > could be executed severa

Re: [libvirt] [PATCH] Fix (rare) deadlock in QEMU monitor callbacks

2012-09-29 Thread Richard W.M. Jones
On Sat, Sep 29, 2012 at 08:30:10PM +0100, Richard W.M. Jones wrote: > On Wed, Sep 26, 2012 at 03:56:52PM +0100, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > Some users report (very rarely) seeing a deadlock in the QEMU > > monitor callbacks > > This is actually not rare. I h

[libvirt] only 256 active networks

2012-09-29 Thread Dan Kenigsberg
Hi List, Laine, Maybe you can help here. We define 256 bridged networks such as vdsm-test244 c3acd4c3-37be-3f9d-ee6b-317513015f9e and end up killing `virsh net-list` with error: Failed to list active networks error: too many remote undefineds: 257 >

Re: [libvirt] Two core dumps are generated in multi-thread scenarios

2012-09-29 Thread Matthias Bolte
2012/9/23 Benjamin Wang (gendwang) : > Hi, > I found two core dumps generated in multi-thread scenarios in ESX part. > > Case1: libcurl support multi-thread > core dump: > #12 0x2aaabea89712 in addbyter () from /usr/local/lib/libcurl.so.4 > #13 0x2aaabea89b86 in dprintf_formatf () from >

[libvirt] [PATCH] esx: Disable libcurl's use of signals to fix a segfault

2012-09-29 Thread Matthias Bolte
libcurl uses a SIGALRM in combination with sigsetjmp/siglongjmp to be able to abort a DNS lookup when it takes too long. The problem with this in a multi-threaded application is that the signal handler for SIGALRM and the call to siglongjmp can be executed on a thread that is different from the one

Re: [libvirt] [PATCH] Fix (rare) deadlock in QEMU monitor callbacks

2012-09-29 Thread Richard W.M. Jones
On Wed, Sep 26, 2012 at 03:56:52PM +0100, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Some users report (very rarely) seeing a deadlock in the QEMU > monitor callbacks This is actually not rare. I hit it again today, twice, and I can ~50% reliably reproduce it using the parallel

Re: [libvirt] [PATCH] hyperv: Fix and improve hypervListAllDomains

2012-09-29 Thread Matthias Bolte
2012/9/10 Michal Privoznik : > On 09.09.2012 17:42, Matthias Bolte wrote: >> Use MATCH for all flags checks. >> >> hypervMsvmComputerSystemToDomain expects the domain pointer to the >> initialized to NULL. >> >> All items in doms up to the count-th one are valid, no need to double >> check before f

Re: [libvirt] [PATCH v3] esx: Support VLAN tags in virtual network port groups

2012-09-29 Thread Matthias Bolte
2012/9/9 Matthias Bolte : > --- > > v2: Use network level VLAN config if there is no portgroup specific VLAN > config given. > > v3: Add ESX_VLAN_TRUNK define for magic number 4095 > > src/esx/esx_network_driver.c | 70 > +++--- > 1 files changed, 65 inse

Re: [libvirt] [PATCH v2] esx: Fix and improve esxListAllDomains function

2012-09-29 Thread Matthias Bolte
2012/9/10 Peter Krempa : > On 09/09/12 17:55, Matthias Bolte wrote: >> >> Avoid requesting information such as identity or power state when it >> is not necessary. >> >> Lookup virtual machine list with the required fields (configStatus, >> name, and config.uuid) to make esxVI_GetVirtualMachineIden

[libvirt] Core dump caused by misusing openssl in multithread scenario!

2012-09-29 Thread Benjamin Wang (gendwang)
Hi, I am running libvirt with ESXi driver in multithread scenario to access ESXi by https. Sometimes a core dump will be generated as following: #0 0x003f9b030265 in raise () from /lib64/libc.so.6 #1 0x003f9b031d10 in abort () from /lib64/libc.so.6 #2 0x003f9b06a84b in __libc_mess

Re: [libvirt] Potential race condition problem

2012-09-29 Thread Benjamin Wang (gendwang)
Hi, I think you misunderstand my meaning. My solution includes step1 + step2. Step1 is used to implement thread mutex. Step2 is used to handle “initialized” visibility. Without step2, the initialization could be executed several times. B.R. Benjamin Wang From: Guannan Ren [mailto:g...@redhat.co

Re: [libvirt] Potential race condition problem

2012-09-29 Thread Guannan Ren
On 09/29/2012 03:52 PM, Benjamin Wang (gendwang) wrote: > > Hi, > > OK. Now I am using JNA to access libvirt. If we add another mutex > which used to access “initialized” parameter. This mutex must be > pthread_mutex_init firstly and only once. > > But it seems that there is no way to change libvir

Re: [libvirt] Potential race condition problem

2012-09-29 Thread Benjamin Wang (gendwang)
Hi, OK. Now I am using JNA to access libvirt. If we add another mutex which used to access “initialized” parameter. This mutex must be pthread_mutex_init firstly and only once. But it seems that there is no way to change libvirt code. I do it as following: 1. Changing libvirt JNA code in Co

Re: [libvirt] Potential race condition problem

2012-09-29 Thread Guannan Ren
On 09/29/2012 03:07 PM, Benjamin Wang (gendwang) wrote: Hi, Currently virInitialize() method defined in libvirt.c has the following code: int virInitialize(void) { if (initialized) return 0; initialized = 1; if (virThreadInitialize() < 0 || virErrorInitialize()

[libvirt] Potential race condition problem

2012-09-29 Thread Benjamin Wang (gendwang)
Hi, Currently virInitialize() method defined in libvirt.c has the following code: int virInitialize(void) { if (initialized) return 0; initialized = 1; if (virThreadInitialize() < 0 || virErrorInitialize() < 0 || virRandomInitialize(time(NULL) ^ getpid()) ||