All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mick Jordan <Mick.Jordan@sun.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: Help with Guest creation problem
Date: Tue, 02 Jun 2009 15:08:34 -0700	[thread overview]
Message-ID: <4A25A2E2.4020304@Sun.COM> (raw)

This problem is a bit out of the mainstream as it relates to guests that 
terminate quickly, which the typical OS guest does not do, but my Java 
guest applications sometimes do.

The problem manifests itself as the behavior below. I believe that the 
cause is some race between the guest terminating, console output and the 
xm code. I'm no Python expert but it doesn't look as if the error 
handling in do_console is working correctly. Note that if the guest is 
made to sleep for a second before terminating, this behavior never happens.

I've experienced this occasionally on Solaris xVM and very frequently on 
various flavors of Xen/Linux.

Any insight appreciated.

Mick

# xm create -c xmconfigs/domain_config_generic extra= 
-XX:SemiSpaceGC:Virtual   -cp /guestvm/image/GuestVM/bin 
test.java.lang.Null  name=GuestVM-test.java.lang.Null-mjj
Unexpected error: <type 'exceptions.OSError'>

Please report to xen-devel@lists.xensource.com
Traceback (most recent call last):
  File "/usr/sbin/xm", line 10, in <module>
    main.main(sys.argv)
  File "/usr/lib64/python2.5/site-packages/xen/xm/main.py", line 2500, 
in main
    _, rc = _run_cmd(cmd, cmd_name, args)
  File "/usr/lib64/python2.5/site-packages/xen/xm/main.py", line 2524, 
in _run_cmd
    return True, cmd(args)
  File "<string>", line 1, in <lambda>
  File "/usr/lib64/python2.5/site-packages/xen/xm/main.py", line 1302, 
in xm_importcommand
    cmd.main([command] + args)
  File "/usr/lib64/python2.5/site-packages/xen/xm/create.py", line 1293, 
in main
    do_console(sxp.child_value(config, 'name', -1))
  File "/usr/lib64/python2.5/site-packages/xen/xm/create.py", line 1318, 
in do_console
    (p, rv) = os.waitpid(cpid, os.WNOHANG)
OSError: [Errno 10] No child processes
[root@diy-3-15 GuestVMNative]#

create.py:

def do_console(domain_name):
    cpid = os.fork()
    if cpid != 0:
        for i in range(10):
            # Catch failure of the create process
            time.sleep(1)
            (p, rv) = os.waitpid(cpid, os.WNOHANG)
            if os.WIFEXITED(rv):
                if os.WEXITSTATUS(rv) != 0:
                    sys.exit(os.WEXITSTATUS(rv))
            try:
                # Acquire the console of the created dom
                if serverType == SERVER_XEN_API:
                    domid = server.xenapi.VM.get_domid(
                               get_single_vm(domain_name))
                else:
                    dom = server.xend.domain(domain_name)
                    domid = int(sxp.child_value(dom, 'domid', '-1'))
                console.execConsole(domid)
            except:
                pass
        print("Could not start console\n");
        sys.exit(0)

             reply	other threads:[~2009-06-02 22:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 22:08 Mick Jordan [this message]
2009-06-04  6:12 ` Help with Guest creation problem Simon Horman
2009-06-04  6:22   ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A25A2E2.4020304@Sun.COM \
    --to=mick.jordan@sun.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.