Modify

Opened 4 years ago

Last modified 2 years ago

#11851 new defect

tmpfs full but not much data inside

Reported by: Bastian Bittorf <bittorf@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: Cc:

Description

r32582 on ar7xxx / Buffalo WZR-HP-AG300H / 128 mb RAM

we often write/change/delete files in /tmpfs (e.g. ulogd-logging)
this situation is seldom after some hours of uptime:

root@box:~ free
             total         used         free       shared      buffers
Mem:        126952        90816        36136            0         1908
-/+ buffers:              88908        38044
Swap:         4092            0         4092

root@box:~ df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                   28.6M      2.2M     26.4M   8% /
/dev/root                 2.0M      2.0M         0 100% /rom
tmpfs                    62.0M     62.0M         0 100% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock7           28.6M      2.2M     26.4M   8% /overlay
overlayfs:/overlay       28.6M      2.2M     26.4M   8% /

root@box:~ du -sh /tmp
2.1M    /tmp

root@box:~ ls -lR /tmp/ | wc -l
516

Attachments (0)

Change History (5)

comment:1 Changed 4 years ago by Bastian Bittorf <bittorf@…>

root@box:~ killall syslogd

root@box:~ df -h
Filesystem Size Used Available Use% Mounted on
rootfs 28.6M 2.2M 26.4M 8% /
/dev/root 2.0M 2.0M 0 100% /rom
tmpfs 62.0M 1.5M 60.5M 2% /tmp
tmpfs 512.0K 0 512.0K 0% /dev
/dev/mtdblock7 28.6M 2.2M 26.4M 8% /overlay
overlayfs:/overlay 28.6M 2.2M 26.4M 8% /

after killing syslogd which was invoked with a large circular buffer,
the available space jumps to 60.5M 8-) syslogd was startet with:

syslogd -C1024

but this should't happen(tm):

1 Megabyte of circular buffer should not consume 60 Megabytes...

comment:2 Changed 4 years ago by Bastian Bittorf <bittorf@…>

better format of above:

root@box:~ killall syslogd

root@box:~ df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                   28.6M      2.2M     26.4M   8% /
/dev/root                 2.0M      2.0M         0 100% /rom
tmpfs                    62.0M      1.5M     60.5M   2% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock7           28.6M      2.2M     26.4M   8% /overlay
overlayfs:/overlay       28.6M      2.2M     26.4M   8% /

comment:3 Changed 4 years ago by Bastian Bittorf <bittorf@…>

another day, again the same situation, this time without zram involved,
syslogd with a small circular buffer, and killing ulogd gives memory back:

BusyBox v1.19.4 (2012-07-06 22:40:47 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 ATTITUDE ADJUSTMENT (Bleeding Edge, r32582)
 -----------------------------------------------------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix


root@box:~ opkg update
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
wget: short write
Collected errors:
 * opkg_download: Failed to download http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz, wget returned 1.

root@box:~ df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                   28.6M      2.2M     26.5M   8% /
/dev/root                 2.0M      2.0M         0 100% /rom
tmpfs                    62.0M     62.0M         0 100% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock7           28.6M      2.2M     26.5M   8% /overlay
overlayfs:/overlay       28.6M      2.2M     26.5M   8% /

root@box:~ ps
  PID USER       VSZ STAT COMMAND
    1 root      1504 S    init
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    5 root         0 SW   [kworker/u:0]
    6 root         0 SW<  [khelper]
    7 root         0 SW   [kworker/u:1]
   61 root         0 SW   [sync_supers]
   63 root         0 SW   [bdi-default]
   65 root         0 SW<  [kblockd]
   96 root         0 SW   [kswapd0]
  145 root         0 SW   [fsnotify_mark]
  158 root         0 SW<  [ath79-spi]
  172 root         0 SW   [mtdblock0]
  179 root         0 SW   [mtdblock1]
  203 root         0 SW   [mtdblock2]
  208 root         0 SW   [mtdblock3]
  218 root         0 SW   [mtdblock4]
  223 root         0 SW   [mtdblock5]
  228 root         0 SW   [mtdblock6]
  233 root         0 SW   [mtdblock7]
  238 root         0 SW   [mtdblock8]
  243 root         0 SW   [mtdblock9]
  445 root         0 SWN  [jffs2_gcd_mtd7]
  463 root      1504 S    init
  465 root      1496 S    logger -s -p 6 -t sysinit
 1114 root         0 SW<  [cfg80211]
 1121 root         0 SW   [khubd]
 1209 root      1508 S    /sbin/syslogd -C16
 1211 root      1492 S    /sbin/klogd
 1213 root       860 S    /sbin/hotplug2 --override --persistent --set-rules-file /etc/hotplug2.rules --set-coldplug-cmd /sbin/udevtrigger --max-children 1
 1224 root       860 S    /sbin/ubusd
 1229 root      1516 S    /sbin/netifd
 1465 root      1500 S    /sbin/watchdog -t 5 /dev/watchdog
 1489 root      1376 S    hostapd -P /var/run/wifi-phy0.pid -B /var/run/hostapd-phy0.conf
 1637 root      1376 S    hostapd -P /var/run/wifi-phy1.pid -B /var/run/hostapd-phy1.conf
 2420 root      1152 S    /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
 2571 root      1516 S    /usr/sbin/crond -L /dev/null
 2624 nobody    1004 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf
 2625 root       936 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf
 2653 root      1624 S    /usr/sbin/olsrd -f /var/etc/olsrd.conf -nofork
 5450 root      1168 S    ulogd -d
 6466 root      1172 S    /usr/bin/netserver
11916 root         0 SW   [kworker/0:1]
15675 root      1136 S    /usr/sbin/uhttpd -f -h /www -r IH-ServerraumInet-AP -c /etc/httpd.conf -x /cgi-bin -t 60 -T 30 -A 1 -E /cgi-bin-404.sh -I cgi-bin-404.sh -n 1 -R -p 0.
15922 root      1216 R    /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
15925 root      1520 S    -ash
15942 root      1488 S    sleep 60
15960 root      1496 R    ps
30681 root         0 SW   [kworker/0:0]

root@box:~ killall syslod

root@box:~ uptime
 14:52:29 up 10:46,  load average: 0.04, 0.07, 0.06

root@box:~ free
             total         used         free       shared      buffers
Mem:        126952        88824        38128            0         1904
-/+ buffers:              86920        40032
Swap:            0            0            0

root@box:~ df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                   28.6M      2.2M     26.5M   8% /
/dev/root                 2.0M      2.0M         0 100% /rom
tmpfs                    62.0M     62.0M         0 100% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock7           28.6M      2.2M     26.5M   8% /overlay
overlayfs:/overlay       28.6M      2.2M     26.5M   8% /

root@box:~ killall syslogd

root@box:~ df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                   28.6M      2.2M     26.5M   8% /
/dev/root                 2.0M      2.0M         0 100% /rom
tmpfs                    62.0M     62.0M         0 100% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock7           28.6M      2.2M     26.5M   8% /overlay
overlayfs:/overlay       28.6M      2.2M     26.5M   8% /

root@box:~ du -sh /tmp
2.1M    /tmp

root@box:~ killall ulogd

root@box:~ df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                   28.6M      2.2M     26.5M   8% /
/dev/root                 2.0M      2.0M         0 100% /rom
tmpfs                    62.0M      2.1M     59.9M   3% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock7           28.6M      2.2M     26.5M   8% /overlay
overlayfs:/overlay       28.6M      2.2M     26.5M   8% /

comment:4 Changed 4 years ago by Bastian Bittorf <bittorf@…>

another round and yes: ulogd is the endmonster:

root@box:~ ulogd --version                              
ulogd Version 1.23
Copyright (C) 2000-2005 Harald Welte <laforge@gnumonks.org>

what we do each 15mins:

mv $logfile $logfile_parsing
kill -HUP $pidulogd

now we do

mv $logfile $logfile_parsing
/etc/init.d/ulogd restart

we have other boxes (same arch) but with kernel 3.3.3/r31465 and

BusyBox v1.19.4 (2012-04-20 17:27:20 CEST)
instead of
BusyBox v1.19.4 (2012-07-06 22:40:47 CEST)

on this box - but same ulogd-version, but on
the "old" boxes this is working without problems.
where is the best place to report?

comment:5 Changed 2 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.