xl create and destroy segfault before completing

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

xl create and destroy segfault before completing

Ian Macdonald-2
Hi,

I am running Xen in PV mode on Debian stretch on an Intel 64-bit machine
in EFI mode.

I can use xen-create-image to create a domU machine but when I run 'xl
create' or 'xl destroy', the xl binary segfaults. The commands seem to
work, as 'xl create' gets the domU machine running correctly, as far as
I can tell, but then the xl command segfaults before exiting. The 'xl
destroy' command also appears to work, it kills off the domU as it
should, but then xl segfaults. All other 'xl' commands seem to work,
only 'create' and 'destroy' seem to segfault like this.

The domU machines seem to work correctly, but I would like to understand
and solve this problem before putting this server into production. I'd
appreciate any suggestions anyone has about what might be going on here.

Here's the output of 'xl -vvvv create /etc/xen/krytest.cfg':
https://pastebin.com/RmcdRzgJ

...And here's the output of 'xl -vvvv destroy krytest':
https://pastebin.com/WCGZseP4

Here's the output of
'strace -eopen /usr/sbin/xl create /etc/xen/krytest.cfg':
https://pastebin.com/9R1dNTcx

The 'create' and 'deploy' commands both provoke a 'Segmentation Fault',
although the domU appears to be correctly created and destroyed.

The /etc/xen/krytest.cfg config file looks like this:

bootloader = '/usr/lib/xen-4.8/bin/pygrub'
vcpus       = '2'
memory      = '1024'
cpus        = "5-6"
root        = '/dev/xvda2 ro'
disk        = [
                  'phy:/dev/vg0/krytest-root,xvda2,w',
                  'phy:/dev/vg0/krytest-var,xvda3,w',
                  'phy:/dev/vg0/krytest-swap,xvda1,w',
              ]
name        = 'krytest'
vif         = [
'ip=193.XX.XX.162,mac=00:16:3E:0B:12:4E,vifname=vif-krytest,bridge=xenbr0' ]
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'

Thanks in advance for any help anyone can provide me towards sorting out
this problem.

Best wishes,
-Ian Macdonald
 GreenNet Ltd

--
Ian Macdonald
GPG/PGP: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
XMPP/OTR: [hidden email]  Wire.com: @idmacdonald

GreenNet Ltd, 56-64 Leonard Street, London EC2A 4LT
UK Tel:      0330 355 4011
Intl:        +44 20 7065 0935
Twitter:     @GreenNetISP
Registered in England & Wales, Company No. 02070438


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

signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xl create and destroy segfault before completing

Ian Macdonald-2
Hi,

On 28/05/18 19:07, Ian Macdonald wrote:

> I am running Xen in PV mode on Debian stretch on an Intel 64-bit machine
> in EFI mode.
>
> I can use xen-create-image to create a domU machine but when I run 'xl
> create' or 'xl destroy', the xl binary segfaults. The commands seem to
> work, as 'xl create' gets the domU machine running correctly, as far as
> I can tell, but then the xl command segfaults before exiting. The 'xl
> destroy' command also appears to work, it kills off the domU as it
> should, but then xl segfaults. All other 'xl' commands seem to work,
> only 'create' and 'destroy' seem to segfault like this.
>
> The domU machines seem to work correctly, but I would like to understand
> and solve this problem before putting this server into production. I'd
> appreciate any suggestions anyone has about what might be going on here.
Just to add a bit more information, here's the output from running the
'xl create' command via gdb. Any suggestions regarding how to fix or
avoid this segfault would be much appreciated.

Thanks,
-Ian

********

root@server:/home/support# gdb --args /usr/lib/xen-4.8/bin/xl create
/etc/xen/krytest.cfg
Reading symbols from /usr/lib/xen-4.8/bin/xl...Reading symbols from
/usr/lib/debug/.build-id/c9/5b8edd3bed99d99b4f85c2b4cad3c6379e7269.debug...done.
done.
(gdb) r
Starting program: /usr/lib/xen-4.8/bin/xl create /etc/xen/krytest.cfg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Parsing config from /etc/xen/krytest.cfg
[New Thread 0x7ffff7ff2700 (LWP 29932)]

