qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] port io mem leak
@ 2012-02-29 16:16 Michael S. Tsirkin
  2012-02-29 16:18 ` Anthony Liguori
  0 siblings, 1 reply; 7+ messages in thread
From: Michael S. Tsirkin @ 2012-02-29 16:16 UTC (permalink / raw)
  To: avi, Anthony Liguori, qemu-devel

Valgrind shows a memory leak below:

==21745== 208 (112 direct, 96 indirect) bytes in 2 blocks are definitely
lost in loss record 588 of 856
==21745==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
==21745==    by 0x24D4C5: malloc_and_trace (vl.c:2156)
==21745==    by 0x50637D2: g_malloc (in /lib64/libglib-2.0.so.0.2200.5)
==21745==    by 0x21A519: isa_register_portio_list (isa-bus.c:102)
==21745==    by 0x210DF7: ide_init_ioport (core.c:1993)
==21745==    by 0x2169EF: pci_piix_ide_initfn (piix.c:137)
==21745==    by 0x2269DD: pci_qdev_init (pci.c:1492)
==21745==    by 0x274839: qdev_init (qdev.c:150)
==21745==    by 0x27491C: qdev_init_nofail (qdev.c:243)
==21745==    by 0x225DD7: pci_create_simple_multifunction (pci.c:1552)
==21745==    by 0x216C7E: pci_piix3_ide_init (piix.c:224)
==21745==    by 0x3380A6: pc_init1 (pc_piix.c:257)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] port io mem leak
  2012-02-29 16:16 [Qemu-devel] port io mem leak Michael S. Tsirkin
@ 2012-02-29 16:18 ` Anthony Liguori
  2012-02-29 16:20   ` Michael S. Tsirkin
  2012-02-29 16:36   ` Avi Kivity
  0 siblings, 2 replies; 7+ messages in thread
From: Anthony Liguori @ 2012-02-29 16:18 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: avi, qemu-devel

On 02/29/2012 10:16 AM, Michael S. Tsirkin wrote:
> Valgrind shows a memory leak below:

Is this with Avi's latest branch or is this in qemu.git?

Regards,

Anthony Liguori

>
> ==21745== 208 (112 direct, 96 indirect) bytes in 2 blocks are definitely
> lost in loss record 588 of 856
> ==21745==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
> ==21745==    by 0x24D4C5: malloc_and_trace (vl.c:2156)
> ==21745==    by 0x50637D2: g_malloc (in /lib64/libglib-2.0.so.0.2200.5)
> ==21745==    by 0x21A519: isa_register_portio_list (isa-bus.c:102)
> ==21745==    by 0x210DF7: ide_init_ioport (core.c:1993)
> ==21745==    by 0x2169EF: pci_piix_ide_initfn (piix.c:137)
> ==21745==    by 0x2269DD: pci_qdev_init (pci.c:1492)
> ==21745==    by 0x274839: qdev_init (qdev.c:150)
> ==21745==    by 0x27491C: qdev_init_nofail (qdev.c:243)
> ==21745==    by 0x225DD7: pci_create_simple_multifunction (pci.c:1552)
> ==21745==    by 0x216C7E: pci_piix3_ide_init (piix.c:224)
> ==21745==    by 0x3380A6: pc_init1 (pc_piix.c:257)
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] port io mem leak
  2012-02-29 16:18 ` Anthony Liguori
@ 2012-02-29 16:20   ` Michael S. Tsirkin
  2012-02-29 16:36   ` Avi Kivity
  1 sibling, 0 replies; 7+ messages in thread
From: Michael S. Tsirkin @ 2012-02-29 16:20 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: avi, qemu-devel

On Wed, Feb 29, 2012 at 10:18:23AM -0600, Anthony Liguori wrote:
> On 02/29/2012 10:16 AM, Michael S. Tsirkin wrote:
> >Valgrind shows a memory leak below:
> 
> Is this with Avi's latest branch or is this in qemu.git?
> 
> Regards,
> 
> Anthony Liguori

Avi's latest branch.

> >
> >==21745== 208 (112 direct, 96 indirect) bytes in 2 blocks are definitely
> >lost in loss record 588 of 856
> >==21745==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
> >==21745==    by 0x24D4C5: malloc_and_trace (vl.c:2156)
> >==21745==    by 0x50637D2: g_malloc (in /lib64/libglib-2.0.so.0.2200.5)
> >==21745==    by 0x21A519: isa_register_portio_list (isa-bus.c:102)
> >==21745==    by 0x210DF7: ide_init_ioport (core.c:1993)
> >==21745==    by 0x2169EF: pci_piix_ide_initfn (piix.c:137)
> >==21745==    by 0x2269DD: pci_qdev_init (pci.c:1492)
> >==21745==    by 0x274839: qdev_init (qdev.c:150)
> >==21745==    by 0x27491C: qdev_init_nofail (qdev.c:243)
> >==21745==    by 0x225DD7: pci_create_simple_multifunction (pci.c:1552)
> >==21745==    by 0x216C7E: pci_piix3_ide_init (piix.c:224)
> >==21745==    by 0x3380A6: pc_init1 (pc_piix.c:257)
> >

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] port io mem leak
  2012-02-29 16:18 ` Anthony Liguori
  2012-02-29 16:20   ` Michael S. Tsirkin
@ 2012-02-29 16:36   ` Avi Kivity
  2012-02-29 16:39     ` Michael S. Tsirkin
  1 sibling, 1 reply; 7+ messages in thread
From: Avi Kivity @ 2012-02-29 16:36 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel, Michael S. Tsirkin

On 02/29/2012 06:18 PM, Anthony Liguori wrote:
> On 02/29/2012 10:16 AM, Michael S. Tsirkin wrote:
>> Valgrind shows a memory leak below:
>
> Is this with Avi's latest branch or is this in qemu.git?

Looks like qemu.git.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] port io mem leak
  2012-02-29 16:36   ` Avi Kivity
