From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [Xen-users] 4.5 git: regression in xen systemd shutdown hangs the OS Date: Mon, 8 Dec 2014 18:19:49 +0100 Message-ID: <20141208171949.GA1819@aepfle.de> References: <948996368.3219599.1417477301121.JavaMail.yahoo@jws10637.mail.bf1.yahoo.com> <1417512564.15063.4.camel@citrix.com> <20141202151708.GA23112@aepfle.de> <20141205171102.GA24737@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20141205171102.GA24737@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Mark Pryor , Wei Liu , Stefano Stabellini , Ian Jackson , xen-devel , Xen-users List-Id: xen-devel@lists.xenproject.org On Fri, Dec 05, Olaf Hering wrote: > But even with that change xendomains is hanging if it cant talk to > xenstored for whatever reason. The result is that the sytem hangs > forever at shutdown. This looks like a bug in the tools. xl or xenstore-ls hang forever if xenstored disappears. Looks like xs_open() is the culprit. The socket functions fail, then it attempts to use xs_domain_dev() which happens to succeed. Only xenstore-ls has the '-s' option to force operating on a socket. I wonder why libxl does not pass XS_OPEN_SOCKETONLY? It just uses the wrappers for xs_open. Can xenstored run in another domain? Olaf 18:02:43.522767 stat("/var/run/xenstored/socket", {st_mode=S_IFSOCK|0600, st_size=0, ...}) = 0 18:02:43.522864 socket(PF_LOCAL, SOCK_STREAM, 0) = 3 18:02:43.522964 fcntl(3, F_GETFD) = 0 18:02:43.523035 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 18:02:43.523117 connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/xenstored/socket"}, 110) = -1 ECONNREFUSED (Connection refused) 18:02:43.523224 close(3) = 0 18:02:43.523305 stat("/proc/xen/xenbus", {st_mode=S_IFREG|0400, st_size=0, ...}) = 0 18:02:43.523393 open("/proc/xen/xenbus", O_RDWR) = 3 18:02:43.523562 brk(0) = 0x250c000 18:02:43.523638 brk(0x252d000) = 0x252d000 18:02:43.523748 rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x7fc9518e3200}, {SIG_DFL, [], 0}, 8) = 0 18:02:43.523834 write(3, "\1\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0", 16) = 16 18:02:43.523938 write(3, "/\0", 2