View previous topic :: View next topic |
Author |
Message |
greyspoke Apprentice
Joined: 08 Jan 2010 Posts: 171
|
Posted: Sat Aug 13, 2016 4:29 pm Post subject: init scripts suddenly borked on update |
|
|
Running ~amd64
Did a world update this morning. It appeared to go OK so I turned off.
Turned on again this afternoon and openrc threw me loads of errors. Basically, when starting services there was "unexpected ed of file" for most of the scripts.
Fortunately i can still log in and look at the files. It looks like all the init files updated this morning are affected. They all appear to have a scripting error at the beginning. The precise nature of this varies (I havent checked all of them) but here is an example from sysfs (typed out, not pasted):
Code: |
#!/sbin/openrc-run
# Copyright (c) 2007-2015 the OpenRC Authors
...
depend ()
{
openrc-run
# Copyright (c) 2007-2015 the OpenRC Authors}
mount_sys ()
{
...
}
|
and so on.
The closing } of depend () is commented out, presumably the cause of the prob. I've got old versions on a backup somewhere, just got to find my rescue disk...
Actually looking at it, a chunk from the introductory comments and part of the shebang appears to have got randomly pasted just before the end of the deped function, same in the other ones I've looked at. I would have thought all these init scripts would belong to different packages, but a large bunch seem to have got updated all at once, and problematically.
Anyoe else got this?
ETA manual edit might not take so long... |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Sat Aug 13, 2016 6:08 pm Post subject: |
|
|
Looks like a filesystem corruption. I would do an fsck... |
|
Back to top |
|
|
greyspoke Apprentice
Joined: 08 Jan 2010 Posts: 171
|
Posted: Sun Aug 14, 2016 6:28 am Post subject: |
|
|
Well fsck -vf didn't show anything wrong. Plus, having looked at more files, the error only appears to occur in those scripts which are part of OpenRC, updated yesterday and which have a depend() function to start. The only differences in the errors are the precise amount of comment text dropped in before the } of the depend () function..
A bit systematic for a filesystem error? |
|
Back to top |
|
|
greyspoke Apprentice
Joined: 08 Jan 2010 Posts: 171
|
Posted: Sun Aug 14, 2016 9:44 am Post subject: |
|
|
Got it back going by copying /etc/init.d from a recent backup, and emerged --buildpkgonly openrc. The naughty bits weren't in any of the files, so I emerged it properly and everything looks OK now.
So a file copying error that happened to all the writes of all the files on a particular occasion in a similar way each time?
I'd be interested to hear from anyone who can explain this, my understanding of how file systems work isn't deep enough for this. |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Sun Aug 14, 2016 11:22 am Post subject: |
|
|
Maybe you do have a forgotten broken script which tries to do the update #!/sbin/runscript > #!/sbin/openrc-run?
Or maybe such a broken script was introduced in the new openrc release?
But in the latter case also other people should have observed it... |
|
Back to top |
|
|
greyspoke Apprentice
Joined: 08 Jan 2010 Posts: 171
|
Posted: Sun Aug 14, 2016 11:34 am Post subject: |
|
|
Good points mv, it looks quite like an automated process went off the rails somehow. I will just have to keep an eye on things and try and catch it if it crops up again. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sun Aug 14, 2016 4:12 pm Post subject: |
|
|
it would had help to know the openrc version. |
|
Back to top |
|
|
greyspoke Apprentice
Joined: 08 Jan 2010 Posts: 171
|
Posted: Sun Aug 14, 2016 4:28 pm Post subject: |
|
|
Ah yes krinn, duh.
was openrc-0.21.2, got updated to 0.21.3 yesterday morning which appeared to cause the issue. (Though something else might have.) |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sun Aug 14, 2016 4:54 pm Post subject: |
|
|
Thank you, i have just update to see, no trouble. |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Sun Aug 14, 2016 5:09 pm Post subject: |
|
|
greyspoke wrote: | got updated to 0.21.3 yesterday morning |
I had already updated it 14 days ago. I had no such problems. OTOH, I had converted runscript->openrc-run already many months ago. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sun Aug 14, 2016 5:50 pm Post subject: |
|
|
I updated openssh on multiple machines recently and dispatch-conf gave me garbage diffs for sshd_config on all of them, luckily I was paying attention. Maybe that happened to you? |
|
Back to top |
|
|
greyspoke Apprentice
Joined: 08 Jan 2010 Posts: 171
|
Posted: Mon Aug 15, 2016 6:26 am Post subject: |
|
|
I have config_protect_if_modified set so I don't get asked about files I haven't manually edited, I don't see init script changes. I should see sshd_config changes though, and didn't get asked about it. And the file looks fine atm.
dispatch-conf, that's another suspect in the frame there Ant_P. |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Mon Aug 15, 2016 7:09 am Post subject: |
|
|
greyspoke wrote: | dispatch-conf, that's another suspect in the frame there Ant_P. |
I never used dispatch-conf but only etc-update. So I wouldn't have seen this problem if dispatch-conf really should be the culprit. |
|
Back to top |
|
|
tomtom69 Apprentice
Joined: 09 Nov 2010 Posts: 245 Location: Bavaria
|
Posted: Wed Aug 17, 2016 9:52 am Post subject: |
|
|
I can confirm this kind of issue.
After openrc update yesterday (from 0.19.1 to 0.21.3) on stable amd64, I get many messages during startup:
Code: |
* /etc/init.d/syslog-ng uses runscript, please convert to openrc-run.
* /etc/init.d/acpid uses runscript, please convert to openrc-run.
* * /etc/init.d/privoxy uses runscript, please convert to openrc-run.
* /etc/init.d/sshd uses runscript, please convert to openrc-run.
* /etc/init.d/rsyncd uses runscript, please convert to openrc-run.
* /etc/init.d/in.tftpd uses runscript, please convert to openrc-run.
* /etc/init.d/lm_sensors uses runscript, please convert to openrc-run.
* /etc/init.d/vixie-cron uses runscript, please convert to openrc-run.
/etc/init.d/smartd uses runscript, please convert to openrc-run.
* /etc/init.d/net.enp1s10 uses runscript, please convert to openrc-run.
* /etc/init.d/net.enp0s7 uses runscript, please convert to openrc-run.
* /etc/init.d/gpm uses runscript, please convert to openrc-run.
* /etc/init.d/consolekit uses runscript, please convert to openrc-run.
* /etc/init.d/atd uses runscript, please convert to openrc-run.
* /etc/init.d/alsasound uses runscript, please convert to openrc-run.
|
This is clearly related to the openrc update here, because I did only this update. However my system works normally at the moment. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Wed Aug 17, 2016 1:03 pm Post subject: |
|
|
tomtom69 wrote: | I can confirm this kind of issue. |
This is a totally different issue. greyspoke report its scripts are broken, and you report your scripts are working fine, but now emit a message.
Look for https://forums.gentoo.org/viewtopic-t-1049822-highlight-.html |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Aug 17, 2016 6:53 pm Post subject: |
|
|
mv wrote: | greyspoke wrote: | dispatch-conf, that's another suspect in the frame there Ant_P. |
I never used dispatch-conf but only etc-update. So I wouldn't have seen this problem if dispatch-conf really should be the culprit. |
They're both just frontends to the same diff-merging process, GIGO. |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Thu Aug 18, 2016 8:20 am Post subject: |
|
|
Ant P. wrote: | mv wrote: | greyspoke wrote: | dispatch-conf, that's another suspect in the frame there Ant_P. |
I never used dispatch-conf but only etc-update. So I wouldn't have seen this problem if dispatch-conf really should be the culprit. |
They're both just frontends to the same diff-merging process, GIGO. |
Not really. While etc-update only move/deletes files as a whole, dispatch-conf AFAIK has a lot more options and can e.g. automerge parts of files. It might be that there is a bug in this functionality. |
|
Back to top |
|
|
greyspoke Apprentice
Joined: 08 Jan 2010 Posts: 171
|
Posted: Thu Aug 18, 2016 8:31 am Post subject: |
|
|
I assume that as a result of my settings dispatch-conf simply over-wrote the old files with the new ones. Or that is what it should have done. Maybe this will remain a mystery, can't see what evidence there would be to show it now. As I mentioned (I think) when I re-ran the update to openrc it all worked, but of course the machine was in a different state then. May be a combination of something funny on my machine coinciding with the update. Obviously a rare issue if it isn't affecting anyone else. |
|
Back to top |
|
|
tomtom69 Apprentice
Joined: 09 Nov 2010 Posts: 245 Location: Bavaria
|
Posted: Thu Aug 18, 2016 1:31 pm Post subject: |
|
|
Quote: | This is a totally different issue |
You are right - I misinterpreted the thing about a non-working system. Sorry for the noise. |
|
Back to top |
|
|
|