@ 2012-02-29 16:39     ` Michael S. Tsirkin
  2012-02-29 16:40       ` Michael S. Tsirkin
  2012-02-29 16:41       ` Avi Kivity
  0 siblings, 2 replies; 7+ messages in thread
From: Michael S. Tsirkin @ 2012-02-29 16:39 UTC (permalink / raw)
  To: Avi Kivity; +Cc: qemu-devel, Anthony Liguori

On Wed, Feb 29, 2012 at 06:36:10PM +0200, Avi Kivity wrote:
> On 02/29/2012 06:18 PM, Anthony Liguori wrote:
> > On 02/29/2012 10:16 AM, Michael S. Tsirkin wrote:
> >> Valgrind shows a memory leak below:
> >
> > Is this with Avi's latest branch or is this in qemu.git?
> 
> Looks like qemu.git.

This is a merge of your for-mst and my bridge patches.
Take a look at 'valgrind' branch on my github tree
if you like:
https://github.com/mstsirkin/qemu.git

> -- 
> error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] port io mem leak
  2012-02-29 16:39     ` Michael S. Tsirkin
@ 2012-02-29 16:40       ` Michael S. Tsirkin
  2012-02-29 16:41       ` Avi Kivity
  1 sibling, 0 replies; 7+ messages in thread
From: Michael S. Tsirkin @ 2012-02-29 16:40 UTC (permalink / raw)
  To: Avi Kivity; +Cc: qemu-devel, Anthony Liguori

On Wed, Feb 29, 2012 at 06:39:25PM +0200, Michael S. Tsirkin wrote:
> On Wed, Feb 29, 2012 at 06:36:10PM +0200, Avi Kivity wrote:
> > On 02/29/2012 06:18 PM, Anthony Liguori wrote:
> > > On 02/29/2012 10:16 AM, Michael S. Tsirkin wrote:
> > >> Valgrind shows a memory leak below:
> > >
> > > Is this with Avi's latest branch or is this in qemu.git?
> > 
> > Looks like qemu.git.
> 
> This is a merge of your for-mst and my bridge patches.
> Take a look at 'valgrind' branch on my github tree
> if you like:
> https://github.com/mstsirkin/qemu.git

Sorry
https://github.com/mstsirkin/qemu

> > -- 
> > error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] port io mem leak
  2012-02-29 16:39     ` Michael S. Tsirkin
  2012-02-29 16:40       ` Michael S. Tsirkin
@ 2012-02-29 16:41       ` Avi Kivity
  1 sibling, 0 replies; 7+ messages in thread
From: Avi Kivity @ 2012-02-29 16:41 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: qemu-devel, Anthony Liguori

On 02/29/2012 06:39 PM, Michael S. Tsirkin wrote:
> On Wed, Feb 29, 2012 at 06:36:10PM +0200, Avi Kivity wrote:
> > On 02/29/2012 06:18 PM, Anthony Liguori wrote:
> > > On 02/29/2012 10:16 AM, Michael S. Tsirkin wrote:
> > >> Valgrind shows a memory leak below:
> > >
> > > Is this with Avi's latest branch or is this in qemu.git?
> > 
> > Looks like qemu.git.
>
> This is a merge of your for-mst and my bridge patches.
> Take a look at 'valgrind' branch on my github tree
> if you like:
>

The bug is present in qemu.git, my patches don't touch it:

void isa_register_portio_list(ISADevice *dev, uint16_t start,
                              const MemoryRegionPortio *pio_start,
                              void *opaque, const char *name)
{
    PortioList *piolist = g_new(PortioList, 1);

^ leaked


    /* START is how we should treat DEV, regardless of the actual
       contents of the portio array.  This is how the old code
       actually handled e.g. the FDC device.  */
    isa_init_ioport(dev, start);

    portio_list_init(piolist, pio_start, opaque, name);
    portio_list_add(piolist, isabus->address_space_io, start);
}

It's only a problem if we allow unplug, which we shouldn't for these
devices.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-02-29 16:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-29 16:16 [Qemu-devel] port io mem leak Michael S. Tsirkin
2012-02-29 16:18 ` Anthony Liguori
2012-02-29 16:20   ` Michael S. Tsirkin
2012-02-29 16:36   ` Avi Kivity
2012-02-29 16:39     ` Michael S. Tsirkin
2012-02-29 16:40       ` Michael S. Tsirkin
2012-02-29 16:41       ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).