Bug 3088 - "INIT: Id "1" Respawning too fast: disable for 5 minutes" messge continues to appear on routerstationpro
Summary: "INIT: Id "1" Respawning too fast: disable for 5 minutes" messge continues to...
Status: VERIFIED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-runtime (show other bugs)
Version: 1.3
Hardware: Routerstationpro mips
: Medium+ normal
Target Milestone: 1.3 M5
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-09-11 02:23 UTC by Chen Qi
Modified: 2012-09-27 10:18 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chen Qi 2012-09-11 02:23:02 UTC
git info: 5343cdb20ee56a8b507733c637dcc2466ae13288
git branch: poky/master

This warning message continues to appear on routerstationpro.

In /etc/inittab, there's a line related to this:
1:2345:respawn:/sbin/getty 38400 tty1

But there's no /dev/tty1 file.

Command: ls /dev/tty?
Result: /dev/tty0
Comment 1 Darren Hart 2012-09-13 14:40:09 UTC
Bruce, do we know what changed here? Was the tty1 line added to inittab? Have we changed the console/vt settings in the kernel config? What about devtmpfs?
Comment 2 Bruce Ashfield 2012-09-13 17:08:25 UTC
There are no kernel or kernel config changes that I can think
of that would have spawned (pun intended) the problem.

Can someone confirm that this hasn't always been happening since
we bumped the kernel version to 3.4 for the board ?
Comment 3 Chen Qi 2012-09-14 05:37:56 UTC
It seems that this problem is caused by the kernel verion bumping (from 3.0 to 3.4).  Here's some detail.

20120819 image from autobuilder has no such problem.
http://autobuilder.yoctoproject.org/pub/nightly/20120819-2/machines/routerstationpro/
Git Hash: d7a6aafea3c76dd8acea5e3b93833c4f521e5290
Git Branch: poky/master
root@routerstationpro:~# uname -r
3.0.32-yocto-standard
root@routerstationpro:~# ls /dev/tty?
/dev/tty0  /dev/tty2  /dev/tty4  /dev/tty6  /dev/tty8
/dev/tty1  /dev/tty3  /dev/tty5  /dev/tty7  /dev/tty9
root@routerstationpro:~# grep -i respawn /etc/inittab 
z6:6:respawn:/sbin/sulogin
S:2345:respawn:/sbin/getty 115200 ttyS0
1:2345:respawn:/sbin/getty 38400 tty1

20120822 image from autobuilder has this problem.
http://autobuilder.yoctoproject.org/pub/nightly/20120822-1/machines/routerstationpro/
Git Hash: 19ff55a53b436d463f9577adaed15be77708f0d2
Git Branch: poky/master
root@routerstationpro:~# ls /dev/tty?
/dev/tty0
root@routerstationpro:~# grep -i respawn /etc/inittab 
z6:6:respawn:/sbin/sulogin
S:2345:respawn:/sbin/getty 115200 ttyS0
1:2345:respawn:/sbin/getty 38400 tty1
root@routerstationpro:~# uname -r
3.4.7-yocto-standard
INIT: Id "1" respawning too fast: disabled for 5 minutes
Comment 4 Chen Qi 2012-09-14 05:59:13 UTC
I looked into the /proc/config.gz file in both images (20120819 and 20120822).
There's no virtual console configuration item in kernel 3.4 (20120822 build).
zcat config.gz | grep -i console
CONFIG_NETCONSOLE=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_CONSOLE_POLL=y
CONFIG_KGDB_SERIAL_CONSOLE=y

On the other hand, CONFIG_VT_CONSOLE is enabled in kernel 3.0 (20120819 build).
zcat config.gz | grep -i console
CONFIG_NETCONSOLE=y
# CONFIG_NETCONSOLE_DYNAMIC is not set
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# Console display driver support
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
Comment 5 Darren Hart 2012-09-17 17:42:21 UTC
CONFIG_VT_CONSOLE=y should be part of yocto/standard (but not tiny). This might be a missing standard policy option. Having a look.
Comment 6 Darren Hart 2012-09-17 17:47:46 UTC
For the 3.4 kernel, both config VT and config VT_CONSOLE are "default y". Although the only explicit inclusion of this in the linux-yocto meta dir is for the qemu-platform. Various defconfig set this to y, and one to "is not set".

