Skip to contentSkip to conversation

Commit 0d99c909d7e1 introduced bug

Xen-devel Jürgen Groß 2 participants 3 messages Mar 16, 2020

lore
Share & tools
lore
#0 lore raw

Commit 0d99c909d7e1 ("libxl: wait for console path before firing console_available") introduced a bug: when trying to start a guest from a config file when it is already running, I get:

xl create -c minios.pv
Parsing config from minios.pv
libxl: error: libxl_domain.c:81:libxl__domain_rename: Domain 8:Domain with name "minios" already exists.
libxl: error: libxl_create.c:1180:initiate_domain_create: Domain 8:cannot make domain: -6 Segmentation fault (core dumped)

The segfault is due to:

#0  0x00007ffff70127d1 in __strlen_avx2 () from /lib64/libc.so.6
#1  0x00007ffff66385f8 in xs_unwatch (h=0x644140, path=0x0, token=0x647cc0 "0/0") at xs.c:993
#2  0x00007ffff7907aad in libxl__ev_xswatch_deregister (gc=0x6453d0, w=0x6479e0) at libxl_event.c:853
#3  0x00007ffff78f7b22 in libxl__xswait_stop (gc=0x6453d0, xswa=0x647958) at libxl_aoutils.c:34
#4  0x00007ffff78cde09 in domcreate_complete (egc=0x7fffffffd920, dcs=0x645490, rc=-3) at libxl_create.c:1860

####### ^ this call to libxl__xswait_stop() was added with said commit

#5 0x00007ffff78cbfae in initiate_domain_create (egc=0x7fffffffd920, dcs=0x645490) at libxl_create.c:1244
#6 0x00007ffff78ce368 in do_domain_create (ctx=0x643860, d_config=0x7fffffffdad0, domid=0x7fffffffdfac, restore_fd=-1, send_back_fd=-1, params=0x0,

    ao_how=0x0, aop_console_how=0x7fffffffda60) at libxl_create.c:1977
#7  0x00007ffff78cefdf in libxl_domain_create_new (ctx=0x643860, d_config=0x7fffffffdad0, domid=0x7fffffffdfac, ao_how=0x0, aop_console_how=0x7fffffffda60)
    at libxl_create.c:2192

#8 0x0000000000428fc8 in create_domain (dom_info=0x7fffffffe0b0) at xl_vmcontrol.c:936 #9 0x0000000000429c4d in main_create (argc=3, argv=0x7fffffffe290) at xl_vmcontrol.c:1246 #10 0x000000000040ad0b in main (argc=3, argv=0x7fffffffe290) at xl.c:425

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#1 lore raw
Quoted 26 lines · Jürgen Groß

Commit 0d99c909d7e1 ("libxl: wait for console path before firing console_available") introduced a bug: when trying to start a guest from a config file when it is already running, I get:

xl create -c minios.pv
Parsing config from minios.pv
libxl: error: libxl_domain.c:81:libxl__domain_rename: Domain 8:Domain with name "minios" already exists.
libxl: error: libxl_create.c:1180:initiate_domain_create: Domain 8:cannot make domain: -6
Segmentation fault (core dumped)

The segfault is due to:

#0  0x00007ffff70127d1 in __strlen_avx2 () from /lib64/libc.so.6 #1  0x00007ffff66385f8 in xs_unwatch (h=0x644140, path=0x0, token=0x647cc0 "0/0") at xs.c:993
#2  0x00007ffff7907aad in libxl__ev_xswatch_deregister (gc=0x6453d0, w=0x6479e0) at libxl_event.c:853
#3  0x00007ffff78f7b22 in libxl__xswait_stop (gc=0x6453d0, xswa=0x647958) at libxl_aoutils.c:34
#4  0x00007ffff78cde09 in domcreate_complete (egc=0x7fffffffd920, dcs=0x645490, rc=-3) at libxl_create.c:1860

