Modify

Opened 5 years ago

Closed 4 years ago

Last modified 3 years ago

#13799 closed defect (fixed)

hostapd High CPU usage when 'wifi' command is run using /etc/rc.button scripts ; trunk r37112

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: Cc:

Description

r37112 build for WZR-HP-G300NH

using uci to enable wifi-device (set 'disabled' to 0)
and then using /etc/rc.button/wps to run 'wifi' command

cause hostapd to ramp CPU usage up to 99% (as per 'top' command)

this doesn't happen if 'wifi' command is invoked directly at the interactive command prompt.

Attachments (0)

Change History (23)

comment:1 Changed 5 years ago by anonymous

I have the same problem. Any solution?

comment:2 Changed 5 years ago by peter@…

same issue ,when i restarting wifi in crontab 99% CPU ,but in interactive shell works normaly ,without 99% cpu :)
Barrier Breaker r37276 / LuCI Trunk (svn-r9868)

comment:3 Changed 5 years ago by hannu.nyman@…

I have noticed the same problem. Using "wifi up" from console prompt works ok, but when the same command is embedded in a rc.button script, the hostapd process(es) consume 100% of CPU after a few seconds. (CPU load is usually divided equally between the two radios' two hostapd processes.)

This bug matterialised in June with the new button hotplug functionality. So far I have been unable to figure out a correct way to run "wifi up" from the button script.

Trunk revision r37513 / ar71xx WNDR3700

comment:4 Changed 4 years ago by hnyman <hannu.nyman@…>

#13881 apparently talks about the same issue from another angle. I didn't check connectivity when I originally reported this bug, but based on #13881 there may be also wifi connectivity issues.
https://dev.openwrt.org/ticket/13881#comment:4

comment:5 Changed 4 years ago by nbd

Please try current trunk.

comment:6 Changed 4 years ago by hnyman <hannu.nyman@…>

I see the buggy behaviour with trunk 37745, which is current expect the rx descriptor race condition patch. So unless that would have impact here, this bug is still in the current trunk.

comment:7 Changed 4 years ago by anonymous

r37792 fixed hostapd high cpu on WZR-HP-G300NH

Thank you.

comment:8 Changed 4 years ago by nbd

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

comment:9 Changed 4 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

Still persist when i restarting via crontab.

comment:10 Changed 4 years ago by hnyman <hannu.nyman@…>

Jow fixed the bug in procd, or actually he added the feature that stdout and stderr output are piped to /dev/null.

wifi (or actually hostapd, I guess) wants to output a few lines when it is run. When there is an interactive shell, that works, but apparently fails when run from a script. You might try piping both to /dev/null in your crontab script.

 > /dev/null 2>&1

comment:11 Changed 4 years ago by anonymous

thanks for the reply, but unfortunately piping both to /dev/null dont help at all.

comment:12 follow-up: Changed 4 years ago by nbd

Also try adding < /dev/null

comment:13 in reply to: ↑ 12 Changed 4 years ago by anonymous

Dont work nbd

comment:14 Changed 4 years ago by jow

procd's instance_start() has the same problems as hotplug.c - uloop_done() is missing after fork() and stdio is closed, not redirected to /dev/null.
Can't fix this until tomorrow, maybe nbd can look into it.

comment:15 Changed 4 years ago by anonymous

I have the same issue when using wifi on, wifi off in cron (TP Link WDR4300, r37793).

comment:16 Changed 4 years ago by anonymous

I have the same issue when using wifi on, wifi off in cron (TP Link WDR4300, r37793).

comment:17 Changed 4 years ago by anonymous

I have the same issue when using wifi on, wifi off in cron (TP Link WDR4300, r37793).

comment:18 Changed 4 years ago by anonymous

I have the same issue when using wifi on, wifi off in cron (TP Link WDR4300, r37793).

comment:19 Changed 4 years ago by anonymous

I have the same issue when using wifi on, wifi off in cron (TP Link WDR4300, r37793).

comment:20 Changed 4 years ago by anonymous

I have the same issue when using wifi on, wifi off in cron (TP Link WDR4300, r37793).

comment:21 Changed 4 years ago by anonymous

I have the same issue when using wifi on, wifi off in cron (TP Link WDR4300, r37793).

comment:22 Changed 4 years ago by anonymous

please closed fixed in r37799.

comment:23 Changed 4 years ago by florian

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

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.