[Pkg-libvirt-maintainers] Bug#884753: virt-sandbox: crash (SIGSEGV) when starting two instances at the same time

Paul Wise pabs at debian.org
Tue Dec 19 05:21:54 UTC 2017


Package: virt-sandbox
Version: 0.5.1+git20160404-1
Severity: normal
Usertags: crash

When I start two instances of virt-sandbox at the same time, the second
one of them crashes and the first one gets an error. The error message
is different depending on how long the second one waits to start. It
seems like each instance is using shared resources but shouldn't be.

pabs at chianamo ~ $ virt-sandbox echo true & virt-sandbox echo false &
[1] 22705
[2] 22706
pabs at chianamo ~ $ 
[2]+  Segmentation fault      (core dumped) virt-sandbox echo false
pabs at chianamo ~ $ 

[1]+  Stopped                 virt-sandbox echo true
pabs at chianamo ~ $ 
pabs at chianamo ~ $ fg
virt-sandbox echo true
Unable to attach sandbox console: Unable to open console: Domain not found: no domain with matching uuid '85f03b0f-e936-42d6-bb26-9ba1bd1a80e5' (sandbox)
pabs at chianamo ~ $ find /var/crash/ -ls
  1316655      4 drwxrwxrwt   4 root     root         4096 Dec  4 13:40 /var/crash/
  1341853      4 drwx------   2 pabs     root         4096 Dec 19 13:11 /var/crash/1000
  1315542  19132 -rw-------   1 pabs     pabs      19591168 Dec 19 13:11 /var/crash/1000/22706-1000-1000-11-1513660305-chianamo--usr-bin-virt-sandbox.core
$ gdb -batch -n -ex 'set pagination off' -ex bt -ex 'thread apply all bt full' --core /var/crash/1000/22706-1000-1000-11-1513660305-chianamo--usr-bin-virt-sandbox.core /usr/bin/virt-sandbox
[New LWP 22706]
[New LWP 22750]
[New LWP 22752]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `virt-sandbox echo false'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  gvir_sandbox_builder_clean_post_stop (builder=builder at entry=0x55705395ec20, config=config at entry=0x55705395d8d0, statedir=statedir at entry=0x55705398bb40 "/home/pabs/.cache/libvirt-sandbox/sandbox", error=error at entry=0x0) at libvirt-sandbox-builder.c:753
753	libvirt-sandbox-builder.c: No such file or directory.
[Current thread is 1 (Thread 0x7fdefeae5f80 (LWP 22706))]
#0  0x00007fdefcfee3b0 in gvir_sandbox_builder_clean_post_stop (builder=builder at entry=0x55705395ec20 [GVirSandboxBuilderMachine], config=config at entry=0x55705395d8d0 [GVirSandboxConfigInteractive], statedir=statedir at entry=0x55705398bb40 "/home/pabs/.cache/libvirt-sandbox/sandbox", error=error at entry=0x0) at libvirt-sandbox-builder.c:753
#1  0x00007fdefcff5c8b in gvir_sandbox_context_clean_post_stop (ctxt=ctxt at entry=0x5570539450f0 [GVirSandboxContextInteractive], builder=builder at entry=0x55705395ec20 [GVirSandboxBuilderMachine], error=error at entry=0x0) at libvirt-sandbox-context-interactive.c:166
#2  0x00007fdefcff616a in gvir_sandbox_context_interactive_start (ctxt=0x5570539450f0 [GVirSandboxContextInteractive], error=0x7ffe394c9320) at libvirt-sandbox-context-interactive.c:282
#3  0x0000557051818949 in main (argc=<optimized out>, argv=<optimized out>) at virt-sandbox.c:282

Thread 3 (Thread 0x7fdef0e79700 (LWP 22752)):
#0  0x00007fdefcb04a5d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fdefdbfc119 in g_main_context_poll (priority=<optimized out>, n_fds=2, fds=0x557053975900, timeout=<optimized out>, context=0x557053979bc0) at ../../../../glib/gmain.c:4187
        ret = <optimized out>
        errsv = <optimized out>
        poll_func = 0x7fdefdc0b610 <g_poll>
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 2
        allocated_nfds = 2
        fds = 0x557053975900
#2  0x00007fdefdbfc119 in g_main_context_iterate (context=0x557053979bc0, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at ../../../../glib/gmain.c:3881
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 2
        allocated_nfds = 2
        fds = 0x557053975900
#3  0x00007fdefdbfc4b2 in g_main_loop_run (loop=0x55705397aec0) at ../../../../glib/gmain.c:4082
        __func__ = "g_main_loop_run"
#4  0x00007fdefe428ad6 in gdbus_shared_thread_func (user_data=0x557053979b90) at ../../../../gio/gdbusprivate.c:275
        data = 0x557053979b90
#5  0x00007fdefdc235f5 in g_thread_proxy (data=0x55705395ecf0) at ../../../../glib/gthread.c:784
        thread = 0x55705395ecf0
#6  0x00007fdefcdcc519 in start_thread (arg=0x7fdef0e79700) at pthread_create.c:456
        __res = <optimized out>
        pd = 0x7fdef0e79700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140595501176576, 5740434195331275689, 140729859738366, 140729859738367, 140595716830624, 140595501176576, -5757852451810452567, -5757878765191570519}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fdefcb0ea4f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 2 (Thread 0x7fdef167a700 (LWP 22750)):
#0  0x00007fdefcb04a5d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fdefdbfc119 in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x557053968230, timeout=<optimized out>, context=0x557053968460) at ../../../../glib/gmain.c:4187
        ret = <optimized out>
        errsv = <optimized out>
        poll_func = 0x7fdefdc0b610 <g_poll>
        max_priority = 2147483647
        timeout = 5288
        some_ready = <optimized out>
        nfds = 1
        allocated_nfds = 1
        fds = 0x557053968230
#2  0x00007fdefdbfc119 in g_main_context_iterate (context=context at entry=0x557053968460, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at ../../../../glib/gmain.c:3881
        max_priority = 2147483647
        timeout = 5288
        some_ready = <optimized out>
        nfds = 1
        allocated_nfds = 1
        fds = 0x557053968230
#3  0x00007fdefdbfc22c in g_main_context_iteration (context=0x557053968460, may_block=may_block at entry=1) at ../../../../glib/gmain.c:3947
        retval = <optimized out>
#4  0x00007fdefdbfc271 in glib_worker_main (data=<optimized out>) at ../../../../glib/gmain.c:5742
#5  0x00007fdefdc235f5 in g_thread_proxy (data=0x55705395ec50) at ../../../../glib/gthread.c:784
        thread = 0x55705395ec50
#6  0x00007fdefcdcc519 in start_thread (arg=0x7fdef167a700) at pthread_create.c:456
        __res = <optimized out>
        pd = 0x7fdef167a700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140595509569280, 5740434195331275689, 140729859737982, 140729859737983, 140595716830624, 140595509569280, -5757855749808464983, -5757878765191570519}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#7  0x00007fdefcb0ea4f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 1 (Thread 0x7fdefeae5f80 (LWP 22706)):
#0  0x00007fdefcfee3b0 in gvir_sandbox_builder_clean_post_stop (builder=builder at entry=0x55705395ec20 [GVirSandboxBuilderMachine], config=config at entry=0x55705395d8d0 [GVirSandboxConfigInteractive], statedir=statedir at entry=0x55705398bb40 "/home/pabs/.cache/libvirt-sandbox/sandbox", error=error at entry=0x0) at libvirt-sandbox-builder.c:753
        klass = <optimized out>
        libsdir = 0x55705398a9b0 "/home/pabs/.cache/libvirt-sandbox/sandbox/config/.libs"
        libsFile = 0x55705398b200
        enumerator = 0x557053982900 [GLocalFileEnumerator]
        info = 0x0
        child = 0x0
        dskfile = 0x55705398ab40 "/home/pabs/.cache/libvirt-sandbox/sandbox/config/disks.cfg"
        ret = 1
#1  0x00007fdefcff5c8b in gvir_sandbox_context_clean_post_stop (ctxt=ctxt at entry=0x5570539450f0 [GVirSandboxContextInteractive], builder=builder at entry=0x55705395ec20 [GVirSandboxBuilderMachine], error=error at entry=0x0) at libvirt-sandbox-context-interactive.c:166
        cachedir = <optimized out>
        statedir = 0x55705398bb40 "/home/pabs/.cache/libvirt-sandbox/sandbox"
        configdir = 0x55705397b6f0 "/home/pabs/.cache/libvirt-sandbox/sandbox/config"
        configfile = 0x557053982250 "/home/pabs/.cache/libvirt-sandbox/sandbox/config/sandbox.cfg"
        emptydir = 0x55705398aa70 "/home/pabs/.cache/libvirt-sandbox/sandbox/config/empty"
        ret = 1
        config = 0x55705395d8d0 [GVirSandboxConfigInteractive]
#2  0x00007fdefcff616a in gvir_sandbox_context_interactive_start (ctxt=0x5570539450f0 [GVirSandboxContextInteractive], error=0x7ffe394c9320) at libvirt-sandbox-context-interactive.c:282
        cachedir = <optimized out>
        emptydir = 0x55705395e610 "/home/pabs/.cache/libvirt-sandbox/sandbox/config/empty"
        configfile = 0x55705395e5c0 "/home/pabs/.cache/libvirt-sandbox/sandbox/config/sandbox.cfg"
        uri = <optimized out>
        configdir = 0x55705395e570 "/home/pabs/.cache/libvirt-sandbox/sandbox/config"
        statedir = 0x557053944b00 "/home/pabs/.cache/libvirt-sandbox/sandbox"
        error = 0x7ffe394c9320
        ctxt = 0x5570539450f0 [GVirSandboxContextInteractive]
#3  0x0000557051818949 in main (argc=<optimized out>, argv=<optimized out>) at virt-sandbox.c:282
        ret = 1
        hv = 0x557053944e80 [GVirConnection]
        cfg = 0x55705395d8d0 [GVirSandboxConfigInteractive]
        icfg = <optimized out>
        ctx = 0x5570539450f0 [GVirSandboxContextInteractive]
        ictx = 0x5570539450f0 [GVirSandboxContextInteractive]
        log = 0x0
        con = 0x0
        loop = 0x557053927e20
        error = 0x55705397e450
        name = 0x0
        disks = 0x0
        envs = 0x0
        mounts = 0x0
        includes = 0x0
        includefile = 0x0
        uri = 0x0
        security = 0x0
        networks = 0x0
        cmdargs = 0x557053954700
        root = 0x0
        kernver = 0x0
        kernpath = 0x0
        kmodpath = 0x0
        switchto = 0x0
        verbose = 0
        debug = 0
        shell = 0
        privileged = 0
        context = <optimized out>
        options = {{long_name = 0x5570518190c7 "version", short_name = 86 'V', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x557051818e00 <libvirt_sandbox_version>, description = 0x557051818ee9 "display version information", arg_description = 0x0}, {long_name = 0x557051818f05 "verbose", short_name = 118 'v', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7ffe394c9310, description = 0x557051818f0d "display verbose information", arg_description = 0x0}, {long_name = 0x557051818f29 "debug", short_name = 100 'd', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7ffe394c9314, description = 0x557051818f2f "display debugging information", arg_description = 0x0}, {long_name = 0x557051818f4d "connect", short_name = 99 'c', flags = 0, arg = G_OPTION_ARG_STRING, arg_data = 0x7ffe394c9358, description = 0x557051818f55 "connect to hypervisor", arg_description = 0x557051818f6b "URI"}, {long_name = 0x557051818f6f "name", short_name = 110 'n', flags = 0, arg = G_OPTION_ARG_STRING, arg_data = 0x7ffe394c9328, description = 0x557051818f74 "name of the sandbox", arg_description = 0x557051818f88 "NAME"}, {long_name = 0x557051818f8d "root", short_name = 114 'r', flags = 0, arg = G_OPTION_ARG_STRING, arg_data = 0x7ffe394c9378, description = 0x557051818f92 "root directory of the sandbox", arg_description = 0x557051818fb0 "DIR"}, {long_name = 0x557051818fb4 "disk", short_name = 32 ' ', flags = 0, arg = G_OPTION_ARG_STRING_ARRAY, arg_data = 0x7ffe394c9330, description = 0x557051818fb9 "add a disk in the guest", arg_description = 0x557051819278 "TYPE:TAGNAME=SOURCE,format=FORMAT"}, {long_name = 0x557051818fd1 "env", short_name = 101 'e', flags = 0, arg = G_OPTION_ARG_STRING_ARRAY, arg_data = 0x7ffe394c9338, description = 0x5570518192a0 "add a environment variable for the sandbox", arg_description = 0x557051818fd5 "KEY=VALUE"}, {long_name = 0x557051818fdf "mount", short_name = 109 'm', flags = 0, arg = G_OPTION_ARG_STRING_ARRAY, arg_data = 0x7ffe394c9340, description = 0x5570518192d0 "mount a filesystem in the guest", arg_description = 0x557051818fe5 "TYPE:TARGET=SOURCE"}, {long_name = 0x557051818ff8 "include", short_name = 105 'i', flags = 0, arg = G_OPTION_ARG_STRING_ARRAY, arg_data = 0x7ffe394c9348, description = 0x557051819000 "file to copy into custom dir", arg_description = 0x55705181901d "GUEST-PATH=HOST-PATH"}, {long_name = 0x557051819032 "includefile", short_name = 73 'I', flags = 0, arg = G_OPTION_ARG_STRING, arg_data = 0x7ffe394c9350, description = 0x5570518192f0 "file contain list of files to include", arg_description = 0x55705181903e "FILE"}, {long_name = 0x557051819043 "network", short_name = 78 'N', flags = 0, arg = G_OPTION_ARG_STRING_ARRAY, arg_data = 0x7ffe394c9368, description = 0x557051819318 "setup network interface properties", arg_description = 0x55705181902d "PATH"}, {long_name = 0x55705181904b "security", short_name = 115 's', flags = 0, arg = G_OPTION_ARG_STRING, arg_data = 0x7ffe394c9360, description = 0x557051819054 "security properties", arg_description = 0x55705181902d "PATH"}, {long_name = 0x557051819078 "privileged", short_name = 112 'p', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7ffe394c931c, description = 0x557051819068 "run the command privileged", arg_description = 0x0}, {long_name = 0x557051819083 "switchto", short_name = 83 'S', flags = 0, arg = G_OPTION_ARG_STRING, arg_data = 0x7ffe394c9398, description = 0x55705181908c "switch to the given user", arg_description = 0x5570518190a5 "USER"}, {long_name = 0x5570518190b2 "shell", short_name = 108 'l', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7ffe394c9318, description = 0x5570518190aa "start a shell", arg_description = 0x0}, {long_name = 0x5570518190b8 "kernver", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_STRING, arg_data = 0x7ffe394c9380, description = 0x5570518190c0 "kernel version", arg_description = 0x0}, {long_name = 0x5570518190cf "kernpath", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_STRING, arg_data = 0x7ffe394c9388, description = 0x5570518190d8 "kernel binary path", arg_description = 0x0}, {long_name = 0x5570518190eb "kmodpath", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_STRING, arg_data = 0x7ffe394c9390, description = 0x5570518190f4 "kernel module directory", arg_description = 0x0}, {long_name = 0x557051819153 "", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_STRING_ARRAY, arg_data = 0x7ffe394c9370, description = 0x0, arg_description = 0x55705181910c "COMMAND-PATH [ARGS...]"}, {long_name = 0x0, short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x0, description = 0x0, arg_description = 0x0}}
        help_msg = 0x557051819340 "Run 'virt-sandbox --help' to see a full list of available command line options"
        pw = <optimized out>

-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.14.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8), LANGUAGE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages virt-sandbox depends on:
ii  gir1.2-libvirt-sandbox-1.0  0.5.1+git20160404-1
ii  libc6                       2.25-5
ii  libglib2.0-0                2.54.1-1
ii  libvirt-glib-1.0-0          1.0.0-1
ii  libvirt-sandbox-1.0-5       0.5.1+git20160404-1
ii  libvirt0                    3.10.0-1
ii  libxml2                     2.9.4+dfsg1-5.2
ii  python                      2.7.14-3

virt-sandbox recommends no packages.

Versions of packages virt-sandbox suggests:
ii  libguestfs-tools  1:1.36.11-1

-- no debconf information

-- 
bye,
pabs

https://wiki.debian.org/PaulWise
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-libvirt-maintainers/attachments/20171219/44b969d4/attachment.sig>


More information about the Pkg-libvirt-maintainers mailing list