Re: [Xen-devel] regression: xl create does not work since 38cd0664a6bf

2016-10-12 Thread Andrew Cooper
On 12/10/2016 20:25, Kyle Huey wrote:
> Apologies if this has already been reported.

It is known, and has already been fixed in master by:

http://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=031655daea9bb0f69ce54a32fea0eab319471d04

~Andrew

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] regression: xl create does not work since 38cd0664a6bf

2016-10-12 Thread Kyle Huey
Apologies if this has already been reported.

On x86, xl create no longer works since 38cd0664a6bf.  xl create gets
wedges attempting to acquire the domain-userdata-lock a second time.

strace output:

open("/var/lib/xen/userdata-l.0.----.domain-userdata-lock",
O_RDWR|O_CREAT, 0666) = 9
fcntl(9, F_GETFD)   = 0
fcntl(9, F_SETFD, FD_CLOEXEC)   = 0
flock(9, LOCK_EX)   = 0
fstat(9, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
stat("/var/lib/xen/userdata-l.0.----.domain-userdata-lock",
{st_mode=S_IFREG|0644, st_size=0, ...}) = 0
ioctl(5, _IOC(0, 0x50, 0x00, 0x30), 0x7ffe5c183870) = 0
ioctl(5, _IOC(0, 0x50, 0x00, 0x30), 0x7ffe5c183610) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, -1, 0) = 0x7fbfb6014000
madvise(0x7fbfb6014000, 8192, MADV_DONTFORK) = 0
ioctl(5, _IOC(0, 0x50, 0x00, 0x30), 0x7ffe5c1825f0) = -1 ENOSYS
(Function not implemented)
madvise(0x7fbfb6014000, 8192, MADV_DOFORK) = 0
munmap(0x7fbfb6014000, 8192)= 0
open("/var/lib/xen/userdata-l.0.----.domain-userdata-lock",
O_RDWR|O_CREAT, 0666) = 10
fcntl(10, F_GETFD)  = 0
fcntl(10, F_SETFD, FD_CLOEXEC)  = 0
flock(10, LOCK_EX

Stack from the first lock acquisition:

Breakpoint 1, libxl__lock_domain_userdata (gc=0x7fffd910, domid=0)
at libxl_internal.c:404
404fd = open(lockfile, O_RDWR|O_CREAT, 0666);
(gdb) bt
#0  libxl__lock_domain_userdata (gc=0x7fffd910, domid=0) at
libxl_internal.c:404
#1  0x77907696 in libxl_set_memory_target (ctx=0x639050,
domid=0, target_memkb=-8, relative=1,
enforce=0) at libxl.c:4182
#2  0x00411fa9 in freemem (domid=4294967295,
b_info=0x7fffe060) at xl_cmdimpl.c:2716
#3  0x00412dd7 in create_domain (dom_info=0x7fffe4b0) at
xl_cmdimpl.c:2998
#4  0x0041a373 in main_create (argc=1, argv=0x7fffe658) at
xl_cmdimpl.c:5530
#5  0x00408eda in main (argc=2, argv=0x7fffe650) at xl.c:364

Stack from the deadlock:

Breakpoint 1, libxl__lock_domain_userdata (gc=0x7fffd7b0, domid=0)
at libxl_internal.c:404
404fd = open(lockfile, O_RDWR|O_CREAT, 0666);
(gdb) bt
#0  libxl__lock_domain_userdata (gc=0x7fffd7b0, domid=0) at
libxl_internal.c:404
#1  0x7790fa4a in libxl_retrieve_domain_configuration
(ctx=0x639050, domid=0, d_config=0x7fffda00)
at libxl.c:6654
#2  0x779076d4 in libxl_set_memory_target (ctx=0x639050,
domid=0, target_memkb=-8, relative=1,
enforce=0) at libxl.c:4188
#3  0x00411fa9 in freemem (domid=4294967295,
b_info=0x7fffe060) at xl_cmdimpl.c:2716
#4  0x00412dd7 in create_domain (dom_info=0x7fffe4b0) at
xl_cmdimpl.c:2998
#5  0x0041a373 in main_create (argc=1, argv=0x7fffe658) at
xl_cmdimpl.c:5530
#6  0x00408eda in main (argc=2, argv=0x7fffe650) at xl.c:364

- Kyle

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel