Modify

Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#7159 closed defect (invalid)

[ar71xx] Openvpn uses 100% CPU

Reported by: anonymous Owned by: developers
Priority: response-needed Milestone: Backfire 10.03.1
Component: packages Version: Backfire 10.03
Keywords: openvpn, routerboard, cpu Cc:

Description

I'm running OpenWrt on an Routerboard 433 AH.

When I start openvpn it uses 100% CPU

Attachments (3)

strace (2.3 KB) - added by anonymous 8 years ago.
.config.gz (8.6 KB) - added by anonymous 8 years ago.
.config used to build openwrt
vpn.conf (135 bytes) - added by anonymous 8 years ago.
openvpn config

Download all attachments as: .zip

Change History (29)

Changed 8 years ago by anonymous

Changed 8 years ago by anonymous

.config used to build openwrt

Changed 8 years ago by anonymous

openvpn config

comment:1 Changed 8 years ago by anonymous

It's the same on Asus WL-500gP (Tested 10.03 and also latest trunk)

Mem: 26724K used, 3044K free, 0K shrd, 2232K buff, 14024K cached
CPU: 32% usr 66% sys 0% nic 0% idle 0% io 0% irq 0% sirq
Load average: 0.99 0.97 0.99 2/41 5075

PID PPID USER STAT VSZ %MEM %CPU COMMAND

4946 1 root R 2988 10% 100% /usr/sbin/openvpn

Strace says:
read(7, 0x47a9cc, 1532) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=6, events=POLLIN|POLLPRI}, {fd=7, events=POLLIN|POLLPRI}, {fd=4, events=POLLIN|POLLPRI}], 3, 10000) = 1 ([{fd=7, revents=POLLIN}])

comment:2 Changed 8 years ago by Ari Suutari <ari@…>

Same thing happens on D-link dir-825 also (backfire 10.03).

comment:3 Changed 8 years ago by Ari Suutari <ari@…>

More test results: To rule out problems with openvpn config, I took a working config from LinkSys WRT54GL runnig kamikaze to another WRT54GL running backfire 10.03 (brcm47xx version). Same problem, uses 100% cpu.

comment:4 Changed 8 years ago by Ari Suutari <ari@…>

I just compiled r21701 from backfire branch and openvpn seems to work ok with it.
Tested on ar71xx (d-link 825), cpu usage is normal again.

comment:5 Changed 8 years ago by mrkfoerster@…

Ari Suutari: just installed the freshly built r21701 on my Routerboard 433AH (ar71xx), openvpn still uses 100%.

Mem: 10976K used, 116084K free, 0K shrd, 0K buff, 6348K cached
CPU: 39% usr 60% sys 0% nic 0% idle 0% io 0% irq 0% sirq
Load average: 0.50 0.15 0.05 2/26 1097

PID PPID USER STAT VSZ %MEM %CPU COMMAND

1089 1 root R 2940 2% 100% openvpn --config /etc/openvpn/test.ov

Have you used different build settings?

comment:6 Changed 8 years ago by Ari Suutari <ari@…>

My build settings are default, except:

target-system=ar71xx, target profile=dir-825
Kernel->Wireless, ath-> force regulatory domain
kmod-usb-hid=y
kmod-usb-ohci=y
dmsmasq: n
Network, time: ntpclient=y
Network, Vpn: openvpn=m
Network, snmpd-static=y
Network, ppp=n
kmod-ppp = n


Openvpn config is:

config openvpn test
        option enable 1
        option local n.n.n.n
        option dev tap
        option secret /etc/config/openvpn.key
        option keepalive "10 120"
        option comp_lzo 1
        option verb 3
        option cipher none
        option no_replay 1


comment:7 Changed 8 years ago by Ari Suutari <ari@…>

Just a thought: Make sure that kmod-tun & other modules are the ones you have compiled locally. If you just install openvpn with opkg defaults it downloads it from openwrt.org.

comment:8 Changed 7 years ago by anonymous

Is there any progress?

comment:9 follow-ups: Changed 7 years ago by nico

  • Priority changed from normal to response-needed

Can you config this issue is still present in 10.03.1-rc1 ?

comment:10 in reply to: ↑ 9 Changed 7 years ago by anonymous

Replying to nico:

Can you config this issue is still present in 10.03.1-rc1 ?

It looks that something is fixed in OpenVPN 2.1.2 already

OpenVPN 2.1.2

