Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 360359 - sys-apps/openrc skipping services with no apparent reason
Summary: sys-apps/openrc skipping services with no apparent reason
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-24 21:49 UTC by David Carlos Manuelda
Modified: 2018-08-06 21:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
rc-update show (rc-update_show,2.91 KB, text/plain)
2011-03-24 21:50 UTC, David Carlos Manuelda
Details
/var/log/rc.log (rc.log,4.22 KB, text/plain)
2011-03-24 21:52 UTC, David Carlos Manuelda
Details
/etc/rc.conf (rc.conf,5.14 KB, text/plain)
2011-03-24 21:53 UTC, David Carlos Manuelda
Details
emerge --info openrc (emergeinfo.txt,14.46 KB, text/plain)
2011-03-24 21:54 UTC, David Carlos Manuelda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2011-03-24 21:49:41 UTC
I run into this bug since some time, but wanted to post it here definitelly.
The problem is that openrc seems to skip starting of some services which should be started because they are listed in that runlevel (by rc-show).
I will post several files proving that along with the rclog file.

In that case, skipped services are: bluetooth, hwclock, keymaps, and possibly more.
Affected (and tested) runlevels: boot, default.

Reproducible: Always
Comment 1 David Carlos Manuelda 2011-03-24 21:50:54 UTC
Created attachment 267127 [details]
rc-update show

Output from rc-update show
Comment 2 David Carlos Manuelda 2011-03-24 21:52:28 UTC
Created attachment 267129 [details]
/var/log/rc.log

Log output from OpenRC
Comment 3 David Carlos Manuelda 2011-03-24 21:53:05 UTC
Created attachment 267131 [details]
/etc/rc.conf

Configuration file for OpenRC
Comment 4 David Carlos Manuelda 2011-03-24 21:54:29 UTC
Created attachment 267133 [details]
emerge --info openrc

Information about openrc version (latest ~amd64), and my system in general.
Comment 5 David Carlos Manuelda 2011-03-24 21:55:24 UTC
Forgot to mention that, that services can be started by hand by /etc/init.d/foo start with no problems at all, so it is not a configuration problem of those services.
Comment 6 SpanKY gentoo-dev 2011-03-25 02:01:04 UTC
does it work fine if you disable parallel ?
Comment 7 David Carlos Manuelda 2011-03-25 02:26:20 UTC
I've commented the rc_parallel line to test.
Result is not 100% equal but still failing.

In this new case, without parallel, now bluetooth starts but neither keymaps neither hwclock started this time.

And, despide /etc/init.d/bluetooth reports its status as started, bluedevil from KDE does not work until manually restart it.
Comment 8 SpanKY gentoo-dev 2011-03-25 02:45:18 UTC
do you have /lib64/rc/init.d mounted ?  do you have crap on your rootfs screwing things up ?

