Public bug reported:

Binary package hint: ureadahead

Description:    Ubuntu 9.10
Release:        9.10
ureadahead     0.90.3-2    

I write this because some others and me have problems starting the
system when using upstart-job and performance optimizers like ureadahead
which is default for Ubuntu 9.10.

When switching off ureadahead the system seems to start in the right way. I 
think with
the design of some actual daemons upstart-job can not guarantee that all
daemons get started in the right order. I think the problem is that
upstart-job has no information of the working state of the started daemons.
I don't know if I'm right, but please read the following:

Currently for the most daemons the following startup mechanism is valid.
The daemon itself is started by init through an init script or an
upstart-job in the way that the daemon is loaded (partially) from disk
and executed. After that the process forks itself, sets up a child
process and returns. Init or startup-job gets control again and brings
up the next daemon in the right order.
The Problem with this is that some daemons fork and return immediately.
At this point it is not guaranteed that the daemon is ready doing its
service. You can only say that the daemon has been forked but not how
much code it has executed and which internal state it has reached.
With a standard startup this is normally not a problem. There init loads
the first init script from disk which loads and starts daemon A from
disk. Daemon A forks itself and returns. The child process uses the CPU
and begins to work while init loads the next init script from disk. This
normally leads to a correct startup order, because the forked job always
gets enough CPU time to startup completely while the system waits for io
while loading the next script or job.

With upstart-job and ureadahead the things are different. Upstart-job
brings up a lot of jobs at the same time and brings up new jobs just
after jobs have been forked on which they depend on (but still may not
be ready for service). When ureadahead also is active most of the code
is already in ram and there are even more forks per second. The system
schedules between all these new processes and some with more code may
become ready later than others. This sometimes results in a wrong
startup order. The system only starts(!) the daemons in the right order
but does not know if they are ready for service!

The problem here is not upstart-job or ureadahead itself. The problem
are some daemons which fork a job and return immediately just before
they are ready to do their service. Upstart-job has no chance to know
the point when a daemon becomes ready (And that is the point after which
depended jobs are allowed to run).
To avoid a wrong startup order all startup daemons must not return until
they have internally reached a final state and are ready doing it's
service. But this means that some daemons have to be changed. If this is
not possible as a hack the syslog, the state of some listen sockets or
the existence of file systems may be checked to see if it's time to
bring up the next jobs.
Although ureadaehad is not responsible for the malfunction I report this as a 
bug about ureadahead because without ureadahead the system is ok. Maybe you 
have a better idea where to put this bug...

ProblemType: Bug
Architecture: i386
Date: Tue Jan  5 12:51:34 2010
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
NonfreeKernelModules: nvidia
Package: ureadahead 0.90.3-2
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=de_DE.ISO-8859-1
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
SourcePackage: ureadahead
Uname: Linux 2.6.31-15-generic i686
XsessionErrors:
 (nautilus:2754): Eel-CRITICAL **: eel_preferences_get_boolean: assertion 
`preferences_is_initialized ()' failed
 (polkit-gnome-authentication-agent-1:2765): GLib-CRITICAL **: 
g_once_init_leave: assertion `initialization_value != 0' failed

** Affects: ureadahead (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386

-- 
Problems with startup order when using upstart-job and ureadahead
https://bugs.launchpad.net/bugs/503334
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to