Thread 2 "xl" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7ff2700 (LWP 29932)]
0x00007ffff7de30b5 in _dl_lookup_symbol_x (undef_name=0x7ffff5477c63
"_Unwind_Find_FDE", undef_map=0x555555789310,
ref=ref@entry=0x7ffff7ff0128, symbol_scope=0x555555789668,
    version=0x55555578d620, type_class=type_class@entry=1, flags=5,
skip_map=0x0) at dl-lookup.c:833
833     dl-lookup.c: No such file or directory.
(gdb) bt full
#0  0x00007ffff7de30b5 in _dl_lookup_symbol_x (undef_name=0x7ffff5477c63
"_Unwind_Find_FDE", undef_map=0x555555789310,
ref=ref@entry=0x7ffff7ff0128, symbol_scope=0x555555789668,
    version=0x55555578d620, type_class=type_class@entry=1, flags=5,
skip_map=0x0) at dl-lookup.c:833
        res = <optimized out>
        start = 0
        old_hash = 4294967295
        current_value = {s = 0x0, m = 0x0}
        scope = 0x555555789668
        __PRETTY_FUNCTION__ = "_dl_lookup_symbol_x"
        i = 0
        protected = <optimized out>
#1  0x00007ffff7de7c54 in _dl_fixup (l=<optimized out>,
reloc_arg=<optimized out>) at ../elf/dl-runtime.c:111
        version = <optimized out>
        flags = <optimized out>
        symtab = <optimized out>
        strtab = <optimized out>
        reloc = <optimized out>
        sym = 0x7ffff5476f68
        rel_addr = 0x7ffff568c110
        result = <optimized out>
        value = <optimized out>
        __PRETTY_FUNCTION__ = "_dl_fixup"
#2  0x00007ffff7def35a in _dl_runtime_resolve_xsavec () at
../sysdeps/x86_64/dl-trampoline.h:125
No locals.
#3  0x00007ffff5484b13 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
No symbol table info available.
#4  0x00007ffff5485d30 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
No symbol table info available.
#5  0x00007ffff5486336 in _Unwind_ForcedUnwind () from
/lib/x86_64-linux-gnu/libgcc_s.so.1
No symbol table info available.
#6  0x00007ffff72f9d60 in __GI___pthread_unwind (buf=<optimized out>) at
unwind.c:121
        ibuf = <optimized out>
        self = <optimized out>
#7  0x00007ffff72efc5a in __do_cancel () at ./pthreadP.h:283
No locals.
#8  sigcancel_handler (sig=<optimized out>, si=0x7ffff7ff1130,
ctx=<optimized out>) at nptl-init.c:220
        newval = <optimized out>
        curval = <optimized out>
        oldval = <optimized out>
        si = 0x7ffff7ff1130
        ctx = <optimized out>
        oldval = <optimized out>
#9  <signal handler called>

--
Ian Macdonald
GPG/PGP: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
XMPP/OTR: [hidden email]  Wire.com: @idmacdonald

GreenNet Ltd, 56-64 Leonard Street, London EC2A 4LT
UK Tel:      0330 355 4011
Intl:        +44 20 7065 0935
Twitter:     @GreenNetISP
Registered in England & Wales, Company No. 02070438


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

signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xl create and destroy segfault before completing

Olaf Hering-2
In reply to this post by Ian Macdonald-2
On Mon, May 28, Ian Macdonald wrote:

> I am running Xen in PV mode on Debian stretch on an Intel 64-bit machine
...
> The 'create' and 'deploy' commands both provoke a 'Segmentation Fault',

Increase the thread stacksize to workaround a bug in glibc.
Or use xen-4.11, which is supposed to work around that bug.

Olaf

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

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xl create and destroy segfault before completing

Ian Macdonald-2
Hi Olaf,

On 29/05/18 11:04, Olaf Hering wrote:
> On Mon, May 28, Ian Macdonald wrote:
>
>> I am running Xen in PV mode on Debian stretch on an Intel 64-bit machine
> ...
>> The 'create' and 'deploy' commands both provoke a 'Segmentation Fault',
>
> Increase the thread stacksize to workaround a bug in glibc.
> Or use xen-4.11, which is supposed to work around that bug.

Thanks for that suggestion.

I did a bit of searching and came up with this email with a suggested patch:

https://lists.xenproject.org/archives/html/xen-devel/2018-02/msg01946.html

I applied that patch to change the default stacksize to 32k and
recompiled, which seems to have solved the problem. The 'create' and
'deploy' commands now run correctly without segfaulting.

Many thanks for your help.

Best,
-Ian


--
Ian Macdonald
GPG/PGP: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
XMPP/OTR: [hidden email]  Wire.com: @idmacdonald

GreenNet Ltd, 56-64 Leonard Street, London EC2A 4LT
UK Tel:      0330 355 4011
Intl:        +44 20 7065 0935
Twitter:     @GreenNetISP
Registered in England & Wales, Company No. 02070438


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

signature.asc (817 bytes) Download Attachment