All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@novell.com>
To: yunhong.jiang@intel.com
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: reports of xend not starting
Date: Mon, 22 Mar 2010 17:07:09 -0600	[thread overview]
Message-ID: <4BA7F81D.9060901@novell.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2193 bytes --]

Hi,

I received reports of xend not starting with following traceback:

[2010-03-22 14:11:56 4943] ERROR (SrvDaemon:349) Exception starting xend (ord()
expected a character, but string of length 0 found)
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvDaemon.py", line
341, in run
    servers = SrvServer.create()
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvServer.py", line
261, in create
    root.putChild('xend', SrvRoot())
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvRoot.py", line
40, in __init__
    self.get(name)
  File "/usr/lib64/python2.6/site-packages/xen/web/SrvDir.py", line 84, in get
    val = val.getobj()
  File "/usr/lib64/python2.6/site-packages/xen/web/SrvDir.py", line 52, in
getobj
    self.obj = klassobj()
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvNode.py", line
30, in __init__
    self.xn = XendNode.instance()
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendNode.py", line 1191, in
instance
    inst = XendNode()
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendNode.py", line 159, in
__init__
    self._init_PPCIs()
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendNode.py", line 282, in
_init_PPCIs
    for pci_dev in PciUtil.get_all_pci_devices():
  File "/usr/lib64/python2.6/site-packages/xen/util/pci.py", line 469, in
get_all_pci_devices
    return map(PciDevice, get_all_pci_dict())
  File "/usr/lib64/python2.6/site-packages/xen/util/pci.py", line 693, in
__init__
    self.get_info_from_sysfs()
  File "/usr/lib64/python2.6/site-packages/xen/util/pci.py", line 1256, in
get_info_from_sysfs
    self.find_capability(0x11)
  File "/usr/lib64/python2.6/site-packages/xen/util/pci.py", line 1229, in
find_capability
    capa_pointer = ord(conf_file.read(1))
TypeError: ord() expected a character, but string of length 0 found
[2010-03-22 14:11:56 4942] INFO (SrvDaemon:220) Xend exited with status 1.


I won't pretend to know the code but looks like some protection against
read() returning an empty string (EOF) is in order.  Is the attached
patch appropriate?

Regards,
Jim

    Signed-off-by:  Jim Fehlig <jfehlig@novell.com>



[-- Attachment #2: xend-startup-fix.patch --]
[-- Type: text/x-patch, Size: 624 bytes --]

Index: xen-4.0.0-testing/tools/python/xen/util/pci.py
===================================================================
--- xen-4.0.0-testing.orig/tools/python/xen/util/pci.py
+++ xen-4.0.0-testing/tools/python/xen/util/pci.py
@@ -1251,6 +1251,9 @@ class PciDevice:
         except IOError, (errno, strerr):
             raise PciDeviceParseError(('Failed to locate sysfs mount: %s: %s (%d)' %
                 (PROC_PCI_PATH, strerr, errno)))
+        except TypeError, err:
+            log.debug("Caught TypeError '%s'" % err)
+            pass
 
     def get_info_from_sysfs(self):
         self.find_capability(0x11)

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

             reply	other threads:[~2010-03-22 23:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 23:07 Jim Fehlig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-03-04 19:03 reports of xend not starting Jim Fehlig
2010-03-05  6:05 ` Masaki Kanno
2010-03-05 15:23   ` Jim Fehlig

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=4BA7F81D.9060901@novell.com \
    --to=jfehlig@novell.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yunhong.jiang@intel.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.