qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Roman Bolshakov <r.bolshakov@yadro.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Gerd Hoffmann" <kraxel@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	qemu-devel@nongnu.org,
	"Niek Linnenbank" <nieklinnenbank@gmail.com>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Anthony PERARD" <anthony.perard@citrix.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH v3 00/74] qom: Automated conversion of type checking boilerplate
Date: Wed, 26 Aug 2020 20:06:24 +0300	[thread overview]
Message-ID: <20200826170624.GB16356@SPB-NB-133.local> (raw)
In-Reply-To: <20200826111815.GV642093@habkost.net>

On Wed, Aug 26, 2020 at 07:18:15AM -0400, Eduardo Habkost wrote:
> On Wed, Aug 26, 2020 at 01:22:38PM +0300, Roman Bolshakov wrote:
> > On Tue, Aug 25, 2020 at 03:19:56PM -0400, Eduardo Habkost wrote:
> > > git tree for this series:
> > > https://github.com/ehabkost/qemu-hacks/tree/work/qom-macros-autoconvert
> > > 
> > 
> > Hi Eduardo,
> > 
> > another assert fires during QEMU start:
> > 
> > $ lldb -- $QEMU -cpu nahelem -M q35,accel=hvf -cdrom test.iso
> > (lldb) target create "[...]/qemu/build/qemu-system-x86_64"
> > Current executable set to '[...]/qemu/build/qemu-system-x86_64' (x86_64).
> > (lldb) settings set -- target.run-args  "-cpu" "nahelem" "-M" "q35,accel=hvf" "-cdrom" "test.iso"
> > (lldb) r
> > Process 92411 launched: '[...]/qemu/build/qemu-system-x86_64' (x86_64)
> > **
> > ERROR:../qom/object.c:505:object_initialize_with_type: assertion failed: (size >= type->instance_size)
> > Bail out! ERROR:../qom/object.c:505:object_initialize_with_type: assertion failed: (size >= type->instance_size)
> > Process 92411 stopped
> > * thread #3, stop reason = signal SIGABRT
> >     frame #0: 0x00007fff6a75e33a libsystem_kernel.dylib`__pthread_kill + 10
> > libsystem_kernel.dylib`__pthread_kill:
> > ->  0x7fff6a75e33a <+10>: jae    0x7fff6a75e344            ; <+20>
> >     0x7fff6a75e33c <+12>: movq   %rax, %rdi
> >     0x7fff6a75e33f <+15>: jmp    0x7fff6a758629            ; cerror_nocancel
> >     0x7fff6a75e344 <+20>: retq
> > Target 0: (qemu-system-x86_64) stopped.
> > (lldb) bt
> > * thread #3, stop reason = signal SIGABRT
> >   * frame #0: 0x00007fff6a75e33a libsystem_kernel.dylib`__pthread_kill + 10
> >     frame #1: 0x00007fff6a81ae60 libsystem_pthread.dylib`pthread_kill + 430
> >     frame #2: 0x00007fff6a6e5808 libsystem_c.dylib`abort + 120
> >     frame #3: 0x0000000101314c36 libglib-2.0.0.dylib`g_assertion_message + 406
> >     frame #4: 0x0000000101314c9e libglib-2.0.0.dylib`g_assertion_message_expr + 94
> >     frame #5: 0x0000000100366f0c qemu-system-x86_64`object_initialize_with_type(obj=<unavailable>, size=<unavailable>, type=<unavailable>) at object.c:505:5 [opt]
> >     frame #6: 0x0000000100400e48 qemu-system-x86_64`qbus_create_inplace(bus=0x0000000000000000, size=<unavailable>, typename=<unavailable>, parent=0x0000000000000000, name="main-system-bus") at bus.c:153:5 [opt]
> >     frame #7: 0x000000010006800a qemu-system-x86_64`sysbus_get_default [inlined] main_system_bus_create at sysbus.c:346:5 [opt]
> >     frame #8: 0x0000000100067fe2 qemu-system-x86_64`sysbus_get_default at sysbus.c:354 [opt]
> >     frame #9: 0x00000001002b774f qemu-system-x86_64`qemu_init(argc=<unavailable>, argv=<unavailable>, envp=<unavailable>) at vl.c:3890:41 [opt]
> >     frame #10: 0x0000000100008c99 qemu-system-x86_64`qemu_main(argc=<unavailable>, argv=<unavailable>, envp=<unavailable>) at main.c:49:5 [opt]
> >     frame #11: 0x000000010007bbd6 qemu-system-x86_64`call_qemu_main(opaque=<unavailable>) at cocoa.m:1710:14 [opt]
> >     frame #12: 0x00000001004631ee qemu-system-x86_64`qemu_thread_start(args=<unavailable>) at qemu-thread-posix.c:521:9 [opt]
> >     frame #13: 0x00007fff6a81b109 libsystem_pthread.dylib`_pthread_start + 148
> >     frame #14: 0x00007fff6a816b8b libsystem_pthread.dylib`thread_start + 15
> > (lldb) f 7
> > qemu-system-x86_64 was compiled with optimization - stepping may behave oddly; variables may not be available.
> > frame #7: 0x000000010006800a qemu-system-x86_64`sysbus_get_default [inlined] main_system_bus_create at sysbus.c:346:5 [opt]
> >    343      /* assign main_system_bus before qbus_create_inplace()
> >    344       * in order to make "if (bus != sysbus_get_default())" work */
> >    345      main_system_bus = g_malloc0(system_bus_info.instance_size);
> > -> 346      qbus_create_inplace(main_system_bus, system_bus_info.instance_size,
> >    347                          TYPE_SYSTEM_BUS, NULL, "main-system-bus");
> >    348      OBJECT(main_system_bus)->free = g_free;
> >    349  }
> > (lldb) f 6
> > frame #6: 0x0000000100400e48 qemu-system-x86_64`qbus_create_inplace(bus=0x0000000000000000, size=<unavailable>, typename=<unavailable>, parent=0x0000000000000000, name="main-system-bus") at bus.c:153:5 [opt]
> >    150  void qbus_create_inplace(void *bus, size_t size, const char *typename,
> >    151                           DeviceState *parent, const char *name)
> >    152  {
> > -> 153      object_initialize(bus, size, typename);
> >    154      qbus_init(bus, parent, name);
> >    155  }
> >    156
> > (lldb) f 5
> > frame #5: 0x0000000100366f0c qemu-system-x86_64`object_initialize_with_type(obj=<unavailable>, size=<unavailable>, type=<unavailable>) at object.c:505:5 [opt]
> >    502
> >    503      g_assert(type->instance_size >= sizeof(Object));
> >    504      g_assert(type->abstract == false);
> > -> 505      g_assert(size >= type->instance_size);
> >    506
> >    507      memset(obj, 0, type->instance_size);
> >    508      obj->class = type->class;
> 
> Oops, sorry for not catching this before submitting.  This is
> caused by patch 72/74, which is not really important right now.
> I will drop it from the series by now.
> 
> I've pushed the new tree to
> https://github.com/ehabkost/qemu-hacks/tree/work/qom-macros-autoconvert
> 

