OpenVZ Forum


Home » General » Support » Init Problem on Ubuntu Gutsy Gibson
Init Problem on Ubuntu Gutsy Gibson [message #22225] Tue, 23 October 2007 19:06 Go to next message
ckpeter is currently offline  ckpeter
Messages: 8
Registered: October 2006
Junior Member
I am working on a gutsy 7.10 template cache for OpenVZ.

The way I have done so is by using the available dapper 6.06 template as a base, and progressively upgrade to edgy, then feisty, and gutsy.

I now have the template built out, but I am having trouble with init. It seems like the init daemon is stuck on something and is consuming 100% CPU. I am able to enter the VE by vzctl enter, and I can even install packages and perform other tasks, but no service is started up and runlevel says it is unknown.

The host OS is CentOS 5.

uname -a:
2.6.18-8.1.8.el5.028stab039.1 #1 SMP Mon Jul 23 18:02:32 MSD 2007 x86_64 x86_64 x86_64 GNU/Linux

rpm -q vzctl:
vzctl-3.0.18-1

Any idea why init is stuck on 100% CPU usage? I read about problems with OpenVZ and the upstart implementation in prior version of ubuntu, but I assume that that has already been fixed.

[Updated on: Fri, 26 October 2007 18:33]

Report message to a moderator

Re: Ubuntu Gutsy Gibson Template Cache [message #22254 is a reply to message #22225] Wed, 24 October 2007 06:41 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
when you strace the init process, is it looping on any obvious problems?

generally when a linux process is doing something but at the same time accomplishing nothing, ie looping, strace is your best ally.



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Ubuntu Gutsy Gibson Template Cache [message #22304 is a reply to message #22225] Wed, 24 October 2007 16:06 Go to previous messageGo to next message
ckpeter is currently offline  ckpeter
Messages: 8
Registered: October 2006
Junior Member
I ran a strace:
[root@host ~]# strace -fF -o vz.out vzctl --verbose start 3001
Starting VE ...
VE is mounted
Adding IP address(es): x.x.x.x
Running VE script: /etc/vz/dists/scripts/debian-add_ip.sh
[ Process PID=18853 runs in 32 bit mode. ]
[ Process PID=18852 runs in 64 bit mode. ]
Execution timeout expired
ptrace: umoven: Input/output error
Got signal 15
Setting CPU units: 1000
Configure meminfo: 204800
Running VE script: /etc/vz/dists/scripts/set_dns.sh
[ Process PID=19118 runs in 32 bit mode. ]
[ Process PID=19117 runs in 64 bit mode. ]
[ Process PID=19118 runs in 32 bit mode. ]
[ Process PID=19117 runs in 64 bit mode. ]
[ Process PID=19118 runs in 32 bit mode. ]
[ Process PID=19117 runs in 64 bit mode. ]
Execution timeout expired
ptrace: umoven: Input/output error
Got signal 15
File resolv.conf was modified
VE start in progress...
[ Process PID=18826 runs in 32 bit mode. ]


At this point I control-C to get out of the process.

The trace file reveals that it is choking on /dev/console:

18826 open("/dev/console", O_WRONLY|O_NOCTTY) = -1 EACCES (Permission denied)
18826 read(3, 0xbff6f20b, 1)            = -1 EAGAIN (Resource temporarily unavailable)
18826 waitid(P_ALL, 0, {}, WNOHANG|WEXITED|WNOWAIT, NULL) = 0
18826 time(NULL)                        = 1193241775
18826 select(4, [0 3], [], [], NULL)    = 1 (in [0])
18826 getsockname(0, 0xbff6ef04, [112]) = -1 ENOTSOCK (Socket operation on non-socket)
18826 recvmsg(0, 0xbff6efa8, MSG_PEEK)  = -1 ENOTSOCK (Socket operation on non-socket)
18826 time(NULL)                        = 1193241775
18826 stat64(0xb7fb83a6, 0xbff6ebe8)    = 0
18826 stat64(0xb7fb83a6, 0xbff6eaa0)    = 0
18826 stat64(0xb7fb83a6, 0xbff6eaa0)    = 0
18826 socket(PF_FILE, SOCK_DGRAM, 0)    = 1
18826 fcntl64(1, F_SETFD, FD_CLOEXEC)   = 0
18826 connect(1, {sa_family=AF_FILE, path="/dev/log"}, 110) = -1 ENOENT (No such file or directory)
18826 close(1)                          = 0
18826 open("/dev/console", O_WRONLY|O_NOCTTY) = -1 EACCES (Permission denied)
18826 read(3, 0xbff6f20b, 1)            = -1 EAGAIN


The preceding output repeats over and over.

[Updated on: Fri, 26 October 2007 18:31]

Report message to a moderator

Re: Ubuntu Gutsy Gibson Template Cache [message #22312 is a reply to message #22304] Wed, 24 October 2007 23:21 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
is /dev mounted? ls -dl /dev



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Ubuntu Gutsy Gibson Template Cache [message #22314 is a reply to message #22225] Thu, 25 October 2007 00:56 Go to previous messageGo to next message
ckpeter is currently offline  ckpeter
Messages: 8
Registered: October 2006
Junior Member
It looks like /dev is mounted with a number of entries in it. I also see console listed:

crw------- 1 root   tty     5,   1 Oct 20 23:16 console


Re: Init Problem for Ubuntu Gutsy Gibson [message #22380 is a reply to message #22225] Fri, 26 October 2007 18:29 Go to previous messageGo to next message
ckpeter is currently offline  ckpeter
Messages: 8
Registered: October 2006
Junior Member
I have been playing more with it. After I replace /dev/console with a plain file, it look like the problem is not with /dev/console. The real problem, as suggested by the error message written to /dev/console, is:

init: Error on control socket: Socket operation on non-socket

I also see /dev/log being mentioned in the trace.

This seems reminiscent of the upstart problem that OpenVZ had with Ubuntu's init. However, all the postings that I was able to find suggest that this was a bug in upstart that has already been fixed.

Any idea if there is a workaround for this?
Re: Init Problem on Ubuntu Gutsy Gibson [message #22390 is a reply to message #22225] Fri, 26 October 2007 21:39 Go to previous messageGo to next message
ckpeter is currently offline  ckpeter
Messages: 8
Registered: October 2006
Junior Member
One more update:

It looks like there is also a bug report filed for Ubuntu feisty:

http://bugzilla.openvz.org/show_bug.cgi?id=662

Incidentally, I also have some other Ubuntu VE that has been upgraded from dapper to feisty, yet they start fine. It is only the latest template, which I want to build from scratch, that I have problem with.
Re: Init Problem on Ubuntu Gutsy Gibson [message #22600 is a reply to message #22390] Wed, 31 October 2007 12:14 Go to previous messageGo to next message
vaverin is currently offline  vaverin
Messages: 708
Registered: September 2005
Senior Member
Hi Peter,

as work-around I would like propose you to replace "upstart" to "sysvinit" in your template.

Thank you,
Vasily Averin
Re: Init Problem on Ubuntu Gutsy Gibson [message #22614 is a reply to message #22390] Wed, 31 October 2007 13:30 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

So, the thing is, upstart will not work in Ubuntu until bug #662 will be fixed. For now, you can use sysvinit package instead of upstart.

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Init Problem on Ubuntu Gutsy Gibson [message #22617 is a reply to message #22225] Wed, 31 October 2007 15:28 Go to previous messageGo to next message
ckpeter is currently offline  ckpeter
Messages: 8
Registered: October 2006
Junior Member
Thanks for the suggestion. I had to do that to get Gutsy to work. I followed the instruction from http://wiki.vpslink.com/index.php?title=HOWTO:_Fix_Missing_u buntu-minimal_dependencies_for_Ubuntu_6.10_(Edgy_Eft) to make a dummy upstart package, and the Gutsy VE now starts fine.

[Updated on: Wed, 31 October 2007 15:50]

Report message to a moderator

Re: Init Problem on Ubuntu Gutsy Gibson [message #22716 is a reply to message #22617] Fri, 02 November 2007 02:17 Go to previous message
dobias is currently offline  dobias
Messages: 1
Registered: November 2007
Junior Member
I encountered the same problem but after replacing "upstart" with "sysvinit" (using aptitude) and rebooting the virtual machine the problem with 100% CPU load was gone Smile
Vladimir
Previous Topic: Can I use any 64 bit guests on an i386 machine?
Next Topic: problem when run shell script by vzctl exec
Goto Forum:
  


Current Time: Sun Jul 06 10:14:32 GMT 2025

Total time taken to generate the page: 0.04123 seconds