Modify

Opened 8 years ago

Closed 7 years ago

#7293 closed defect (fixed)

mountd consumes 100% CPU when enabled

Reported by: ledwards@… Owned by: blogic
Priority: normal Milestone: Backfire 10.03.1
Component: packages Version: Backfire 10.03
Keywords: mountd USB CPU Cc:

Description

After enabling mountd, it consumes %100 of the CPU (as determined by "top"). It appears to work as expected though. It mounted my USB drive automatically after insertion. The CPU stays at 100% indefinitely until I stop mountd, regardless of whether or not a USB drive is connected.

Let me know if you need info about my configuration. I'm running the latest Backfire revision on AR71XX (WZR-HP-G300NH).

Attachments (0)

Change History (14)

comment:1 Changed 8 years ago by rtz2

Could you start mounted manually and if the problem persists, run it with strace?

comment:2 follow-up: Changed 8 years ago by ledwards@…

root@OpenWrt:/# strace /etc/init.d/mountd start
execve("/etc/init.d/mountd", ["/etc/init.d/mountd", "start"], [/* 7 vars */]) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaad000
stat("/etc/ld.so.cache", 0x7f8a35a0)    = -1 ENOENT (No such file or directory)          
open("/lib/libcrypt.so.0", O_RDONLY)    = 3                                              
fstat(3, {st_mode=S_IFREG|0644, st_size=10100, ...}) = 0                                 
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\4p\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 147456, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabe000           
old_mmap(0x2aabe000, 10020, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aabe000 
old_mmap(0x2aad0000, 1908, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x2aad0000
old_mmap(0x2aad1000, 68176, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aad1000
close(3)                                = 0                                                               
munmap(0x2aaae000, 4096)                = 0                                                               
open("/lib/libm.so.0", O_RDONLY)        = 3                                                               
fstat(3, {st_mode=S_IFREG|0644, st_size=101700, ...}) = 0                                                 
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000                 
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\0250\0\0\0004"..., 4096) = 4096             
old_mmap(NULL, 167936, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aae2000                          
old_mmap(0x2aae2000, 101212, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aae2000               
old_mmap(0x2ab0a000, 3396, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x18000) = 0x2ab0a000          
close(3)                                = 0                                                               
munmap(0x2aaae000, 4096)                = 0                                                               
open("/lib/libc.so.0", O_RDONLY)        = 3                                                               
fstat(3, {st_mode=S_IFREG|0644, st_size=401364, ...}) = 0                                                 
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000                 
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\252\300\0\0\0004"..., 4096) = 4096          
old_mmap(NULL, 487424, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab0b000                          
old_mmap(0x2ab0b000, 396400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab0b000               
old_mmap(0x2ab7b000, 8148, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x60000) = 0x2ab7b000          
old_mmap(0x2ab7d000, 19456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab7d000
close(3)                                = 0                                                               
munmap(0x2aaae000, 4096)                = 0                                                               
open("/lib/libc.so.0", O_RDONLY)        = 3                                                               
fstat(3, {st_mode=S_IFREG|0644, st_size=401364, ...}) = 0                                                 
close(3)                                = 0                                                               
open("/lib/libc.so.0", O_RDONLY)        = 3                                                               
fstat(3, {st_mode=S_IFREG|0644, st_size=401364, ...}) = 0                                                 
close(3)                                = 0                                                               
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=20708, ...}) = 0                               
mprotect(0x2ab7b000, 4096, PROT_READ)   = 0                                                               
mprotect(0x2aabc000, 4096, PROT_READ)   = 0                                                               
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0                                               
ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0                                               
getuid()                                = 0                                                               
brk(0)                                  = 0x480000                                                        
brk(0x481000)                           = 0x481000                                                        
getpid()                                = 1735                                                            
rt_sigaction(SIGCHLD, {0x10000000, [RT_68 RT_69 RT_71 RT_72 RT_73 RT_74 RT_78 RT_79 RT_80 RT_81 RT_82 RT_83 RT_87], 0}, {SIG_DFL, [], 0}, 16) = 0                                                                               
rt_sigaction(SIGHUP, {0x10000000, [RT_68 RT_69 RT_71 RT_72 RT_73 RT_74 RT_78 RT_79 RT_80 RT_81 RT_82 RT_83 RT_87], 0}, {SIG_DFL, [], 0}, 16) = 0                                                                                
getppid()                               = 1734                                                                  
stat64(0x7f8a3fe7, 0x7f8a35c0)          = 0                                                                     
stat64(0x463ebc, 0x7f8a35c0)            = 0                                                                     
open("/etc/rc.common", O_RDONLY|O_LARGEFILE) = 3                                                                
fcntl64(3, F_DUPFD, 10)                 = 10                                                                    
close(3)                                = 0                                                                     
fcntl64(10, F_SETFD, FD_CLOEXEC)        = 0                                                                     
rt_sigaction(SIGINT, NULL, {SIG_DFL, [RT_66], 0}, 16) = 0                                                       
rt_sigaction(SIGINT, {SIG_DFL, ~[RT_65 RT_67 RT_68 RT_69 RT_70 RT_71 RT_72 RT_73 RT_74 RT_75 RT_76 RT_77 RT_78 RT_79 RT_80 RT_81 RT_82 RT_83 RT_84 RT_85 RT_86 RT_87 RT_88 RT_89 RT_90 RT_91 RT_92 RT_93 RT_94], SA_SIGINFO|SA_NOCLDWAIT|0x40cd80}, NULL, 16) = 0                                                                               
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [RT_68 RT_69 RT_70 RT_71 RT_73 RT_75 RT_77 RT_78 RT_82 RT_84 RT_88 RT_89 RT_90 RT_91 RT_92 RT_93 RT_94], SA_NOCLDSTOP}, 16) = 0                                                           
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [RT_68 RT_69 RT_70 RT_71 RT_73 RT_75 RT_77 RT_78 RT_82 RT_84 RT_88 RT_89 RT_90 RT_91 RT_92 RT_93 RT_94], 0}, 16) = 0                                                                      
rt_sigaction(SIGTERM, {SIG_DFL, [RT_68 RT_69 RT_70 RT_71 RT_73 RT_75 RT_77 RT_78 RT_82 RT_84 RT_88 RT_89 RT_90 RT_91 RT_92 RT_93 RT_94], 0}, NULL, 16) = 0                                                                      
read(10, "#!/bin/sh\n# Copyright (C) 2006-2"..., 4095) = 1381                                                   
wait4(-1, 0x7f8a3408, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
open("/etc/functions.sh", O_RDONLY|O_LARGEFILE) = 3                                                             
fcntl64(3, F_DUPFD, 10)                 = 11                                                                    
close(3)                                = 0                                                                     
fcntl64(11, F_SETFD, FD_CLOEXEC)        = 0                                                                     
brk(0x482000)                           = 0x482000                                                              
read(11, "#!/bin/sh\n# Copyright (C) 2006 O"..., 4095) = 4095                                                   
wait4(-1, 0x7f8a3010, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a3010, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a3010, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a3010, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a3010, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
brk(0x483000)                           = 0x483000                                                              
wait4(-1, 0x7f8a3010, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
brk(0x484000)                           = 0x484000                                                              
brk(0x485000)                           = 0x485000                                                              
brk(0x486000)                           = 0x486000                                                              
read(11, "1\n\n\tconfig_get len \"${section}\" "..., 4095) = 1491                                               
brk(0x487000)                           = 0x487000                                                              
brk(0x488000)                           = 0x488000                                                              
wait4(-1, 0x7f8a2ed8, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
stat64(0x484e3c, 0x7f8a2b78)            = 0                                                                     
wait4(-1, 0x7f8a2ed8, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
open("/lib/config/uci.sh", O_RDONLY|O_LARGEFILE) = 3                                                            
fcntl64(3, F_DUPFD, 10)                 = 12                                                                    
close(3)                                = 0                                                                     
fcntl64(12, F_SETFD, FD_CLOEXEC)        = 0                                                                     
read(12, "#!/bin/sh\n# Shell script compati"..., 4095) = 2924                                                   
wait4(-1, 0x7f8a2ae0, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
brk(0x489000)                           = 0x489000                                                              
brk(0x48a000)                           = 0x48a000                                                              
read(12, "", 4095)                      = 0                                                                     
close(12)                               = 0                                                                     
read(11, "", 4095)                      = 0                                                                     
close(11)                               = 0                                                                     
wait4(-1, 0x7f8a3408, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a3408, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a3408, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a3408, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
open("/etc/init.d/mountd", O_RDONLY|O_LARGEFILE) = 3                                                            
fcntl64(3, F_DUPFD, 10)                 = 11                                                                    
close(3)                                = 0                                                                     
fcntl64(11, F_SETFD, FD_CLOEXEC)        = 0                                                                     
read(11, "#!/bin/sh /etc/rc.common\nSTART=8"..., 4095) = 89                                                     
wait4(-1, 0x7f8a3010, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
read(11, "", 4095)                      = 0                                                                     
close(11)                               = 0                                                                     
wait4(-1, 0x7f8a3408, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a32d0, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a2b10, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a2b10, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a2c48, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a2d80, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a2a68, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a2eb8, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a32d0, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
wait4(-1, 0x7f8a3408, WNOHANG, NULL)    = -1 ECHILD (No child processes)                                        
fork()                                  = 1736                                                                  
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 1736                                              
--- SIGCHLD (Child exited) @ 0 (0) ---                                                                          
read(10, "", 4095)                      = 0                                                                     
exit(0)                                 = ?                                                                     
root@OpenWrt:/#                                                                                                 
root@OpenWrt:/# top -bn1
Mem: 34652K used, 27396K free, 0K shrd, 3516K buff, 14192K cached
CPU:  20% usr  80% sys   0% nic   0% idle   0% io   0% irq   0% sirq
Load average: 1.30 0.85 0.43 2/44 1745                              
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND                   
 1738     1 root     R      952   2% 100% /sbin/mountd              
 1478     1 root     S N   2624   4%   0% smbd -D                   
 1495     1 root     S     2508   4%   0% /usr/sbin/collectd -f     
 1510  1509 root     S     2508   4%   0% /usr/sbin/collectd -f     
 1512  1509 root     S     2508   4%   0% /usr/sbin/collectd -f     
 1511  1509 root     S     2508   4%   0% /usr/sbin/collectd -f     
 1509  1495 root     S     2508   4%   0% /usr/sbin/collectd -f     
 1480     1 root     S     2128   3%   0% nmbd -D                   
 1312     1 nobody   S     1628   3%   0% avahi-daemon: running [OpenWrt.local]
 1445     1 root     S     1460   2%   0% /usr/sbin/uhttpd -f -h /www -r OpenWr
  329     1 root     S     1368   2%   0% syslogd -C16                         
  991     1 root     S     1368   2%   0% udhcpc -t 0 -i eth1 -b -p /var/run/et
    1     0 root     S     1364   2%   0% init                                 
 1513  1436 root     S     1364   2%   0% /bin/ash --login                     
  310     1 root     S     1364   2%   0% init                                 
 1506     1 root     S     1360   2%   0% watchdog -t 5 /dev/watchdog          
 1436     1 root     S     1356   2%   0% telnetd -l /bin/login.sh             
 1745  1513 root     R     1356   2%   0% top -bn1                             
  331     1 root     S     1352   2%   0% klogd                                
 1324     1 root     S     1136   2%   0% /usr/sbin/dropbear -p 22 -P /var/run/
 1469     1 nobody   S      900   1%   0% /usr/sbin/dnsmasq -K -D -y -Z -b -E -
  913     1 root     S      824   1%   0% /usr/sbin/ntpclient -i 600 -s -l -D -
  345     1 root     S      772   1%   0% /sbin/hotplug2 --override --persisten
   87     2 root     SW       0   0%   0% [mtdblockd]                          
    4     2 root     SW       0   0%   0% [events/0]                           
    5     2 root     SW       0   0%   0% [khelper]                            
  295     2 root     SWN      0   0%   0% [jffs2_gcd_mtd4]                     
   43     2 root     SW       0   0%   0% [sync_supers]                        
   45     2 root     SW       0   0%   0% [bdi-default]                        
   47     2 root     SW       0   0%   0% [kblockd/0]                          
   73     2 root     SW       0   0%   0% [kswapd0]                            
   74     2 root     SW       0   0%   0% [aio/0]                              
   75     2 root     SW       0   0%   0% [crypto/0]                           
  645     2 root     SW       0   0%   0% [khubd]                              
  653     2 root     SW       0   0%   0% [phy0]                               
    8     2 root     SW       0   0%   0% [async/mgr]                          
  584     2 root     SW       0   0%   0% [cfg80211]                           
  755     2 root     SW       0   0%   0% [rpciod/0]                           
  895     2 root     SW       0   0%   0% [nfsiod]                             
  713     2 root     SW<      0   0%   0% [kslowd000]                          
  716     2 root     SW<      0   0%   0% [kslowd001]                          
    2     0 root     SW       0   0%   0% [kthreadd]                           
    3     2 root     SW       0   0%   0% [ksoftirqd/0]                        
  240     2 root     SW       0   0%   0% [ipolldevd]                          

root@OpenWrt:/# 
root@OpenWrt:/# opkg list-installed
avahi-daemon - 0.6.25-1            
avahi-dnsconfd - 0.6.25-1          
base-files - 43-r21355             
busybox - 1.15.3-2                 
collectd - 4.9.1-1                 
collectd-mod-interface - 4.9.1-1   
collectd-mod-load - 4.9.1-1        
collectd-mod-rrdtool - 4.9.1-1     
collectd-mod-wireless - 4.9.1-1    
crda - 1.1.0-2                     
ddns-scripts - 1.0.0-8             
dnsmasq - 2.52-4                   
dropbear - 0.52-4                  
fdisk - 2.13.0.1-4                 
firewall - 1-10                    
hotplug2 - 1.0-beta-1              
iptables - 1.4.6-2                 
iptables-mod-conntrack - 1.4.6-2   
iptables-mod-conntrack-extra - 1.4.6-2
iptables-mod-filter - 1.4.6-2         
iptables-mod-imq - 1.4.6-2            
iptables-mod-ipopt - 1.4.6-2          
iptables-mod-nat - 1.4.6-2            
iw - 0.9.19-1                         
kernel - 2.6.32.10-1                  
kmod-ath - 2.6.32.10+2010-04-28-1     
kmod-ath9k - 2.6.32.10+2010-04-28-1   
kmod-button-hotplug - 2.6.32.10-1     
kmod-cfg80211 - 2.6.32.10+2010-04-28-1
kmod-crc-ccitt - 2.6.32.10-1          
kmod-crc16 - 2.6.32.10-1              
kmod-crypto-aes - 2.6.32.10-1         
kmod-crypto-arc4 - 2.6.32.10-1        
kmod-crypto-core - 2.6.32.10-1        
kmod-fs-autofs4 - 2.6.32.10-1         
kmod-fs-cifs - 2.6.32.10-1            
kmod-fs-ext2 - 2.6.32.10-1            
kmod-fs-ext3 - 2.6.32.10-1            
kmod-fs-ext4 - 2.6.32.10-1            
kmod-fs-mbcache - 2.6.32.10-1         
kmod-fs-msdos - 2.6.32.10-1           
kmod-fs-nfs - 2.6.32.10-1             
kmod-fs-nfs-common - 2.6.32.10-1      
kmod-fs-ntfs - 2.6.32.10-1            
kmod-fs-vfat - 2.6.32.10-1            
kmod-input-core - 2.6.32.10-1         
kmod-input-gpio-buttons - 2.6.32.10-1 
kmod-input-polldev - 2.6.32.10-1      
kmod-ipt-conntrack - 2.6.32.10-1      
kmod-ipt-conntrack-extra - 2.6.32.10-1
kmod-ipt-core - 2.6.32.10-1           
kmod-ipt-filter - 2.6.32.10-1         
kmod-ipt-imq - 2.6.32.10-1            
kmod-ipt-ipopt - 2.6.32.10-1          
kmod-ipt-nat - 2.6.32.10-1            
kmod-ipt-nathelper - 2.6.32.10-1      
kmod-leds-gpio - 2.6.32.10-1          
kmod-mac80211 - 2.6.32.10+2010-04-28-1
kmod-nls-base - 2.6.32.10-1           
kmod-nls-cp437 - 2.6.32.10-1          
kmod-nls-iso8859-1 - 2.6.32.10-1      
kmod-ppp - 2.6.32.10-1                
kmod-pppoe - 2.6.32.10-1              
kmod-sched - 2.6.32.10-1              
kmod-scsi-core - 2.6.32.10-1          
kmod-textsearch - 2.6.32.10-1         
kmod-tun - 2.6.32.10-1                
kmod-usb-core - 2.6.32.10-1           
kmod-usb-ohci - 2.6.32.10-1           
kmod-usb-printer - 2.6.32.10-1        
kmod-usb-storage - 2.6.32.10-1        
kmod-usb-storage-extras - 2.6.32.10-1 
kmod-usb-uhci - 2.6.32.10-1           
kmod-usb2 - 2.6.32.10-1               
libavahi - 0.6.25-1                   
libblkid - 1.41.11-1                  
libc - 0.9.30.1-43                    
libdaemon - 0.14-2                    
libdlna - 0.2.3-1                     
libexpat - 2.0.1-1                    
libfaad2 - 2.7-1                      
libffmpeg - 20080419-2                
libgcc - 4.3.3+cs-43                  
libgdbm - 1.8.3-1                     
libiptc - 1.4.6-2                     
liblua - 5.1.4-6                      
liblzo - 2.03-3                       
libnl-tiny - 0.1-1                    
libopenssl - 0.9.8m-3                 
libpthread - 0.9.30.1-43              
librrd1 - 1.0.50-1                    
librt - 0.9.30.1-43                   
libuci - 12012009.5-1                 
libuci-lua - 12012009.5-1             
libupnp - 1.6.6-2                     
libuuid - 1.41.11-1                   
libxtables - 1.4.6-2                  
lua - 5.1.4-6                         
luci - 0.9.0-1                        
luci-admin-core - 0.9.0-1             
luci-admin-full - 0.9.0-1             
luci-admin-mini - 0.9.0-1             
luci-app-ddns - 0.9.0-1               
luci-app-firewall - 0.9.0-1           
luci-app-initmgr - 0.9.0-1            
luci-app-ntpc - 0.9.0-1               
luci-app-openvpn - 0.9.0-1            
luci-app-p910nd - 0.9.0-1             
luci-app-qos - 0.9.0-1                
luci-app-samba - 0.9.0-1              
luci-app-statistics - 0.9.0-1         
luci-app-tinyproxy - 0.9.0-1          
luci-app-upnp - 0.9.0-1               
luci-app-ushare - 0.9.0-1             
luci-cbi - 0.9.0-1                    
luci-core - 0.9.0-1                   
luci-http - 0.9.0-1                   
luci-i18n-english - 0.9.0-1           
luci-ipkg - 0.9.0-1                   
luci-lmo - 0.9.0-1                    
luci-nixio - 0.9.0-1                  
luci-sgi-cgi - 0.9.0-1
luci-sys - 0.9.0-1
luci-theme-base - 0.9.0-1
luci-theme-openwrt - 0.9.0-1
luci-uci - 0.9.0-1
luci-uvl - 0.9.0-1
luci-web - 0.9.0-1
miniupnpd - 1.4-1
mount-utils - 2.13.0.1-4
mountd - 0.1-1
mtd - 12
ntpclient - 2007_365-4
openvpn - 2.1.1-1
opkg - 513-2
p910nd - 0.93-1
pciutils - 3.1.7-2
ppp - 2.4.4-5
ppp-mod-pppoe - 2.4.4-5
qos-scripts - 1.2.1-2
rrdtool1 - 1.0.50-1
samba3 - 3.0.24-6
strace - 4.5.19-3
swconfig - 5
tc - 2.6.29-1-2
tinyproxy - 1.8.1-1
uboot-envtools - 20081215-2
uci - 12012009.5-1
udevtrigger - 106-1
uhttpd - 9
ushare - 1.1a-1
wireless-tools - 29-4
wpad - 20100418-1
zlib - 1.2.3-5
root@OpenWrt:/#

comment:3 in reply to: ↑ 2 Changed 8 years ago by tobiassaunders@…

I had this problem and disabling mountd did not stop nfsd working - I think the nfsd init script calls mountd and calling it again leads to the high CPU

comment:4 Changed 7 years ago by Martin Grosup <kommerz@…>

Problem also still exists on: WNDR3700 (ar71xx) with trunk r23987

root@mag81gw1:~# strace mountd
execve("/sbin/mountd", ["mountd"], [/* 9 vars */]) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2aaad000
stat("/etc/ld.so.cache", 0x7fe193b0)    = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.0", O_RDONLY)       = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=8315, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\10`\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 77824, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabe000
old_mmap(0x2aabe000, 6552, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aabe000
old_mmap(0x2aacf000, 4219, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x2aacf000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/lib/libuci.so.2010-09-28", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=39904, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\23\200\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 106496, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aad1000
old_mmap(0x2aad1000, 39364, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aad1000
old_mmap(0x2aaea000, 3040, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9000) = 0x2aaea000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=64300, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\33\340\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 131072, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaeb000
old_mmap(0x2aaeb000, 62236, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aaeb000
old_mmap(0x2ab0a000, 2860, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xf000) = 0x2ab0a000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=401084, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\254\0\0\0\0004"..., 4096) = 4096
old_mmap(NULL, 487424, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab0b000
old_mmap(0x2ab0b000, 396228, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab0b000
old_mmap(0x2ab7b000, 7868, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x60000) = 0x2ab7b000
old_mmap(0x2ab7d000, 18160, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab7d000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=401084, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=401084, ...}) = 0
close(3)                                = 0
open("/lib/libdl.so.0", O_RDONLY)       = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=8315, ...}) = 0
close(3)                                = 0
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=64300, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=401084, ...}) = 0
close(3)                                = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=20700, ...}) = 0
mprotect(0x2aacf000, 4096, PROT_READ)   = 0
mprotect(0x2ab7b000, 4096, PROT_READ)   = 0
mprotect(0x2aabc000, 4096, PROT_READ)   = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
fork()                                  = 9780
exit(0)                                 = ?

comment:5 Changed 7 years ago by jow

  • Owner changed from developers to blogic
  • Status changed from new to assigned

comment:6 Changed 7 years ago by Martin Grosup <kommerz@…>

It seems to exist a patch. Could anybody include it, if it is suitable?
from: http://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg06051.html

---
 package/mountd/patches/001-fix-cpu.patch |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 package/mountd/patches/001-fix-cpu.patch

diff --git a/package/mountd/patches/001-fix-cpu.patch b/package/mountd/patches/001-fix-cpu.patch
new file mode 100644
index 0000000..ca06586
--- /dev/null
+++ b/package/mountd/patches/001-fix-cpu.patch
@@ -0,0 +1,25 @@
+diff -Naur mountd-0.1/lib/autofs.c mountd-0.2/lib/autofs.c
+--- mountd-0.1/lib/autofs.c	2009-10-02 23:54:53.000000000 +0200
++++ mountd-0.2/lib/autofs.c	2010-05-31 12:14:56.000000000 +0200
+@@ -147,15 +147,18 @@
+ 
+ 	while(1)
+ 	{
+-		if(poll(fds, 2, 1000) == -1)
++		int res = poll(fds, 1, -1);
++		if(res == -1)
+ 		{
+ 			if (errno == EINTR)
+ 				continue;
+ 			log_printf("failed while trying to read packet from kernel\n");
+ 			return -1;
+ 		}
+-		if(fds[0].revents & POLLIN)
+-			return fullread(pkt, sizeof(*pkt));
++		else if ( res > 0 ) {
++			if(fds[0].revents & POLLIN)
++				return fullread(pkt, sizeof(*pkt));
++		}
+ 	}
+ }
+ 
-- 
1.7.0.4

comment:7 follow-up: Changed 7 years ago by bruce@…

I modified the patch slightly and tested it. It solves the problem. Would someone please include it? Openwrt performs really poorly with this loop going on.

--- a/lib/autofs.c 2009-10-02 14:54:53.000000000 -0700
+++ b/lib/autofs.c 2010-12-20 17:54:36.000000000 -0800
@@ -145,16 +145,15 @@

fds[0].fd = fdout;
fds[0].events = POLLIN;


  • while(1)
  • {
  • if(poll(fds, 2, 1000) == -1)
  • {

+ for ( ; ; ) {
+ int res = poll(fds, 1, -1);
+
+ if(res == -1) {

if (errno == EINTR)

continue;

log_printf("failed while trying to read packet from kernel\n");

return -1;

}

  • if(fds[0].revents & POLLIN)

+ else if ( res > 0 && fds[0].revents & POLLIN )

return fullread(pkt, sizeof(*pkt));

}

}

comment:8 in reply to: ↑ 7 Changed 7 years ago by bruce@…

Patch with proper wiki formatting. Sorry.

--- a/lib/autofs.c      2009-10-02 14:54:53.000000000 -0700
+++ b/lib/autofs.c      2010-12-20 17:54:36.000000000 -0800
@@ -145,16 +145,15 @@
        fds[0].fd = fdout;
        fds[0].events = POLLIN;
 
-       while(1)
-       {
-               if(poll(fds, 2, 1000) == -1)
-               {
+        for ( ; ; ) {
+               int res = poll(fds, 1, -1);
+
+               if(res == -1) {
                        if (errno == EINTR)
                                continue;
                        log_printf("failed while trying to read packet from kernel\n");
                        return -1;
                }
-               if(fds[0].revents & POLLIN)
+               else if ( res > 0 && fds[0].revents & POLLIN )
                        return fullread(pkt, sizeof(*pkt));
        }
 }

comment:9 Changed 7 years ago by dumghen

Is this patch included in backfire RC5-testing?
Thanks!

comment:10 Changed 7 years ago by Alexei Anisimov <alexei.anisimov@…>

I am having the same on WZR-HP-G301NH image from trunk:

ATTITUDE ADJUSTMENT (bleeding edge, r27025)
mountd - 0.1-3

will this be eventually included into trunk as well?

comment:11 Changed 7 years ago by Giuse <dk_giuse89@…>

The same problem with Vodafone station HW553 with cpu bcm6358

comment:12 follow-up: Changed 7 years ago by jow

Is this problem still present in RC5 ?

comment:13 in reply to: ↑ 12 Changed 7 years ago by Giuse <dk_giuse89@…>

Replying to jow:

Is this problem still present in RC5 ?

I am ok with last trunk, thanks.

comment:14 Changed 7 years ago by jow

  • Resolution set to fixed
  • Status changed from assigned to closed

The bug is still present in RC5. I added the proposed patch to trunk in r27635 and merged it to Backfire in r27636 - it will be part of the next binary release.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.