Bug 188160 - off-by-one in init
off-by-one in init
Product: Fedora
Classification: Fedora
Component: sysvinit (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2006-04-06 11:09 EDT by Kir Kolyshkin
Modified: 2014-03-16 22:59 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.86-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-10 12:06:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
fix for off-by-one in setting command title for init (285 bytes, patch)
2006-04-06 11:09 EDT, Kir Kolyshkin
no flags Details | Diff

  None (edit)
Description Kir Kolyshkin 2006-04-06 11:09:49 EDT
SysVinit version 2.86 have a problem in its code that leads to 
incorrectly displaying init name in process list (and in 
/proc/1/cmdline) -- it is shown as 'ini'. This was observed inside an 
OpenVZ's VPS. See http://bugzilla.openvz.org/60 for more details.

Patch fixing this is attached. Note that 2.85 does not have such bug.

Similar bugs found, filed and fixed in Debian and Gentoo. I have also sent it
maintstream to sysvinit maintainter(s) but never got a response back.

Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=336172
Gentoo: http://bugs.gentoo.org/show_bug.cgi?id=110420
Comment 1 Kir Kolyshkin 2006-04-06 11:09:49 EDT
Created attachment 127410 [details]
fix for off-by-one in setting command title for init
Comment 2 Bill Nottingham 2006-05-10 11:54:02 EDT
Hm, it seems quite possible that this could happen (especailly compared to the
2.85 code), however, I'm not actually seeing this in practice on any machine I
have access to. Certainly, your 'ini' example doesn't occur.

I'm curious how this could trigger only in OpenVZ. Do you invoke init
differently there?
Comment 3 Bill Nottingham 2006-05-10 12:06:28 EDT
Added in 2.86-4.
Comment 4 Kir Kolyshkin 2006-05-10 12:14:49 EDT
Probably the thing is in ordinary Linux you usually run kernel with a lot of
parameters, and the ones which kernel itself can not recognize are being passed
to init. In OpenVZ, we just execute /sbin/init in a newly created virtual
environment without passing any arguments to it.
Comment 5 David Lawrence 2007-06-21 22:18:29 EDT
Package name is now sysvinit in latest Fedora.

Note You need to log in before you can comment on or make changes to this bug.