large frame size warning when compiling

Jay Aurabind jay.aurabind at gmail.com
Fri May 9 08:09:21 EDT 2014


On Thu, May 08, 2014 at 11:46:43AM -0400, Valdis.Kletnieks at vt.edu wrote:
> On Thu, 08 May 2014 09:24:38 +0530, Jay Aurabind said:
> > > Allocating 1K on the stack is indeed evil.
> >
> > Why would you say evil ? I didnt quite get why you meant by that. Is it
> > at some extremes ? 1K is from the default ubuntu 14.04 config.
> 
> Some paths in the kernel get very deep stacks (for instance, nfs reading
> an xfs file that's on an lvm partition on a dm-crypt target is famous for
> blowing the stack without any further help).  On my laptop, the low-water
> mark is already pretty low:
> 
> % dmesg | grep 'stack depth'
> [    2.094319] cryptomgr_test (42) used greatest stack depth: 6456 bytes left
> [    2.952135] modprobe (91) used greatest stack depth: 5904 bytes left
> [    2.955593] modprobe (93) used greatest stack depth: 5848 bytes left
> [    2.955953] cryptomgr_probe (94) used greatest stack depth: 5520 bytes left
> [    4.145573] systemd-cgroups (135) used greatest stack depth: 5440 bytes left
> [    4.859260] udevadm (255) used greatest stack depth: 4920 bytes left
> [    4.966646] ata_id (268) used greatest stack depth: 4088 bytes left
> [  145.528777] dhclient (1306) used greatest stack depth: 4072 bytes left
> [  226.188576] ip (2232) used greatest stack depth: 3344 bytes left
> [  300.303981] ip (2468) used greatest stack depth: 3152 bytes left
> 
> So in the first 5 minutes, I already was down to 3K of stack. All it takes
> is that code interacting with another code that allocates 1K popping when I
> was at that 3K low water mark, and my kernel is in deep juju.
> 
> The fact the 1K is in the default Ubuntu config just means that the kernel as
> distributed has bad code in it. :)
> 
Thank you Valdis for the explaination. My stack depth is also similar to
yours:
[    1.567353] cryptomgr_test (52) used greatest stack depth: 6656 bytes left
[    2.871152] modprobe (85) used greatest stack depth: 5624 bytes left
[    2.894478] modprobe (93) used greatest stack depth: 5552 bytes left
[    4.212907] all_generic_ide (127) used greatest stack depth: 5448 bytes left
[    4.440752] udevadm (134) used greatest stack depth: 4488 bytes left
[    4.571276] ata_id (165) used greatest stack depth: 4448 bytes left
[    7.661284] btrfs (183) used greatest stack depth: 4424 bytes left
[    7.859625] systemd-udevd (133) used greatest stack depth: 4392 bytes left
[    8.898118] hostname (208) used greatest stack depth: 4208 bytes left
[    9.341028] sh (209) used greatest stack depth: 4088 bytes left
[   48.353719] systemd-udevd (506) used greatest stack depth: 3768 bytes left
[  304.162368] kworker/u8:0 (6) used greatest stack depth: 3656 bytes left

Apparently no other activity is happening which is decreasing the depth further, even after running some applications like firefox. So shouldnt we assume that initial value (somewhere around 6K) should be enough since the maximum it went down is only till its 50% mark ?





More information about the Kernelnewbies mailing list