####### ^ this call to libxl__xswait_stop() was added with said commit

Quoted 15 lines

#5  0x00007ffff78cbfae in initiate_domain_create (egc=0x7fffffffd920, dcs=0x645490) at libxl_create.c:1244
#6  0x00007ffff78ce368 in do_domain_create (ctx=0x643860, d_config=0x7fffffffdad0, domid=0x7fffffffdfac, restore_fd=-1, send_back_fd=-1, params=0x0,
    ao_how=0x0, aop_console_how=0x7fffffffda60) at libxl_create.c:1977 #7  0x00007ffff78cefdf in libxl_domain_create_new (ctx=0x643860, d_config=0x7fffffffdad0, domid=0x7fffffffdfac, ao_how=0x0, aop_console_how=0x7fffffffda60)
    at libxl_create.c:2192
#8  0x0000000000428fc8 in create_domain (dom_info=0x7fffffffe0b0) at xl_vmcontrol.c:936
#9  0x0000000000429c4d in main_create (argc=3, argv=0x7fffffffe290) at xl_vmcontrol.c:1246
#10 0x000000000040ad0b in main (argc=3, argv=0x7fffffffe290) at xl.c:425

What about the top commit, d094e95fb7c61c which seems to be a bugfix for this?

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
Quoted 43 lines · Andrew Cooper
Quoted 26 lines · Jürgen Groß

Commit 0d99c909d7e1 ("libxl: wait for console path before firing console_available") introduced a bug: when trying to start a guest from a config file when it is already running, I get:

xl create -c minios.pv
Parsing config from minios.pv
libxl: error: libxl_domain.c:81:libxl__domain_rename: Domain 8:Domain with name "minios" already exists.
libxl: error: libxl_create.c:1180:initiate_domain_create: Domain 8:cannot make domain: -6
Segmentation fault (core dumped)

The segfault is due to:

#0  0x00007ffff70127d1 in __strlen_avx2 () from /lib64/libc.so.6 #1  0x00007ffff66385f8 in xs_unwatch (h=0x644140, path=0x0, token=0x647cc0 "0/0") at xs.c:993
#2  0x00007ffff7907aad in libxl__ev_xswatch_deregister (gc=0x6453d0, w=0x6479e0) at libxl_event.c:853
#3  0x00007ffff78f7b22 in libxl__xswait_stop (gc=0x6453d0, xswa=0x647958) at libxl_aoutils.c:34
#4  0x00007ffff78cde09 in domcreate_complete (egc=0x7fffffffd920, dcs=0x645490, rc=-3) at libxl_create.c:1860

####### ^ this call to libxl__xswait_stop() was added with said commit

Quoted 15 lines

#5  0x00007ffff78cbfae in initiate_domain_create (egc=0x7fffffffd920, dcs=0x645490) at libxl_create.c:1244
#6  0x00007ffff78ce368 in do_domain_create (ctx=0x643860, d_config=0x7fffffffdad0, domid=0x7fffffffdfac, restore_fd=-1, send_back_fd=-1, params=0x0,
    ao_how=0x0, aop_console_how=0x7fffffffda60) at libxl_create.c:1977
#7  0x00007ffff78cefdf in libxl_domain_create_new (ctx=0x643860, d_config=0x7fffffffdad0, domid=0x7fffffffdfac, ao_how=0x0, aop_console_how=0x7fffffffda60)
    at libxl_create.c:2192
#8  0x0000000000428fc8 in create_domain (dom_info=0x7fffffffe0b0) at xl_vmcontrol.c:936
#9  0x0000000000429c4d in main_create (argc=3, argv=0x7fffffffe290) at xl_vmcontrol.c:1246
#10 0x000000000040ad0b in main (argc=3, argv=0x7fffffffe290) at xl.c:425

Quoted 2 lines

What about the top commit, d094e95fb7c61c which seems to be a bugfix for this?

Oh, sorry, missed that!

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel