All of lore.kernel.org
 help / color / mirror / Atom feed
* libxl assertion failure when creating any kind of guest
@ 2019-05-22  7:11 ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-22  7:11 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Olaf Hering, Wei Liu

All,

am I the only one to see

xl: libxl.c:339: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed.

for any kind of (x86) guest being created, including simple XTF ones?
I haven't taken a closer look at the code yet, but with this I wonder
how even a smoke push could have occurred. I've re-based my tree
yesterday (to 76ba8b14, which means in particular that 278c64519c
["libxl: fix libxl_domain_need_memory after 899433f149d"] is in place)
after a couple of weeks of not having found the time to do so, so the
range of possible candidate commits is rather long. In a mail on the
16th Jürgen had pointed out that 3802ecbaa9 causes this
assertion to trigger _if_ another assertion this commit added gets
removed again, but that assert() is still in place and did not trigger,
so I assume the two issues are maybe related, but not identical.
Which again leaves 899433f149 as the primary suspect.

I've not been able to find any other recent mention of said assert()
to trigger. This is the call stack, in case it helps:

#0  0x00007ffff6f676d5 in raise () from /lib64/libc.so.6
#1  0x00007ffff6f68cb1 in abort () from /lib64/libc.so.6
#2  0x00007ffff6f605a0 in __assert_fail () from /lib64/libc.so.6
#3  0x00007ffff78ec132 in libxl_defbool_val (db=...) at libxl.c:339
#4  0x00007ffff78edd4a in libxl__domain_build_info_setdefault (gc=0x7fffffffdee0, b_info=0x7fffffffdb80)
    at libxl_create.c:143
#5  0x00007ffff7943e5f in libxl_domain_need_memory (ctx=0x641050, b_info_in=0x7fffffffe0b8, need_memkb=0x7fffffffdf40)
    at libxl_mem.c:478
#6  0x0000000000425e3c in freemem (domid=4294967295, b_info=0x7fffffffe0b8) at xl_vmcontrol.c:325
#7  0x00000000004274e7 in create_domain (dom_info=0x7fffffffe630) at xl_vmcontrol.c:881
#8  0x0000000000428367 in main_create (argc=3, argv=0x7fffffffe810) at xl_vmcontrol.c:1242
#9  0x000000000040b344 in main (argc=3, argv=0x7fffffffe810) at xl.c:413

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [Xen-devel] libxl assertion failure when creating any kind of guest
@ 2019-05-22  7:11 ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-22  7:11 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Olaf Hering, Wei Liu

All,

am I the only one to see

xl: libxl.c:339: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed.

for any kind of (x86) guest being created, including simple XTF ones?
I haven't taken a closer look at the code yet, but with this I wonder
how even a smoke push could have occurred. I've re-based my tree
yesterday (to 76ba8b14, which means in particular that 278c64519c
["libxl: fix libxl_domain_need_memory after 899433f149d"] is in place)
after a couple of weeks of not having found the time to do so, so the
range of possible candidate commits is rather long. In a mail on the
16th Jürgen had pointed out that 3802ecbaa9 causes this
assertion to trigger _if_ another assertion this commit added gets
removed again, but that assert() is still in place and did not trigger,
so I assume the two issues are maybe related, but not identical.
Which again leaves 899433f149 as the primary suspect.

I've not been able to find any other recent mention of said assert()
to trigger. This is the call stack, in case it helps:

#0  0x00007ffff6f676d5 in raise () from /lib64/libc.so.6
#1  0x00007ffff6f68cb1 in abort () from /lib64/libc.so.6
#2  0x00007ffff6f605a0 in __assert_fail () from /lib64/libc.so.6
#3  0x00007ffff78ec132 in libxl_defbool_val (db=...) at libxl.c:339
#4  0x00007ffff78edd4a in libxl__domain_build_info_setdefault (gc=0x7fffffffdee0, b_info=0x7fffffffdb80)
    at libxl_create.c:143
#5  0x00007ffff7943e5f in libxl_domain_need_memory (ctx=0x641050, b_info_in=0x7fffffffe0b8, need_memkb=0x7fffffffdf40)
    at libxl_mem.c:478
#6  0x0000000000425e3c in freemem (domid=4294967295, b_info=0x7fffffffe0b8) at xl_vmcontrol.c:325
#7  0x00000000004274e7 in create_domain (dom_info=0x7fffffffe630) at xl_vmcontrol.c:881
#8  0x0000000000428367 in main_create (argc=3, argv=0x7fffffffe810) at xl_vmcontrol.c:1242
#9  0x000000000040b344 in main (argc=3, argv=0x7fffffffe810) at xl.c:413

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: libxl assertion failure when creating any kind of guest
@ 2019-05-22  7:25   ` Olaf Hering
  0 siblings, 0 replies; 10+ messages in thread
From: Olaf Hering @ 2019-05-22  7:25 UTC (permalink / raw)
  To: Wei Liu, Ian Jackson; +Cc: xen-devel, Jan Beulich


[-- Attachment #1.1: Type: text/plain, Size: 612 bytes --]

Am Wed, 22 May 2019 01:11:54 -0600
schrieb "Jan Beulich" <JBeulich@suse.com>:

> libxl__domain_build_info_setdefault (gc=0x7fffffffdee0, b_info=0x7fffffffdb80)
>     at libxl_create.c:143

This is libxl_defbool_val(b_info->device_model_stubdomain).

Due to the lack of a proper way to describe all the dependencies within
libxl I suggest to revert these commits for the time being:

278c64519c libxl: fix libxl_domain_need_memory after 899433f149d
899433f149 libxl: fix migration of PV and PVH domUs with and without qemu
3802ecbaa9 libxl: add helper function to set device_model_version


Olaf

[-- Attachment #1.2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] libxl assertion failure when creating any kind of guest
@ 2019-05-22  7:25   ` Olaf Hering
  0 siblings, 0 replies; 10+ messages in thread
From: Olaf Hering @ 2019-05-22  7:25 UTC (permalink / raw)
  To: Wei Liu, Ian Jackson; +Cc: xen-devel, Jan Beulich


[-- Attachment #1.1: Type: text/plain, Size: 612 bytes --]

Am Wed, 22 May 2019 01:11:54 -0600
schrieb "Jan Beulich" <JBeulich@suse.com>:

> libxl__domain_build_info_setdefault (gc=0x7fffffffdee0, b_info=0x7fffffffdb80)
>     at libxl_create.c:143

This is libxl_defbool_val(b_info->device_model_stubdomain).

Due to the lack of a proper way to describe all the dependencies within
libxl I suggest to revert these commits for the time being:

278c64519c libxl: fix libxl_domain_need_memory after 899433f149d
899433f149 libxl: fix migration of PV and PVH domUs with and without qemu
3802ecbaa9 libxl: add helper function to set device_model_version


Olaf

[-- Attachment #1.2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: libxl assertion failure when creating any kind of guest
@ 2019-05-22  8:09     ` Wei Liu
  0 siblings, 0 replies; 10+ messages in thread
From: Wei Liu @ 2019-05-22  8:09 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Ian Jackson, Wei Liu, Jan Beulich, xen-devel

On Wed, May 22, 2019 at 09:25:44AM +0200, Olaf Hering wrote:
> Am Wed, 22 May 2019 01:11:54 -0600
> schrieb "Jan Beulich" <JBeulich@suse.com>:
> 
> > libxl__domain_build_info_setdefault (gc=0x7fffffffdee0, b_info=0x7fffffffdb80)
> >     at libxl_create.c:143
> 
> This is libxl_defbool_val(b_info->device_model_stubdomain).
> 
> Due to the lack of a proper way to describe all the dependencies within
> libxl I suggest to revert these commits for the time being:
> 
> 278c64519c libxl: fix libxl_domain_need_memory after 899433f149d
> 899433f149 libxl: fix migration of PV and PVH domUs with and without qemu
> 3802ecbaa9 libxl: add helper function to set device_model_version

OK. I will do that today.

Wei.

> 
> 
> Olaf



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] libxl assertion failure when creating any kind of guest
@ 2019-05-22  8:09     ` Wei Liu
  0 siblings, 0 replies; 10+ messages in thread
From: Wei Liu @ 2019-05-22  8:09 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Ian Jackson, Wei Liu, Jan Beulich, xen-devel

On Wed, May 22, 2019 at 09:25:44AM +0200, Olaf Hering wrote:
> Am Wed, 22 May 2019 01:11:54 -0600
> schrieb "Jan Beulich" <JBeulich@suse.com>:
> 
> > libxl__domain_build_info_setdefault (gc=0x7fffffffdee0, b_info=0x7fffffffdb80)
> >     at libxl_create.c:143
> 
> This is libxl_defbool_val(b_info->device_model_stubdomain).
> 
> Due to the lack of a proper way to describe all the dependencies within
> libxl I suggest to revert these commits for the time being:
> 
> 278c64519c libxl: fix libxl_domain_need_memory after 899433f149d
> 899433f149 libxl: fix migration of PV and PVH domUs with and without qemu
> 3802ecbaa9 libxl: add helper function to set device_model_version

OK. I will do that today.

Wei.

> 
> 
> Olaf



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: libxl assertion failure when creating any kind of guest
@ 2019-05-22  8:40     ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-22  8:40 UTC (permalink / raw)
  To: Olaf Hering, Wei Liu; +Cc: xen-devel, Ian Jackson

>>> On 22.05.19 at 09:25, <olaf@aepfle.de> wrote:
> Am Wed, 22 May 2019 01:11:54 -0600
> schrieb "Jan Beulich" <JBeulich@suse.com>:
> 
>> libxl__domain_build_info_setdefault (gc=0x7fffffffdee0, 
> b_info=0x7fffffffdb80)
>>     at libxl_create.c:143
> 
> This is libxl_defbool_val(b_info->device_model_stubdomain).
> 
> Due to the lack of a proper way to describe all the dependencies within
> libxl I suggest to revert these commits for the time being:
> 
> 278c64519c libxl: fix libxl_domain_need_memory after 899433f149d
> 899433f149 libxl: fix migration of PV and PVH domUs with and without qemu
> 3802ecbaa9 libxl: add helper function to set device_model_version

Well, the alternative is the one line change below.

Jan

libxl: further fix libxl_domain_need_memory() after 899433f149d

Besides providing a device_model_version setting (as done by 278c64519c
["libxl: fix libxl_domain_need_memory after 899433f149d"]), one is also
needed for device_model_stubdomain, or else the respective assert() in
libxl_defbool_val() (called from libxl__domain_build_info_setdefault())
will trigger.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- unstable.orig/tools/libxl/libxl_mem.c
+++ unstable/tools/libxl/libxl_mem.c
@@ -472,6 +472,7 @@ int libxl_domain_need_memory(libxl_ctx *
      * calculation doesn't really care which QEMU is set here, so we
      * go with the upstream default.
      */
+    libxl_defbool_setdefault(&b_info->device_model_stubdomain, false);
     if (!b_info->device_model_version)
         b_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN;
 




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] libxl assertion failure when creating any kind of guest
@ 2019-05-22  8:40     ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-22  8:40 UTC (permalink / raw)
  To: Olaf Hering, Wei Liu; +Cc: xen-devel, Ian Jackson

>>> On 22.05.19 at 09:25, <olaf@aepfle.de> wrote:
> Am Wed, 22 May 2019 01:11:54 -0600
> schrieb "Jan Beulich" <JBeulich@suse.com>:
> 
>> libxl__domain_build_info_setdefault (gc=0x7fffffffdee0, 
> b_info=0x7fffffffdb80)
>>     at libxl_create.c:143
> 
> This is libxl_defbool_val(b_info->device_model_stubdomain).
> 
> Due to the lack of a proper way to describe all the dependencies within
> libxl I suggest to revert these commits for the time being:
> 
> 278c64519c libxl: fix libxl_domain_need_memory after 899433f149d
> 899433f149 libxl: fix migration of PV and PVH domUs with and without qemu
> 3802ecbaa9 libxl: add helper function to set device_model_version

Well, the alternative is the one line change below.

Jan

libxl: further fix libxl_domain_need_memory() after 899433f149d

Besides providing a device_model_version setting (as done by 278c64519c
["libxl: fix libxl_domain_need_memory after 899433f149d"]), one is also
needed for device_model_stubdomain, or else the respective assert() in
libxl_defbool_val() (called from libxl__domain_build_info_setdefault())
will trigger.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- unstable.orig/tools/libxl/libxl_mem.c
+++ unstable/tools/libxl/libxl_mem.c
@@ -472,6 +472,7 @@ int libxl_domain_need_memory(libxl_ctx *
      * calculation doesn't really care which QEMU is set here, so we
      * go with the upstream default.
      */
+    libxl_defbool_setdefault(&b_info->device_model_stubdomain, false);
     if (!b_info->device_model_version)
         b_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN;
 




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: libxl assertion failure when creating any kind of guest
@ 2019-05-22 10:01       ` Wei Liu
  0 siblings, 0 replies; 10+ messages in thread
From: Wei Liu @ 2019-05-22 10:01 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Ian Jackson, Olaf Hering, Wei Liu, xen-devel

On Wed, May 22, 2019 at 02:40:51AM -0600, Jan Beulich wrote:
> >>> On 22.05.19 at 09:25, <olaf@aepfle.de> wrote:
> > Am Wed, 22 May 2019 01:11:54 -0600
> > schrieb "Jan Beulich" <JBeulich@suse.com>:
> > 
> >> libxl__domain_build_info_setdefault (gc=0x7fffffffdee0, 
> > b_info=0x7fffffffdb80)
> >>     at libxl_create.c:143
> > 
> > This is libxl_defbool_val(b_info->device_model_stubdomain).
> > 
> > Due to the lack of a proper way to describe all the dependencies within
> > libxl I suggest to revert these commits for the time being:
> > 
> > 278c64519c libxl: fix libxl_domain_need_memory after 899433f149d
> > 899433f149 libxl: fix migration of PV and PVH domUs with and without qemu
> > 3802ecbaa9 libxl: add helper function to set device_model_version
> 
> Well, the alternative is the one line change below.
> 
> Jan
> 
> libxl: further fix libxl_domain_need_memory() after 899433f149d
> 
> Besides providing a device_model_version setting (as done by 278c64519c
> ["libxl: fix libxl_domain_need_memory after 899433f149d"]), one is also
> needed for device_model_stubdomain, or else the respective assert() in
> libxl_defbool_val() (called from libxl__domain_build_info_setdefault())
> will trigger.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- unstable.orig/tools/libxl/libxl_mem.c
> +++ unstable/tools/libxl/libxl_mem.c
> @@ -472,6 +472,7 @@ int libxl_domain_need_memory(libxl_ctx *
>       * calculation doesn't really care which QEMU is set here, so we
>       * go with the upstream default.
>       */
> +    libxl_defbool_setdefault(&b_info->device_model_stubdomain, false);
>      if (!b_info->device_model_version)
>          b_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN;
>  

I have reverted those patches. There is one more regression that's more
serious and it is blocking osstest.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] libxl assertion failure when creating any kind of guest
@ 2019-05-22 10:01       ` Wei Liu
  0 siblings, 0 replies; 10+ messages in thread
From: Wei Liu @ 2019-05-22 10:01 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Ian Jackson, Olaf Hering, Wei Liu, xen-devel

On Wed, May 22, 2019 at 02:40:51AM -0600, Jan Beulich wrote:
> >>> On 22.05.19 at 09:25, <olaf@aepfle.de> wrote:
> > Am Wed, 22 May 2019 01:11:54 -0600
> > schrieb "Jan Beulich" <JBeulich@suse.com>:
> > 
> >> libxl__domain_build_info_setdefault (gc=0x7fffffffdee0, 
> > b_info=0x7fffffffdb80)
> >>     at libxl_create.c:143
> > 
> > This is libxl_defbool_val(b_info->device_model_stubdomain).
> > 
> > Due to the lack of a proper way to describe all the dependencies within
> > libxl I suggest to revert these commits for the time being:
> > 
> > 278c64519c libxl: fix libxl_domain_need_memory after 899433f149d
> > 899433f149 libxl: fix migration of PV and PVH domUs with and without qemu
> > 3802ecbaa9 libxl: add helper function to set device_model_version
> 
> Well, the alternative is the one line change below.
> 
> Jan
> 
> libxl: further fix libxl_domain_need_memory() after 899433f149d
> 
> Besides providing a device_model_version setting (as done by 278c64519c
> ["libxl: fix libxl_domain_need_memory after 899433f149d"]), one is also
> needed for device_model_stubdomain, or else the respective assert() in
> libxl_defbool_val() (called from libxl__domain_build_info_setdefault())
> will trigger.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- unstable.orig/tools/libxl/libxl_mem.c
> +++ unstable/tools/libxl/libxl_mem.c
> @@ -472,6 +472,7 @@ int libxl_domain_need_memory(libxl_ctx *
>       * calculation doesn't really care which QEMU is set here, so we
>       * go with the upstream default.
>       */
> +    libxl_defbool_setdefault(&b_info->device_model_stubdomain, false);
>      if (!b_info->device_model_version)
>          b_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN;
>  

I have reverted those patches. There is one more regression that's more
serious and it is blocking osstest.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-05-22 10:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22  7:11 libxl assertion failure when creating any kind of guest Jan Beulich
2019-05-22  7:11 ` [Xen-devel] " Jan Beulich
2019-05-22  7:25 ` Olaf Hering
2019-05-22  7:25   ` [Xen-devel] " Olaf Hering
2019-05-22  8:09   ` Wei Liu
2019-05-22  8:09     ` [Xen-devel] " Wei Liu
2019-05-22  8:40   ` Jan Beulich
2019-05-22  8:40     ` [Xen-devel] " Jan Beulich
2019-05-22 10:01     ` Wei Liu
2019-05-22 10:01       ` [Xen-devel] " Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.