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

Re: [libvirt] Libvir JNA report SIGSEGV



Hi,
  Actually I also did another test as following. When I comment the "new Connet", the program works well. So this is the problem related to
Libvirt JNA. If I manually run the garbage collection for this program, it still works well. But if I run the garbage collection for the last problem,
It will crash. I guess this problem is caused by ConnectAuth callback. When garbage collection is executed, the callback memory is moved.

B.R.
Benjamin Wang


>     public static void testcase1() throws LibvirtException
>     {         
>         while(true)
>         {
>         	int[] array = new int[100000000];
>         	
>         	try
>         	{
>         		Thread.sleep(1000);
>         	}
>         	catch(Exception e){}
>         }
>     }
-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com] 
Sent: 2012年9月6日 16:53
To: Benjamin Wang (gendwang)
Cc: libvir-list redhat com
Subject: Re: [libvirt] Libvir JNA report SIGSEGV

On Thu, Sep 06, 2012 at 07:53:24AM +0000, Benjamin Wang (gendwang) wrote:
> Hi,
>    The problem only occurs in JNA part. The pure c libvirt works well.  
> Even If I only create a connection outside of the loop, the problem 
> can still happen. The following is the easiest problem to reproduce 
> this problem
> 
>     public static void testcase1() throws LibvirtException
>     {
>         Connect conn=null;
>         
>         //connect to the hypervisor
>         conn = new 
> Connect("esx://10.74.125.69:443/?no_verify=1&transport=https", new 
> ConnectAuthDefault(), 0);
>         
>         while(true)
>         {
>         	int[] array = new int[100000000];
>         	
>         	try
>         	{
>         		Thread.sleep(1000);
>         	}
>         	catch(Exception e){}
>         }
>     }

  Then it's a java bug. The loop doesn't call or use libvirt in any way.
If it crashes in the loop it's java crashing to me !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library  http://libvirt.org/


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