Skip to contentSkip to conversation

wrong logrotate for /var/log/xen/xend.log

PATCH Olaf Hering 1 participant 3 messages Sep 14, 2010

lore
Share & tools
lore
#0 lore raw

Hello,

where is the code to rotate /var/log/xen/xend.log after 1M? Its appearently not logrorate itself because this change has no effect even after reboot:

etc/logrotate.d/xen 2010-09-13 23:53:19.000000000 +0200 renamed from etc/logrotate.d/xen~ 2010-09-10 17:59:26.000000000 +0200 +2 -2
@@ -2,8 +2,8 @@ compress
 missingok
 
 /var/log/xen/xend*.log {
-       rotate 5
-       size 1M
+       rotate 42
+       size 42M
        notifempty
        copytruncate
 }

I was trying to catch what happend before my xenpaging testcase floods the logs with this, caused by xm domstate $id calls to monitor guests.

[2010-09-14 13:24:30 4625] ERROR (xmlrpclib2:178) Internal error handling xend.domain Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/xen/util/xmlrpclib2.py", line 131, in _marshaled_dispatch
response = self._dispatch(method, params)
File "/usr/lib64/python2.6/SimpleXMLRPCServer.py", line 418, in _dispatch
return func(*params)
File "/usr/lib64/python2.6/site-packages/xen/xend/server/XMLRPCServer.py", line 59, in domain
info = lookup(domid)
File "/usr/lib64/python2.6/site-packages/xen/xend/server/XMLRPCServer.py", line 51, in lookup
info = XendDomain.instance().domain_lookup(domid)
File "/usr/lib64/python2.6/site-packages/xen/xend/XendDomain.py", line 556, in domain_lookup
self._refresh(refresh_shutdown = False)
File "/usr/lib64/python2.6/site-packages/xen/xend/XendDomain.py", line 428, in _refresh
txn = xstransact()
File "/usr/lib64/python2.6/site-packages/xen/xend/xenstore/xstransact.py", line 29, in __init__
self.transaction = xshandle().transaction_start()
Error: (22, 'Invalid argument')

#1 lore raw
Quoted 1 line · Olaf Hering

[2010-09-14 13:24:30 4625] ERROR (xmlrpclib2:178) Internal error handling xend.domain

Poking around, something is leaking ressources in xenstored:

accept(4, 0, NULL) = -1 EMFILE (Too many open files)
select(1024, [4 ... 1023], [], NULL, NULL) = 1 (in [4])

pidof xenpaging | xargs -n1 lsof -n -p | grep -wc socket 1000

There is always one more thing...

#2 lore raw
Quoted 7 lines · Olaf Hering
Quoted 1 line · Olaf Hering

[2010-09-14 13:24:30 4625] ERROR (xmlrpclib2:178) Internal error handling xend.domain

Poking around, something is leaking ressources in xenstored:

Quoted 6 lines

accept(4, 0, NULL) = -1 EMFILE (Too many open files)
select(1024, [4 ... 1023], [], NULL, NULL) = 1 (in [4])

pidof xenpaging | xargs -n1 lsof -n -p | grep -wc socket 1000

Which is fixed by this missing change in 4.0.1:

Missing from commit 'libxl: Backported stuff from unstable' Without this change, xs_daemon_open/xs_daemon_close will leak filedescriptors.

tools/xenstore/xs.c +2 -0
@@ -285,6 +299,8 @@ void xs_daemon_close(struct xs_handle *h
 	mutex_unlock(&h->request_mutex);
 	mutex_unlock(&h->reply_mutex);
 	mutex_unlock(&h->watch_mutex);
+
+        close_fds_free(h);
 }
 
 static bool read_all(int fd, void *data, unsigned int len)