[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Disabling password features causes top and ps to fail on some
From:       James Bowlin <bowlin () mindspring ! com>
Date:       2011-05-31 0:54:05
Message-ID: 20110530185405.4071a7f2 () mindspring ! com
[Download RAW message or body]

I'm building a static busybox on a Debian based i486 system.  When I
tested the busybox binary on an amd64 Gentoo system the top and ps
commands fail:

$ ./busybox-3.4 top
Mem: 3056560K used, 1004520K free, 0K shrd, 162340K buff, 2292844K cached
CPU: 13.6% usr  4.5% sys  0.0% nic 81.8% idle  0.0% io  0.0% irq  0.0% sirq
Load average: 0.02 0.11 0.40 1/235 3692
busybox-3.4: ../sysdeps/unix/sysv/linux/getpagesize.c:32: __getpagesize: Assertion \
`_rtld_global_ro._dl_pagesize != 0' failed.


A very similar build of busybox works fine:

$ ./busybox-3.3 top -n1
 PID  PPID USER     STAT   VSZ %MEM CPU %CPU COMMAND
31439  5513 root     S     154m  3.8   0  8.6 /usr/bin/X :0 -audit 0 -auth \
/var/gdm/:0.Xauth -nolisten tcp vt7 31645     1 user     S     318m  8.0   1  4.3 \
terminal --disable-server --geometry=135x44 \
--working-directory=/data/user/Projects/LiveUSB/v3 --ta 31543     1 user     S     \
428m 10.7   0  0.0 claws-mail 31690     1 user     S     315m  7.9   1  0.0 terminal \
--disable-server --geometry=100x45 --working-directory=/data/local/src/busybox-1.18.3 \
--tab - 31626     1 user     S     310m  7.8   1  0.0 terminal --disable-server \
--geometry=114x43 --working-directory=/data/user/Projects/LiveUSB/Other/b 31673     1 \
user     S     309m  7.8   0  0.0 terminal --disable-server --geometry=131x40 \
--working-directory=/data/user/Projects/LiveUSB/Other/D 31517     1 user     S     \
301m  7.5   1  0.0 lxpanel 31513 31476 user     S     256m  6.4   1  0.0 gkrellm
[etc]


The ps error is similar and comes with a bonus core dump:

$ ./busybox-3.4 ps
 PID USER       VSZ STAT COMMAND
busybox-3.4: ../sysdeps/unix/sysv/linux/getpagesize.c:32: __getpagesize: Assertion \
                `_rtld_global_ro._dl_pagesize != 0' failed.
zsh: abort (core dumped)  ./busybox-3.4 ps

$ ./busybox-3.3 ps
  PID USER       VSZ STAT COMMAND
    1 root      3928 S    init [3]
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    5 root         0 SW   [kworker/u:0]
    6 root         0 SW   [migration/0]
    7 root         0 SW   [migration/1]
    9 root         0 SW   [ksoftirqd/1]
   10 root         0 SW   [kworker/0:1]
[etc]

The strange thing is that the problem only occurs when
some password/login utilities are disabled:

$ ./busybox-3.3 bbconfig > bbconfig-3.3
$ ./busybox-3.4 bbconfig > bbconfig-3.4
$ diff -U 0 bbconfig-3.3 bbconfig-3.4 | grep ^+
+++ bbconfig-3.4	2011-05-30 18:02:50.000000000 -0600
+# CONFIG_FEATURE_SHADOWPASSWDS is not set
+# CONFIG_USE_BB_PWD_GRP is not set
+# CONFIG_USE_BB_SHADOW is not set
+# CONFIG_USE_BB_CRYPT is not set
+# CONFIG_USE_BB_CRYPT_SHA is not set
+# CONFIG_LOGIN_SCRIPTS is not set
+# CONFIG_FEATURE_NOLOGIN is not set
+# CONFIG_FEATURE_SECURETTY is not set
+# CONFIG_PASSWD is not set
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+# CONFIG_CRYPTPW is not set
+# CONFIG_CHPASSWD is not set

I've attached the two bbconfig files.  The problem does not occur on
most systems.  Both top and ps on busybox-3.4 work fine on most systems.
They also working fine on the amd64 system if I compile busybox-3.4 on
it, (even in a 32bit chroot).

Busybox is a great tool.  This was a strange problem that most people
probably don't run into so I spent a couple of hours tracking it down
to the 12 options listed above as my way of saying thanks.

The kernel on the build system is 2.6.36.1-mepis.  The kernel on the
target system is 2.6.36-gentoo-r8.


Peace, James


["bbconfig-3.3" (application/octet-stream)]
["bbconfig-3.4" (application/octet-stream)]

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic