Gentoo Archives: gentoo-amd64

From: David Shen <davidshen84@××××××××××.com>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: xx used greatest stack depth: nnn bytes left
Date: Wed, 01 Jul 2009 01:10:42
Message-Id: 53e35fd50906301810j14a755f7n39864e14d78a2d1f@mail.gmail.com
In Reply to: [gentoo-amd64] Re: xx used greatest stack depth: nnn bytes left by Duncan <1i5t5.duncan@cox.net>
1 Thanks you all. ;) Really helpful.
2
3
4 On Wed, Jul 1, 2009 at 1:27 AM, Duncan<1i5t5.duncan@×××.net> wrote:
5 > Volker Armin Hemmann <volkerarmin@××××××××××.com> posted
6 > 200906301410.28158.volkerarmin@××××××××××.com, excerpted below, on  Tue,
7 > 30 Jun 2009 14:10:28 +0200:
8 >
9 >> On Dienstag 30 Juni 2009, David Shen wrote:
10 >>> Hi,
11 >>>
12 >>> I setup a gentoo 2008 amd 64 system, and then created my own initramfs
13 >>> file. But when the initramfs is processed during boot, I got the
14 >>> following message:
15 >>>
16 >>> exe used greatest stack depth: 6040bytes left mdev ...(similar as
17 >>> above)
18 >>> lvm ...(similar as above)
19 >>>
20 >>> The system could boot, but I am afraid I have made something wrong, and
21 >>> I have no idea how to troubleshoot this.
22 >>
23 >>
24 >> there is no 'trouble'. You activated a debug feature for devs and now
25 >> you get the output. Wit 8 or 16lk stack (I think its 16 for amd64, but
26 >> have to check that), 6k left is nothing to worry about.
27 >
28 > FWIW I think it's 8k stack, since the default is (or was at some point,
29 > I've never set it manually and I have this setting) "Warn for stack
30 > frames larger than... 2048, and he has 6k left.  The setting is
31 > CONFIG_FRAME_WARN, and it's a number, not a toggle.  However, it says set
32 > to 0 for nowarn.
33 >
34 > Duane's DEBUG_STACK_USAGE is apparently for older kernels (a quick git
35 > checkout and kernel config for older kernels says the CONFIG_FRAME_WARN
36 > option was added for 2.6.26), as a grep USAGE in the .config turns up no
37 > hits at all.  (There are three for STACK, two indicating support for
38 > STACKTRACE and USER_STACKTRACE, the third for STACKPROTECTOR.)  But it
39 > would seem the default is or was 2048, thus the warning.
40 >
41 > But it's interesting I don't seem to see such warnings here, running LVM
42 > and RAID-(0/1/6) both.  However, I do NOT run an initrd/initramfs.  I'm
43 > guessing that's what's triggering the stack warning (that's what mdev is,
44 > right?, the ramdisk memory device).
45 >
46 >> Go to the kernel hacking submenu in menuconfig and deactivate (almost)
47 >> everything but magic sysrq keys ...
48 >
49 > FWIW, in addition to Magic SysRq key (and 2048 for the stack frame, which
50 > I guess I could 0 out), I have three options near the bottom of the
51 > kernel hacking submenu enabled.
52 >
53 > Two of them aren't going to be of much interest to folks who like to hide
54 > their boot messages but they help debug kernels that crash before handing
55 > control to init, and are thus very useful for those like me that like to
56 > run kernel pre-releases, -rcs and even direct git kernels, who find that
57 > they don't boot sometimes, and who file bugs on kernel.org's bugzilla.
58 > These are the verbose boot messages and early printk options.
59 >
60 > The third one (well, actually first, since it's above the other two on
61 > the menu) is much more generally useful.  Filter access to /dev/mem --
62 > CONFIG_STRICT_DEVMEM.  This is useful to have it enabled as there's not a
63 > lot that should access that, except debugging.  xorg doesn't need it,
64 > neither does dosemu, or other "common users of /dev/mem".  See the help
65 > for it.  "If in doubt, say Y."
66 >
67 > Among other things, that can help prevent buggy drivers scribbling on the
68 > wrong memory, and it has some (limited) security value as well.  As such,
69 > it has been enabled by many of the various security patches, for some
70 > time.  Again, it should normally be enabled unless you do active kernel
71 > debugging that needs access to /dev/mem.
72 >
73 > --
74 > Duncan - List replies preferred.   No HTML msgs.
75 > "Every nonfree program has a lord, a master --
76 > and if you use the program, he is your master."  Richard Stallman
77 >
78 >
79 >
80
81
82
83 --
84 Best Regards,
85 David Shen
86
87 http://twitter.com/davidshen84