Bruce, are we pulling in a linux platform defconfig for the mips platform in addition to what is in meta?
Comment 7 Darren Hart 2012-09-17 17:52:33 UTC
Oh, oops, I missed this:

bsp/routerstationpro/routerstationpro.cfg:# CONFIG_VT is not set

$ git blame -L 64,65 bsp/routerstationpro/routerstationpro.cfg
afe856e0 (Paul Gortmaker 2012-07-19 16:22:12 -0400 64) # CONFIG_VT is not set
afe856e0 (Paul Gortmaker 2012-07-19 16:22:12 -0400 65) # CONFIG_INPUT is not set

commit afe856e02ef6dcface4f74d094285e1f8524b5a0
Author: Paul Gortmaker <paul.gortmaker@windriver.com>
Date:   Thu Jul 19 16:22:12 2012 -0400

    routerstationpro: Add a config fragment
    
    Unlike the previous config, this is a more minimalistic one
    that sticks to just specifying hardware items.
    
    The watchdog minifrag gets an update too, as a config option
    got renamed.
    
    Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

So this is being explicitly disabled for this BSP.

Paul, was this deliberate or accidental?
Comment 8 Darren Hart 2012-09-17 17:54:13 UTC
Chen, can you remove the CONFIG_VT line from the routerstationpro.cfg and rebuild the kernel. Does that resolve the problem?
Comment 9 Paul Gortmaker 2012-09-17 18:19:59 UTC
> Paul, was this deliberate or accidental?

Deliberate.  It only has a serial console.  There is nothing resembling a visual or HID I/O interface/device on this thing.

Re-enabling CONFIG_VT will of course "solve" the problem, but that is not (IMO) the right fix.   The rootfs should be intelligent enough (or manually tuned) to not have an always-spawn-getty-on-tty1 mentality.  This thing has a low amount of memory, and enabling Kconfigs (and running extra userspace cruft) is hence not the right approach.
Comment 10 Chen Qi 2012-09-18 05:40:43 UTC
I looked into meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb, and I noticed that this file has already take this issue into consideration.

Following's a piece of code dealing with VT configuration in inittab:
    if [ "${USE_VT}" = "1" ]; then
       # write virtual terminal configs into inittab
Comment 11 Chen Qi 2012-09-18 05:44:37 UTC
I looked into meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb, and I noticed that this file has already taken this issue into consideration.

Following's a piece of code dealing with VT configuration in inittab:
    if [ "${USE_VT}" = "1" ]; then
       # write virtual terminal configs into inittab
    fi

So I think just adding a line to meta-yocto-bsp/conf/machine/routerstationpro.conf would fix this.
diff --git a/meta-yocto-bsp/conf/machine/routerstationpro.conf b/meta-yocto-bsp/conf/machine/routerstationpro.conf
index 707392d..2b174e8 100644
--- a/meta-yocto-bsp/conf/machine/routerstationpro.conf
+++ b/meta-yocto-bsp/conf/machine/routerstationpro.conf
@@ -19,6 +19,7 @@ XSERVER ?= "xserver-xorg \
             xf86-video-fbdev"
 
 SERIAL_CONSOLE = "115200 ttyS0"
+USE_VT = "0"
 
 MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"


But I don't know whether it is appropriate to do so.
Comment 12 Darren Hart 2012-09-18 07:59:57 UTC
That looks right to me. Whether that should be a = or a ?= might be a good thing to discuss on list.
Comment 13 Darren Hart 2012-09-20 14:51:01 UTC
(In reply to comment #12)
> That looks right to me. Whether that should be a = or a ?= might be a good
> thing to discuss on list.

Chen, can you send the patch to the list - using "?=" please?
Comment 14 Chen Qi 2012-09-24 02:49:10 UTC
I'll send the patch to list.
Comment 16 Yi Zhao 2012-09-27 10:18:58 UTC
Verified. 

git info: 718eb85806e080d0b165344b272e531ef19421eb
git branch: poky/1.3_M5