This one is good. For the series (without trying individual commits in
the middle):
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com>

There's a test failure due to missing qemu-nbd on macOS but the fix is
already queued.

Thanks,
Roman


  reply	other threads:[~2020-08-26 17:07 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 19:19 [PATCH v3 00/74] qom: Automated conversion of type checking boilerplate Eduardo Habkost
2020-08-25 19:19 ` [PATCH v3 01/74] e1000: Rename QOM class cast macros Eduardo Habkost
2020-08-25 19:19 ` [PATCH v3 02/74] megasas: " Eduardo Habkost
2020-08-25 19:19 ` [PATCH v3 03/74] vmw_pvscsi: " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 04/74] pl110: Rename pl110_version enum values Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 05/74] allwinner-h3: Rename memmap enum constants Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 06/74] aspeed_soc: Rename memmap/irqmap " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 07/74] opentitan: Rename memmap " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 08/74] sifive_e: " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 09/74] sifive_u: " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 10/74] aspeed_timer: Fix ASPEED_TIMER macro definition Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 11/74] versatile: Fix typo in PCI_VPB_HOST definition Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 12/74] virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 13/74] hvf: Add missing include Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 14/74] hcd-dwc2: Rename USB_*CLASS macros for consistency Eduardo Habkost
2020-08-26  5:10   ` Gerd Hoffmann
2020-08-25 19:20 ` [PATCH v3 15/74] tulip: Move TulipState typedef to header Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 16/74] throttle-groups: Move ThrottleGroup " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 17/74] pci: Move PCIBusClass typedef to pci.h Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 18/74] i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 19/74] hvf: Move HVFState typedef to hvf.h Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 20/74] mcf_fec: Move mcf_fec_state typedef to header Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 21/74] s390_flic: Move KVMS390FLICState " Eduardo Habkost
2020-08-27  8:08   ` Thomas Huth
2020-08-25 19:20 ` [PATCH v3 22/74] can_emu: Delete macros for non-existing typedef Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 23/74] nubus: Delete unused NUBUS_BRIDGE macro Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 24/74] platform-bus: Delete macros for non-existing typedef Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 25/74] armsse: Rename QOM macros to avoid conflicts Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 26/74] xen-legacy-backend: Add missing typedef XenLegacyDevice Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 27/74] spapr: Move typedef SpaprMachineState to spapr.h Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 28/74] s390x: Move typedef SCLPEventFacility to event-facility.h Eduardo Habkost
2020-08-27  8:07   ` Thomas Huth
2020-08-25 19:20 ` [PATCH v3 29/74] vhost-user-gpu: Move QOM macro to header Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 30/74] ahci: Move QOM macros " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 31/74] i8257: Move QOM macro " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 32/74] ahci: " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 33/74] pckbd: " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 34/74] vmbus: Move QOM macros to vmbus.h Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 35/74] virtio-serial-bus: Move QOM macros to header Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 36/74] piix: " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 37/74] auxbus: " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 38/74] rocker: " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 39/74] pxa2xx: " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 40/74] mptsas: " Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 41/74] kvm: Move QOM macros to kvm.h Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 42/74] vfio/pci: Move QOM macros to header Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 43/74] nubus: Rename class type checking macros Eduardo Habkost
2020-08-26 10:18   ` Laurent Vivier
2020-08-25 19:20 ` [PATCH v3 44/74] imx_ccm: Rename IMX_GET_CLASS macro Eduardo Habkost
2020-08-31 18:45   ` Peter Maydell
2020-08-25 19:20 ` [PATCH v3 45/74] mos6522: Rename QOM macros Eduardo Habkost
2020-08-31 18:46   ` Peter Maydell
2020-08-25 19:20 ` [PATCH v3 46/74] x86-iommu: Rename QOM type macros Eduardo Habkost
2020-08-31 19:02   ` Peter Xu
2020-08-25 19:20 ` [PATCH v3 47/74] rdma: Rename INTERFACE_RDMA_PROVIDER_CLASS macro Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 48/74] s390-virtio-ccw: Rename S390_MACHINE_CLASS macro Eduardo Habkost
2020-08-26  7:16   ` Cornelia Huck
2020-08-25 19:20 ` [PATCH v3 49/74] swim: Rename struct SWIM to Swim Eduardo Habkost
2020-08-26 10:19   ` Laurent Vivier
2020-08-25 19:20 ` [PATCH v3 50/74] migration: Rename class type checking macros Eduardo Habkost
2020-08-26  7:59   ` Juan Quintela
2020-08-25 19:20 ` [PATCH v3 51/74] arm: Fix typo in AARCH64_CPU_GET_CLASS definition Eduardo Habkost
2020-08-31 18:45   ` Peter Maydell
2020-08-25 19:20 ` [PATCH v3 52/74] rx: Rename QOM type check macros Eduardo Habkost
2020-08-31 18:48   ` Peter Maydell
2020-08-25 19:20 ` [PATCH v3 53/74] rx: Move typedef RXCPU to cpu-qom.h Eduardo Habkost
2020-08-31 18:48   ` Peter Maydell
2020-08-25 19:20 ` [PATCH v3 54/74] qom: make object_ref/unref use a void * instead of Object * Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 55/74] qom: provide convenient macros for declaring and defining types Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 56/74] qom: Allow class type name to be specified in OBJECT_DECLARE* Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 57/74] qom: DECLARE_*_CHECKERS macros Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 58/74] qom: Make type checker functions accept const pointers Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 59/74] qom: TYPE_INFO macro Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 60/74] codeconverter: script for automating QOM code cleanups Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 61/74] [automated] Delete duplicate QOM typedefs Eduardo Habkost
2020-08-25 19:20 ` [PATCH v3 62/74] [automated] Use TYPE_INFO macro Eduardo Habkost
2020-08-26  8:02   ` Juan Quintela
2020-08-25 19:20 ` [PATCH v3 63/74] [automated] Use TYPE_INFO macro (pass 2) Eduardo Habkost
2020-08-25 19:21 ` [PATCH v3 64/74] [automated] Move QOM typedefs and add missing includes Eduardo Habkost
2020-08-26  8:05   ` Juan Quintela
2020-08-25 19:21 ` [PATCH v3 65/74] [automated] Move QOM typedefs and add missing includes (pass 2) Eduardo Habkost
2020-08-26  8:03   ` Juan Quintela
2020-08-25 19:21 ` [PATCH v3 66/74] [automated] Use DECLARE_*CHECKER* macros Eduardo Habkost
2020-08-26  8:08   ` Juan Quintela
2020-08-25 19:21 ` [PATCH v3 67/74] [automated] Use DECLARE_*CHECKER* macros (pass 2) Eduardo Habkost
2020-08-26  8:06   ` Juan Quintela
2020-08-25 19:21 ` [PATCH v3 68/74] [semi-automated] Use DECLARE_*CHECKER* when possible (--force mode) Eduardo Habkost
2020-08-25 19:21 ` [PATCH v3 69/74] [automated] Use OBJECT_DECLARE_TYPE where possible Eduardo Habkost
2020-08-25 19:21 ` [PATCH v3 70/74] [automated] Use OBJECT_DECLARE_TYPE where possible (pass 2) Eduardo Habkost
2020-08-25 19:21 ` [PATCH v3 71/74] [automated] Use OBJECT_DECLARE_SIMPLE_TYPE when possible Eduardo Habkost
2020-08-25 19:21 ` [PATCH v3 72/74] [automated] Remove redundant instance_size/class_size fields Eduardo Habkost
2020-08-26 15:54   ` Eduardo Habkost
2020-08-25 19:21 ` [PATCH v3 73/74] crypto: use QOM macros for declaration/definition of secret types Eduardo Habkost
2020-08-25 19:21 ` [PATCH v3 74/74] crypto: use QOM macros for declaration/definition of TLS creds types Eduardo Habkost
2020-08-26 10:22 ` [PATCH v3 00/74] qom: Automated conversion of type checking boilerplate Roman Bolshakov
2020-08-26 11:18   ` Eduardo Habkost
2020-08-26 17:06     ` Roman Bolshakov [this message]
2020-08-27 18:18 ` Eduardo Habkost
2020-08-31 17:23 ` Eduardo Habkost
2020-08-31 18:52   ` Peter Maydell
2020-08-31 19:07     ` Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200826170624.GB16356@SPB-NB-133.local \
    --to=r.bolshakov@yadro.com \
    --cc=anthony.perard@citrix.com \
    --cc=berrange@redhat.com \
    --cc=clg@kaod.org \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=kraxel@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=nieklinnenbank@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).