mkdir /mnt/tmp
mount --bind / /mnt/tmp
ls /mnt/tmp/lib64/rc/init.d/
Comment 9 David Carlos Manuelda 2011-03-25 14:32:55 UTC
(In reply to comment #8)
> do you have /lib64/rc/init.d mounted ?  do you have crap on your rootfs
> screwing things up ?
> 
> mkdir /mnt/tmp
> mount --bind / /mnt/tmp
> ls /mnt/tmp/lib64/rc/init.d/

ls /mnt/tmp/lib64/rc/init.d/
coldplugged  daemons  depcache  depconfig  deptree  exclusive  exitcodes  failed  hotplugged  inactive  options  scheduled  snapshot  softscripts  started  starting  stopping  tmp  wasinactive
Comment 10 MrPenguin07 2011-04-13 08:17:43 UTC
I believe I am also experiencing this with hwclock.

At boot I get the error "cannot set the system time from the hardware clock"

Yet as soon as am at the shell hwclock -s works just fine.

Been happening for ~a month now.
Comment 11 David Carlos Manuelda 2011-04-13 11:21:11 UTC
Do it appear as "started"?

In my case some services are really skipped (and marked as stopped), and others (like bluetooth), are started without really being started (because they don't work until I manually restart).

It would be useful (I think) to check /etc/init.d/hwclock status prior to set it by hand, to see if openrc thinks it is started or not (despite errors).
Comment 12 David Carlos Manuelda 2011-07-11 02:10:08 UTC
Any news in this front? I can still reproduce it with and without parellel startup
Comment 13 David Carlos Manuelda 2011-08-08 23:37:19 UTC
I've retested in a clean system, and I discovered a curious thing: packages failing to be started are the same! (hwclock and keymaps specially):

Darkness stormbyte # /etc/init.d/keymaps status
 * status: stopped
Darkness stormbyte # /etc/init.d/hwclock status
 * status: stopped
Darkness stormbyte # rc-update show
       NetworkManager |      default                 
                acpid |      default                 
         avahi-daemon |      default                 
       avahi-dnsconfd |      default                 
            bluetooth |      default                 
             bootmisc | boot                         
           consolekit |      default                 
                cupsd |      default                 
                 dbus |      default                 
                devfs |                       sysinit
                dmesg |                       sysinit
                 fsck | boot                         
             hostname | boot                         
              hwclock | boot                         
              keymaps | boot default                 
            killprocs |              shutdown        
                local |      default                 
           localmount | boot                         
        microcode_ctl | boot                         
              modules | boot                         
             mount-ro |              shutdown        
                 mtab | boot                         
                mysql |      default                 
               net.lo | boot                         
             netmount |      default                 
       postgresql-9.0 |      default                 
               procfs | boot                         
                 root | boot                         
            savecache |              shutdown        
                 swap | boot                         
               sysctl | boot                         
            syslog-ng |      default                 
         termencoding | boot                         
                 udev |                       sysinit
       udev-postmount |      default                 
              urandom | boot                         
           vixie-cron |      default                 
                  xdm |      default

Could it be a bug of handling those two specially?
Comment 14 David Carlos Manuelda 2012-01-18 17:02:43 UTC
Some time have passed. I formatted and install from scratch and it is still failing (~amd64).

Seems I still need to start some init.d scripts by hand, and some other are started normally.

For example keymaps is affected too.

I realized that putting them manually via rc-update add XXX default does not work either.
Comment 15 David Carlos Manuelda 2014-03-22 05:02:07 UTC
Anyway I can debug openrc to know why some services are listed in the autorun but not started in fact?
Mainly the hwclock service is of the important services that are not started :(
Comment 16 William Hubbs gentoo-dev 2014-08-09 21:14:42 UTC
The version of OpenRC in this report is 0.8.0 which has not been
supported for some time.

Can you please test with current stable (0.12.4 as of this writing) and
let us know if the issue is still occurring?

Thanks,

William
Comment 17 David Carlos Manuelda 2015-04-01 12:40:07 UTC
I went to systemd, that is why I didn't noticed anything more, but I fed up of systemd, and now I am back in OpenRC.

Still can reproduce the bug with this new install with openRC: 0.12.4-r4

Also happens to a friend of mine (realized that because his clock was always wrong and had to update it manually in every reboot because hwclock was not being started correctly).

As of the time, I discovered that is seems to affect only to low level init scripts (hwclock, consolefont, bluetooth, and the like), but not to other higher level ones (xdm and the like).

I update this bug report status accordingly.

P.S. As I said before, I am out of ideas of how to debug this, and know why it is happenning, but I am available to follow instructions if you need me to attach logs, or whatever
Comment 18 David Carlos Manuelda 2015-04-24 09:21:05 UTC
Also, over the time I found that it only happens to "special" services, like keymaps, and hwclock.

Do they have some special thing, or they are just like the others? If so, why are these always failing?

I found a similar bugreport about rc cache and date problems, which can be also the cause of this (despite the proposed workaround didn't worked for me). Bug #411461

Also, why if it is present at boot runlevel they are not executed, but others which are present in same boot runlevel are?

More tests I did:
1) remove hwclock from boot runlevel and add it to default runlevel => Not executed automatically
2) copy /etc/init.d/hwclock to /etc/init.d/myhwclock and add myhwclock to default runlevel => not executed automatically.

I just don't know what more to do, and this is very important, specially when dualboot with windows is present and I am always having the wrong clock (it is set to local, but since the script is not being executed, I always get 2 hours more), and I want to avoid changing to systemd, which is, atm, the only one workaround I found.
Comment 19 David Carlos Manuelda 2016-10-19 03:27:14 UTC
Retested with OpenRC-0.22.2, with same synthoms. Any hints of what may be happening, or a way to get a backtrace of why some services are just not being started?
Comment 20 David Carlos Manuelda 2017-05-23 19:27:16 UTC
I finally tracked down this whole issue, maybe I was the culprit after all. The reason causing this behavior is in /etc/rc.conf:

rc_sys="uml", which I set, leading probably to confusion as of description of "User mode linux".

If this was my fault after all, close this bug as invalid, but I suggest a comment there to reflect better this issue.

Thank you
Comment 21 David Carlos Manuelda 2018-08-06 21:28:51 UTC
As I said in my last post, it was a missconfiguration issue