2010.08.09 -- Version 2.1.2
* Fixed an issue in the Management Interface that could cause
  a process hang with 100% CPU utilization in --management-client
  mode if the management interface client disconnected at the
  point where credentials are queried.

comment:11 in reply to: ↑ 9 Changed 7 years ago by mrkfoerster@…

Replying to nico:

Can you config this issue is still present in 10.03.1-rc1 ?

I am unable to test the Backfire RC version right now, but the problem still seems to be present in trunk r23062.

comment:12 Changed 7 years ago by loswillios

I am running r23080 and it's fine.

comment:13 Changed 7 years ago by florian

I think this was due to a broken poll/epoll support, or a bad file descriptor mask on the socket.

comment:14 Changed 7 years ago by nbd

  • Resolution set to worksforme
  • Status changed from new to closed

comment:15 Changed 7 years ago by danimo

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Problem still exists for me with r23842 and RB450g. strace reveals the same problem as described by the original reporter.

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

Problem also still exists on:
WNDR3700 (ar71xx) with trunk r23987 and
OpenVPN 2.1.3 mips-openwrt-linux [SSL] [LZO2] built on Nov 12 2010
installed with opkg.. kmod-tun i think also.
What can i do to help? Does "strace /etc/init.d/openvpn start" make sense? or should i write my uci-openvpn-config to a regular openvpn config file and start it with strace? Which strace arguments are essential?

BTW: mountd shows the same problem (openvpn and mountd share 100% CPU) as described in /ticket/7293.html

comment:17 follow-up: Changed 7 years ago by nbd

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

should be fixed by r24164, please reopen if the problem still exists after that commit

comment:18 in reply to: ↑ 17 Changed 7 years ago by Martin Grosup <kommerz@…>

Replying to nbd:

should be fixed by r24164, please reopen if the problem still exists after that commit

Thank you very much!
Now i have to wait for a new package-recompile.. the actual package is from 24th November.
I hope, they are also recompiled regularly?

comment:19 follow-up: Changed 7 years ago by Martin Grosup <kommerz@…>

  • Resolution fixed deleted
  • Status changed from closed to reopened

I updated now to the actual compile.. openvpn_2.1.3-4_ar71xx.ipk

root@mag81gw1:~# openvpn --version
OpenVPN 2.1.3 mips-openwrt-linux [SSL] [LZO2] [EPOLL] built on Nov 29 2010

root@mag81gw1:~# top
[...]
 1630     1 root     R     2948   5%  50% /usr/sbin/openvpn --syslog openvpn(ma
 1616     1 root     R      960   2%  50% /sbin/mountd

Problem still exists.

comment:20 in reply to: ↑ 19 Changed 7 years ago by redcow

Replying to Martin Grosup <kommerz@…>:

I updated now to the actual compile.. openvpn_2.1.3-4_ar71xx.ipk

root@mag81gw1:~# openvpn --version
OpenVPN 2.1.3 mips-openwrt-linux [SSL] [LZO2] [EPOLL] built on Nov 29 2010

root@mag81gw1:~# top
[...]
 1630     1 root     R     2948   5%  50% /usr/sbin/openvpn --syslog openvpn(ma
 1616     1 root     R      960   2%  50% /sbin/mountd

Problem still exists.

I confirm, same problem with the same package (ar71xx).

comment:21 Changed 7 years ago by jow

  • Resolution set to worksforme
  • Status changed from reopened to closed

This usually happens if kmod-tun was not built along with the used kernel, no OpenVPN oddities observed on RC5 here.

comment:22 Changed 6 years ago by roni261980

netgear wndr3800 backfire rc6 vpn use 100%cpu

comment:23 Changed 6 years ago by anonymous

  • Resolution worksforme deleted
  • Status changed from closed to reopened

netgear wndr3800 backfire rc6 vpn use 100%cpu

comment:24 follow-up: Changed 6 years ago by jow

  • Resolution set to invalid
  • Status changed from reopened to closed

And its probably still the same cause of a mismatching kmod-tun. No OpenVPN anomalities observed here.

comment:25 in reply to: ↑ 24 Changed 6 years ago by anonymous

Replying to jow:

And its probably still the same cause of a mismatching kmod-tun. No OpenVPN anomalities observed here.

i have compiled the image and all needs pacgages for openvpn and the kmod-tun is not mismatchig

comment:26 Changed 6 years ago by anonymous

jow you are right is th kmot-tun problem.i resolved and now vpn use 0% of cpu
thanks

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.