* The segmentfault when using xl create domU @ 2014-04-15 2:33 duqi 2014-04-15 8:53 ` Ian Campbell 0 siblings, 1 reply; 9+ messages in thread From: duqi @ 2014-04-15 2:33 UTC (permalink / raw) To: xen-devel@lists.xen.org Cc: Ian Campbell, Stefano Stabellini (Xen mainlister), Julien Grall, 宫晓利, hdegoede, bjzhang@suse.com [-- Attachment #1.1: Type: text/plain, Size: 904 bytes --] Hi there, We tried to create domU with command "xl -vvv create -d domU_01" and met the below fault: root@linaro-alip:~/domU# xl -vvv create -d domU_01 Parsing config from domU_test unable to format domain config as JSON (YAJL:1) libxl: debug: libxl_create.c:1342:do_domain_create: ao 0x1df8610: create: how=(nil) callback=(nil) poller=0x1df8658 Segmentation fault Here is the context of domU_01: kernel = "/root/domU/zImage" memory = "64" name = "domU" vcpus = 1 serial="pty" disk = [ 'phy:/dev/loop0,xvda,w' ] vif=[ 'mac=00:16:3e:56:af:69,bridge=virbr0,type=netfront', ] Here is our version and conigurations about xen: Xen : git://xenbits.xen.org/xen.git and 'RELEASE-4.4.0' branch we used "make dist-xen XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_EARLY_PRINTK=sun7i" to compile the xen. Could you give us some advices? Thank you very much. duqi. [-- Attachment #1.2: Type: text/html, Size: 1153 bytes --] [-- Attachment #2: Type: text/plain, Size: 126 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: The segmentfault when using xl create domU 2014-04-15 2:33 The segmentfault when using xl create domU duqi @ 2014-04-15 8:53 ` Ian Campbell 2014-04-15 9:45 ` duqi 0 siblings, 1 reply; 9+ messages in thread From: Ian Campbell @ 2014-04-15 8:53 UTC (permalink / raw) To: duqi Cc: Stefano Stabellini (Xen mainlister), Julien Grall, 宫晓利, hdegoede, bjzhang@suse.com, xen-devel@lists.xen.org On Tue, 2014-04-15 at 10:33 +0800, duqi wrote: > Hi there, > We tried to create domU with command "xl -vvv create -d domU_01" and > met the below fault: > > root@linaro-alip:~/domU# xl -vvv create -d domU_01 Does this happen if you drop the "-d"? please could you run under gdb and grab a backtrace. Someth8ing like: # gdb --args xl -vvv create -d domU_01 (gdb) run .... crash! (gdb) bt > Parsing config from domU_test > unable to format domain config as JSON (YAJL:1) > libxl: debug: libxl_create.c:1342:do_domain_create: ao 0x1df8610: > create: how=(nil) callback=(nil) poller=0x1df8658 > Segmentation fault > > Here is the context of domU_01: > kernel = "/root/domU/zImage" > memory = "64" > name = "domU" > vcpus = 1 > serial="pty" > disk = [ 'phy:/dev/loop0,xvda,w' ] > vif=[ 'mac=00:16:3e:56:af:69,bridge=virbr0,type=netfront', ] > Here is our version and conigurations about xen: > Xen : git://xenbits.xen.org/xen.git and 'RELEASE-4.4.0' branch > we used "make dist-xen XEN_TARGET_ARCH=arm32 > CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_EARLY_PRINTK=sun7i" to > compile the xen. > > Could you give us some advices? > Thank you very much. > > duqi. > > > > _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: The segmentfault when using xl create domU 2014-04-15 8:53 ` Ian Campbell @ 2014-04-15 9:45 ` duqi 2014-04-15 14:12 ` Julien Grall 0 siblings, 1 reply; 9+ messages in thread From: duqi @ 2014-04-15 9:45 UTC (permalink / raw) To: Ian Campbell Cc: Stefano Stabellini (Xen mainlister), Julien Grall, 宫晓利, hdegoede, bjzhang@suse.com, xen-devel@lists.xen.org At 2014-04-15 04:53:41, "Ian Campbell" <Ian.Campbell@citrix.com> wrote: >On Tue, 2014-04-15 at 10:33 +0800, duqi wrote: >> Hi there, >> We tried to create domU with command "xl -vvv create -d domU_01" and >> met the below fault: >> >> root@linaro-alip:~/domU# xl -vvv create -d domU_01 > >Does this happen if you drop the "-d"? > >please could you run under gdb and grab a backtrace. Someth8ing like: > # gdb --args xl -vvv create -d domU_01 > (gdb) run > .... > crash! > (gdb) bt > Hi, here is the gdb output: Program received signal SIGSEGV, Segmentation fault. 0xb6f6bc30 in memcpy (__len=16, __src=0xbefe6e0c, __dest=0x39488) at /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/include/bits/string3.h:51 51 /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/include/bits/string3.h: No such file or direc. (gdb) bt #0 0xb6f6bc30 in memcpy (__len=16, __src=0xbefe6e0c, __dest=0x39488) at /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/include/bits/string3.h:51 #1 libxl_list_vm (ctx=ctx@entry=0x33030, nb_vm_out=nb_vm_out@entry=0xbeffee30) at libxl.c:689 #2 0xb6f7b934 in libxl__domain_make (gc=gc@entry=0x393d0, info=info@entry=0xbefff040, domid=domid@entry=0xbeffeec0) at libxl_create.c:613 #3 0xb6f7cadc in initiate_domain_create (dcs=0x398a8, egc=0xbeffeec4) at libxl_create.c:791 #4 do_domain_create (ctx=ctx@entry=0x33030, d_config=d_config@entry=0xbefff040, domid=domid@entry=0xbeffef80, restore_fd=restore_fd@entry=-1, checkpointed_stream=checkpointed_stream@entry=0, ao_how=ao_how@entry=0x0, aop_console_how=aop_console_how@entry=0x0) at libxl_create.c:1424 #5 0xb6f7d428 in libxl_domain_create_new (ctx=0x33030, d_config=d_config@entry=0xbefff040, domid=domid@entry=0xbeffef80, ao_how=ao_how@entry=0x0, aop_console_how=aop_console_how@entry=0x0) at libxl_create.c:1449 #6 0x00017040 in create_domain (dom_info=0xbeffefdc) at xl_cmdimpl.c:2283 #7 main_create (argc=<optimized out>, argv=<optimized out>) at xl_cmdimpl.c:4469 #8 0x0000db84 in main (argc=3, argv=0xbefff82c) at xl.c:362 (gdb) Many thanks. duqi. >> Parsing config from domU_test >> unable to format domain config as JSON (YAJL:1) >> libxl: debug: libxl_create.c:1342:do_domain_create: ao 0x1df8610: >> create: how=(nil) callback=(nil) poller=0x1df8658 >> Segmentation fault >> >> Here is the context of domU_01: >> kernel = "/root/domU/zImage" >> memory = "64" >> name = "domU" >> vcpus = 1 >> serial="pty" >> disk = [ 'phy:/dev/loop0,xvda,w' ] >> vif=[ 'mac=00:16:3e:56:af:69,bridge=virbr0,type=netfront', ] >> Here is our version and conigurations about xen: >> Xen : git://xenbits.xen.org/xen.git and 'RELEASE-4.4.0' branch >> we used "make dist-xen XEN_TARGET_ARCH=arm32 >> CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_EARLY_PRINTK=sun7i" to >> compile the xen. >> >> Could you give us some advices? >> Thank you very much. >> >> duqi. >> >> >> >> > > _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: The segmentfault when using xl create domU 2014-04-15 9:45 ` duqi @ 2014-04-15 14:12 ` Julien Grall 2014-04-15 22:07 ` Wei Huang 2014-04-16 9:12 ` duqi 0 siblings, 2 replies; 9+ messages in thread From: Julien Grall @ 2014-04-15 14:12 UTC (permalink / raw) To: duqi Cc: Ian Campbell, Stefano Stabellini (Xen mainlister), 宫晓利, hdegoede, bjzhang@suse.com, xen-devel@lists.xen.org Hello, On 04/15/2014 10:45 AM, duqi wrote: > At 2014-04-15 04:53:41, "Ian Campbell" <Ian.Campbell@citrix.com> wrote: >> On Tue, 2014-04-15 at 10:33 +0800, duqi wrote: >>> Hi there, >>> We tried to create domU with command "xl -vvv create -d domU_01" and >>> met the below fault: >>> >>> root@linaro-alip:~/domU# xl -vvv create -d domU_01 >> >> Does this happen if you drop the "-d"? >> >> please could you run under gdb and grab a backtrace. Someth8ing like: >> # gdb --args xl -vvv create -d domU_01 >> (gdb) run >> .... >> crash! >> (gdb) bt >> > > Hi, here is the gdb output: > Program received signal SIGSEGV, Segmentation fault. > 0xb6f6bc30 in memcpy (__len=16, __src=0xbefe6e0c, __dest=0x39488) > at /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/include/bits/string3.h:51 > 51 /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/include/bits/string3.h: No such file or direc. > (gdb) bt > #0 0xb6f6bc30 in memcpy (__len=16, __src=0xbefe6e0c, __dest=0x39488) > at /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/include/bits/string3.h:51 > #1 libxl_list_vm (ctx=ctx@entry=0x33030, > nb_vm_out=nb_vm_out@entry=0xbeffee30) at libxl.c:689 > #2 0xb6f7b934 in libxl__domain_make (gc=gc@entry=0x393d0, > info=info@entry=0xbefff040, domid=domid@entry=0xbeffeec0) > at libxl_create.c:613 > #3 0xb6f7cadc in initiate_domain_create (dcs=0x398a8, egc=0xbeffeec4) > at libxl_create.c:791 > #4 do_domain_create (ctx=ctx@entry=0x33030, > d_config=d_config@entry=0xbefff040, domid=domid@entry=0xbeffef80, > restore_fd=restore_fd@entry=-1, > checkpointed_stream=checkpointed_stream@entry=0, ao_how=ao_how@entry=0x0, > aop_console_how=aop_console_how@entry=0x0) at libxl_create.c:1424 > #5 0xb6f7d428 in libxl_domain_create_new (ctx=0x33030, > d_config=d_config@entry=0xbefff040, domid=domid@entry=0xbeffef80, > ao_how=ao_how@entry=0x0, aop_console_how=aop_console_how@entry=0x0) > at libxl_create.c:1449 > #6 0x00017040 in create_domain (dom_info=0xbeffefdc) at xl_cmdimpl.c:2283 > #7 main_create (argc=<optimized out>, argv=<optimized out>) > at xl_cmdimpl.c:4469 > #8 0x0000db84 in main (argc=3, argv=0xbefff82c) at xl.c:362 > (gdb) It's a compiler bug. For some reasons gcc doesn't generate the right assembly when -O1 is specified on the command line. Which version of gcc do you use(4.7.*?)? Which distribution are you using? Can you also call disas the crash and copy the output? Gcc 4.8 doesn't seem to be affected. FYI, I got this output from 4.7 with Linaro Ubuntu raring (gcc 4.7.3). 0x76f71bd0 <+224>: mov r5, #0 0x76f71bd4 <+228>: mov r4, r5 0x76f71bd8 <+232>: mov r7, r5 <= r7 = r5 = 0 0x76f71bdc <+236>: sub r6, r11, #98304 ; 0x18000 0x76f71be0 <+240>: sub r6, r6, #36 ; 0x24 0x76f71be4 <+244>: mov r9, r5 0x76f71be8 <+248>: str r8, [r12, #-68] ; 0x44 0x76f71bec <+252>: sub r3, r11, #98304 ; 0x18000 0x76f71bf0 <+256>: ldr r0, [r3, #-68] ; 0x44 0x76f71bf4 <+260>: ldrh r1, [r6, r5] 0x76f71bf8 <+264>: mov r2, r9 0x76f71bfc <+268>: bl 0x76f6d6ac 0x76f71c00 <+272>: cmp r0, #0 0x76f71c04 <+276>: bne 0x76f71c50 <libxl_list_vm+352> 0x76f71c08 <+280>: add r8, r7, r7, lsl #2 <= Last time we set r8 = r7 << 2 = 0 0x76f71c0c <+284>: sub r12, r11, #98304 ; 0x18000 0x76f71c10 <+288>: str r8, [r12, #-56] ; 0x38 0x76f71c14 <+292>: ldr r3, [r12, #-60] ; 0x3c 0x76f71c18 <+296>: add lr, r3, r8, lsl #2 0x76f71c1c <+300>: add r12, r4, r4, lsl #1 0x76f71c20 <+304>: add r12, r6, r12, lsl #5 0x76f71c24 <+308>: add r12, r12, #76 ; 0x4c 0x76f71c28 <+312>: ldm r12!, {r0, r1, r2, r3} 0x76f71c2c <+316>: mov r12, r8 => 0x76f71c30 <+320>: ldr r8, [r8, #-60] ; 0x3c <= r8 (=0) is dereferenced Regards, -- Julien Grall ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: The segmentfault when using xl create domU 2014-04-15 14:12 ` Julien Grall @ 2014-04-15 22:07 ` Wei Huang 2014-04-16 9:21 ` Ian Campbell 2014-04-16 9:12 ` duqi 1 sibling, 1 reply; 9+ messages in thread From: Wei Huang @ 2014-04-15 22:07 UTC (permalink / raw) To: Julien Grall, duqi Cc: Ian Campbell, Stefano Stabellini (Xen mainlister), 宫晓利, hdegoede, bjzhang@suse.com, xen-devel@lists.xen.org On 04/15/2014 09:12 AM, Julien Grall wrote: > Hello, > > On 04/15/2014 10:45 AM, duqi wrote: >> At 2014-04-15 04:53:41, "Ian Campbell" <Ian.Campbell@citrix.com> wrote: >>> On Tue, 2014-04-15 at 10:33 +0800, duqi wrote: >>>> Hi there, >>>> We tried to create domU with command "xl -vvv create -d domU_01" and >>>> met the below fault: >>>> >>>> root@linaro-alip:~/domU# xl -vvv create -d domU_01 >>> >>> Does this happen if you drop the "-d"? >>> >>> please could you run under gdb and grab a backtrace. Someth8ing like: >>> # gdb --args xl -vvv create -d domU_01 >>> (gdb) run >>> .... >>> crash! >>> (gdb) bt >>> >> >> Hi, here is the gdb output: >> Program received signal SIGSEGV, Segmentation fault. >> 0xb6f6bc30 in memcpy (__len=16, __src=0xbefe6e0c, __dest=0x39488) >> at /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/include/bits/string3.h:51 >> 51 /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/include/bits/string3.h: No such file or direc. >> (gdb) bt >> #0 0xb6f6bc30 in memcpy (__len=16, __src=0xbefe6e0c, __dest=0x39488) >> at /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/include/bits/string3.h:51 >> #1 libxl_list_vm (ctx=ctx@entry=0x33030, >> nb_vm_out=nb_vm_out@entry=0xbeffee30) at libxl.c:689 >> #2 0xb6f7b934 in libxl__domain_make (gc=gc@entry=0x393d0, >> info=info@entry=0xbefff040, domid=domid@entry=0xbeffeec0) >> at libxl_create.c:613 >> #3 0xb6f7cadc in initiate_domain_create (dcs=0x398a8, egc=0xbeffeec4) >> at libxl_create.c:791 >> #4 do_domain_create (ctx=ctx@entry=0x33030, >> d_config=d_config@entry=0xbefff040, domid=domid@entry=0xbeffef80, >> restore_fd=restore_fd@entry=-1, >> checkpointed_stream=checkpointed_stream@entry=0, ao_how=ao_how@entry=0x0, >> aop_console_how=aop_console_how@entry=0x0) at libxl_create.c:1424 >> #5 0xb6f7d428 in libxl_domain_create_new (ctx=0x33030, >> d_config=d_config@entry=0xbefff040, domid=domid@entry=0xbeffef80, >> ao_how=ao_how@entry=0x0, aop_console_how=aop_console_how@entry=0x0) >> at libxl_create.c:1449 >> #6 0x00017040 in create_domain (dom_info=0xbeffefdc) at xl_cmdimpl.c:2283 >> #7 main_create (argc=<optimized out>, argv=<optimized out>) >> at xl_cmdimpl.c:4469 >> #8 0x0000db84 in main (argc=3, argv=0xbefff82c) at xl.c:362 >> (gdb) > > It's a compiler bug. For some reasons gcc doesn't generate the right assembly > when -O1 is specified on the command line. Which version of gcc do you use(4.7.*?)? > Which distribution are you using? > Can you also call disas the crash and copy the output? > > Gcc 4.8 doesn't seem to be affected. > > FYI, I got this output from 4.7 with Linaro Ubuntu raring (gcc 4.7.3). > > 0x76f71bd0 <+224>: mov r5, #0 > 0x76f71bd4 <+228>: mov r4, r5 > 0x76f71bd8 <+232>: mov r7, r5 <= r7 = r5 = 0 > 0x76f71bdc <+236>: sub r6, r11, #98304 ; 0x18000 > 0x76f71be0 <+240>: sub r6, r6, #36 ; 0x24 > 0x76f71be4 <+244>: mov r9, r5 > 0x76f71be8 <+248>: str r8, [r12, #-68] ; 0x44 > 0x76f71bec <+252>: sub r3, r11, #98304 ; 0x18000 > 0x76f71bf0 <+256>: ldr r0, [r3, #-68] ; 0x44 > 0x76f71bf4 <+260>: ldrh r1, [r6, r5] > 0x76f71bf8 <+264>: mov r2, r9 > 0x76f71bfc <+268>: bl 0x76f6d6ac > 0x76f71c00 <+272>: cmp r0, #0 > 0x76f71c04 <+276>: bne 0x76f71c50 <libxl_list_vm+352> > 0x76f71c08 <+280>: add r8, r7, r7, lsl #2 <= Last time we set r8 = r7 << 2 = 0 > 0x76f71c0c <+284>: sub r12, r11, #98304 ; 0x18000 > 0x76f71c10 <+288>: str r8, [r12, #-56] ; 0x38 > 0x76f71c14 <+292>: ldr r3, [r12, #-60] ; 0x3c > 0x76f71c18 <+296>: add lr, r3, r8, lsl #2 > 0x76f71c1c <+300>: add r12, r4, r4, lsl #1 > 0x76f71c20 <+304>: add r12, r6, r12, lsl #5 > 0x76f71c24 <+308>: add r12, r12, #76 ; 0x4c > 0x76f71c28 <+312>: ldm r12!, {r0, r1, r2, r3} > 0x76f71c2c <+316>: mov r12, r8 > => 0x76f71c30 <+320>: ldr r8, [r8, #-60] ; 0x3c <= r8 (=0) is dereferenced > I saw the same thing on my system and ack'ed that this is compiler related. My compiler is 4.7.3. I was able to fix it with the following hack: diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 730f6e1..14eac6b 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -667,7 +667,8 @@ libxl_vminfo * libxl_list_vm(libxl_ctx *ctx, int *nb_vm_out) { GC_INIT(ctx); libxl_vminfo *ptr = NULL; - int idx, i, ret; + volatile int idx, i; + int ret; xc_domaininfo_t info[1024]; ret = xc_domain_getinfolist(ctx->xch, 1, ARRAY_SIZE(info), info); > > Regards, > > ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: The segmentfault when using xl create domU 2014-04-15 22:07 ` Wei Huang @ 2014-04-16 9:21 ` Ian Campbell 2014-04-16 15:50 ` Wei Huang 0 siblings, 1 reply; 9+ messages in thread From: Ian Campbell @ 2014-04-16 9:21 UTC (permalink / raw) To: Wei Huang Cc: Stefano Stabellini (Xen mainlister), duqi, Julien Grall, 宫晓利, hdegoede, bjzhang@suse.com, xen-devel@lists.xen.org On Tue, 2014-04-15 at 17:07 -0500, Wei Huang wrote: > > It's a compiler bug. For some reasons gcc doesn't generate the right assembly > > when -O1 is specified on the command line. Which version of gcc do you use(4.7.*?)? > > Which distribution are you using? > > Can you also call disas the crash and copy the output? > > > > Gcc 4.8 doesn't seem to be affected. > > > > FYI, I got this output from 4.7 with Linaro Ubuntu raring (gcc 4.7.3). > >[...] > I saw the same thing on my system and ack'ed that this is compiler > related. My compiler is 4.7.3. I was able to fix it with the following hack: Are you also using the Linaro compiler by any chance? I've added warnings to http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling and http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions#Building_Xen_on_ARM ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: The segmentfault when using xl create domU 2014-04-16 9:21 ` Ian Campbell @ 2014-04-16 15:50 ` Wei Huang 2014-04-16 15:56 ` Julien Grall 0 siblings, 1 reply; 9+ messages in thread From: Wei Huang @ 2014-04-16 15:50 UTC (permalink / raw) To: Ian Campbell Cc: Stefano Stabellini (Xen mainlister), duqi, Julien Grall, 宫晓利, hdegoede, bjzhang@suse.com, xen-devel@lists.xen.org On 04/16/2014 04:21 AM, Ian Campbell wrote: > On Tue, 2014-04-15 at 17:07 -0500, Wei Huang wrote: >>> It's a compiler bug. For some reasons gcc doesn't generate the right assembly >>> when -O1 is specified on the command line. Which version of gcc do you use(4.7.*?)? >>> Which distribution are you using? >>> Can you also call disas the crash and copy the output? >>> >>> Gcc 4.8 doesn't seem to be affected. >>> >>> FYI, I got this output from 4.7 with Linaro Ubuntu raring (gcc 4.7.3). >>> [...] >> I saw the same thing on my system and ack'ed that this is compiler >> related. My compiler is 4.7.3. I was able to fix it with the following hack: > > Are you also using the Linaro compiler by any chance? I think so. Here is the GCC --version info: arm-linux-gnueabihf-gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 > > I've added warnings to > http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling > and > http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions#Building_Xen_on_ARM > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: The segmentfault when using xl create domU 2014-04-16 15:50 ` Wei Huang @ 2014-04-16 15:56 ` Julien Grall 0 siblings, 0 replies; 9+ messages in thread From: Julien Grall @ 2014-04-16 15:56 UTC (permalink / raw) To: Wei Huang Cc: Ian Campbell, Stefano Stabellini (Xen mainlister), duqi, 宫晓利, hdegoede, bjzhang@suse.com, xen-devel@lists.xen.org On 04/16/2014 04:50 PM, Wei Huang wrote: > On 04/16/2014 04:21 AM, Ian Campbell wrote: >> On Tue, 2014-04-15 at 17:07 -0500, Wei Huang wrote: >>>> It's a compiler bug. For some reasons gcc doesn't generate the right >>>> assembly >>>> when -O1 is specified on the command line. Which version of gcc do >>>> you use(4.7.*?)? >>>> Which distribution are you using? >>>> Can you also call disas the crash and copy the output? >>>> >>>> Gcc 4.8 doesn't seem to be affected. >>>> >>>> FYI, I got this output from 4.7 with Linaro Ubuntu raring (gcc 4.7.3). >>>> [...] >>> I saw the same thing on my system and ack'ed that this is compiler >>> related. My compiler is 4.7.3. I was able to fix it with the >>> following hack: >> >> Are you also using the Linaro compiler by any chance? > I think so. Here is the GCC --version info: > arm-linux-gnueabihf-gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 Linaro as shipped a new version of GCC 4.7 (based on 4.7.4) a couple of days ago. They don't plan to release another version of 4.7. So I don't think it's useful to report the bug. Unless it's also happen with upstream GCC. Regards, -- Julien Grall ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: The segmentfault when using xl create domU 2014-04-15 14:12 ` Julien Grall 2014-04-15 22:07 ` Wei Huang @ 2014-04-16 9:12 ` duqi 1 sibling, 0 replies; 9+ messages in thread From: duqi @ 2014-04-16 9:12 UTC (permalink / raw) To: Julien Grall, xen-devel@lists.xen.org Cc: Wei Huang, Ian Campbell, Stefano Stabellini (Xen mainlister), 宫晓利, hdegoede, bjzhang@suse.com It's a compiler bug. For some reasons gcc doesn't generate the right assembly when -O1 is specified on the command line. Which version of gcc do you use(4.7.*?)? Which distribution are you using? Can you also call disas the crash and copy the output? Gcc 4.8 doesn't seem to be affected. Hello, Thank you very much for your answer! I replace the gcc 4.7.2 with the gcc 4.8.1 and everything works. On the other hand, when I used gcc 4.7.2, I have made the below changes like here: diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 730f6e1..7c8a5cc 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -668,7 +668,8 @@ libxl_vminfo * libxl_list_vm(libxl_ctx *ctx, int *nb_vm_out) GC_INIT(ctx); libxl_vminfo *ptr = NULL; int idx, i, ret; - xc_domaininfo_t info[1024]; + //xc_domaininfo_t info[1024]; + xc_domaininfo_t info[16]; ret = xc_domain_getinfolist(ctx->xch, 1, ARRAY_SIZE(info), info); if (ret < 0) { As a result , it also works. I'm not sure if this is useful to you . Many thanks again. duqi. ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-04-16 15:56 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-04-15 2:33 The segmentfault when using xl create domU duqi 2014-04-15 8:53 ` Ian Campbell 2014-04-15 9:45 ` duqi 2014-04-15 14:12 ` Julien Grall 2014-04-15 22:07 ` Wei Huang 2014-04-16 9:21 ` Ian Campbell 2014-04-16 15:50 ` Wei Huang 2014-04-16 15:56 ` Julien Grall 2014-04-16 9:12 ` duqi
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).