CPU usage reaches 100%

Hi friends
Recently, after a two months of using a thin client as a router, I encountered the problem of 100% processor using, Without any reason. By checking the processes in openwrt, the use of the processor through xray (in passwall app) reaches 100% and as a result the device crashes. I tested with different versions of openwrt, passwall and xray-core, but there was no change. The log file and process screenshot is below.
(The problem occurs only when the Xray is enabled and use it for a few minutes. After that, This trace log is shown and the CPU reaches 100% .)

My Thin Client: Asus-Eee-Box-B202

[ 1898.261335] ------------[ cut here ]------------
[ 1898.270643] NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out
[ 1898.280202] WARNING: CPU: 1 PID: 0 at 0xc188d467
[ 1898.289603] Modules linked in: pppoe ppp_async nft_fib_inet nf_flow_table_ipv6 nf_flow_table_ipv4 nf_flow_table_inet pppox ppp_generic nft_tproxy nft_socket nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_counter nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack_netlink nf_conntrack lzo via_velocity via_rhine slhc sis900 r8169 pcnet32 nfnetlink nf_tproxy_ipv6 nf_tproxy_ipv4 nf_socket_ipv6 nf_socket_ipv4 nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 ne2k_pci lzo_rle lzo_decompress lzo_compress libcrc32c forcedeth e100 crc_ccitt 8390 8139too 3c59x e1000 nls_utf8 nls_iso8859_1 nls_cp437 natsemi crypto_acompress vfat fat button_hotplug tg3 realtek mii
[ 1898.362612] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.15.137 #0
[ 1898.373595] Hardware name: System manufacturer P5LD2EB-DHS/P5LD2EB-DHS, BIOS 1302    01/04/2010
[ 1898.384681] EIP: 0xc188d467
[ 1898.395491] Code: 4f 4f b4 ff 8b 46 9c e9 38 ff ff ff 8b 7d e8 c6 05 fe 58 ce c1 01 89 f8 e8 06 26 fb ff 53 50 57 68 f8 de bb c1 e8 90 c3 14 00 <0f> 0b 83 c4 10 eb 8d ba 02 00 00 00 89 c8 e8 16 4f b4 ff e9 ff fe
[ 1898.419081] EAX: 00000039 EBX: 00000000 ECX: f75eddb4 EDX: f75ecf08
[ 1898.430845] ESI: c289a2e8 EDI: c289a000 EBP: c20a9f6c ESP: c20a9f40
[ 1898.442604] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 EFLAGS: 00210292
[ 1898.454346] CR0: 80050033 CR2: b7f6e000 CR3: 01dc2000 CR4: 000006e0
[ 1898.466148] Call Trace:
[ 1898.477694]  <SOFTIRQ>
[ 1898.489019]  ? 0xc19d5901
[ 1898.500382]  ? 0xc19d5a05
[ 1898.511519]  ? 0xc10e8ec2
[ 1898.522633]  ? 0xc188d467
[ 1898.533541]  ? 0xc13ea8e0
[ 1898.544356]  ? 0xc1a16d80
[ 1898.554903]  ? 0xc1a16cda
[ 1898.565388]  ? 0xc1a16d9b
[ 1898.575970]  ? 0xc1a2243c
[ 1898.586140]  ? 0xc113007b
[ 1898.596078]  ? 0xc19d00d8
[ 1898.605976]  ? 0xc1a16d80
[ 1898.615561]  ? 0xc188d467
[ 1898.625201]  ? 0xc19d00d8
[ 1898.634594]  ? 0xc1a16d80
[ 1898.643773]  ? 0xc188d467
[ 1898.653978]  ? 0xc188d230
[ 1898.662863]  0xc114b963
[ 1898.671510]  ? 0xc188d230
[ 1898.680137]  0xc114c6a3
[ 1898.688595]  0xc1a226c1
[ 1898.697140]  ? 0xc1a22620
[ 1898.705561]  0xc10acb2d
[ 1898.713908]  </SOFTIRQ>
[ 1898.722033]  ? 0xc10edc87
[ 1898.730018]  ? 0xc1a19237
[ 1898.737890]  ? 0xc1a2243c
[ 1898.745701]  ? 0xc1a19210
[ 1898.753233]  ? 0xc17c6998
[ 1898.760651]  ? 0xc1a19210
[ 1898.767746]  ? 0xc17c6998
[ 1898.774544]  ? 0xc17c7486
[ 1898.780790]  ? 0xc17c6c5a
[ 1898.786715]  ? 0xc1114708
[ 1898.792435]  ? 0xc11148fd
[ 1898.797591]  ? 0xc10cbc44
[ 1898.802419]  ? 0xc10001e1
[ 1898.807109] ---[ end trace 45c4f3053579fc46 ]---

100% CPU load isn't unexpected for a 15 year old, first generation, Atom N270, but that doesn't make it crash.


Thanks, so what do you think caused the device to crash when it never had this problem before.

The trace mentions "swapper" so I'm going to take a punt that it's swapped itself to death. Or can't use swap. Or has no swap.


The system should have 2 GB RAM, that's hard to fill, without abusing it with server tasks...


What do you think I should do, Is there a way to modify the swapper?

yes, it has 2 GB RAM, Recently this problem has occurred, without any particular change in hardware or software. That's why I'm confused.

If you tried OpenWrt versions that were previously working, it might be related to hardware damage (age) as well. Not saying that it is, just raising the possibility.

As a tangential question, what's the WAN speed you're expecting it to handle? I know that the n270 maxes out under 500 MBit/s (before thinking about anything special), but I have no idea how taxing xray and passwall would be to the performance

Yes, I tried OpenWrt versions that were previously worked.
I disabled Wi-Fi and connected the device to the modem through the LAN port, the maximum speed is 20 Mbps.
The problem occurs only when the Xray is enabled and use it for a few minutes. Then, that trace log is shown and use of the processor reaches 100%.

It mentions the network interface's transmit queue timing out. While I'm not sure what this means in practice, maybe try with an external network interface?

1 Like

Yes, but why only when using Xray this occurs.
Can you recommend an external network card that is compatible with OpenWRT?

It is possible that something in the network chip broke but that is used only under specific conditions. Sorry, can't recommend a device. The stuff i'm using is pretty ancient (less than this eeepc though, hehe) so won't be available off the shelf.

1 Like

In the meantime, you could try it with wifi maybe, either internal or external (while disconnecting the network cable), just for the test

1 Like

Just checked which network interface is connected (externally) to my Debian server (running on a tablet with a broken display, hehe), it's RTL8153. This physical device is a combo of 4 usb3 ports and ethernet, marketed under "Dodocool" (what a name...). Has been working reliably for years, anyway.

1 Like

thanks dear antonk. My device have Wi-Fi, I'll check with it and I don't think Dodocool will be found. :grinning:

1 Like

Excuse me, to use Wi-Fi instead of LAN port, should I activate the hotspot function in OpenWRT? Is there a specific guide?

What is xray anyway? Look for loops. There are lots of them in the shell scripts, and would be the first culprit for a runaway process. Some loop that has not found an exit condition.

Create a github issue for this app. ( I don't even know where that would be ... )

1 Like

I'm not proficient enough with setting up OpenWrt but I suppose you should check which network interfaces are included in your virtual LAN bridge and make sure that wifi is included. Then it should just work (?). Probably you will get more help if asking in the "Installing and using OpenWrt" section of the forum (you are currently in the "For Developers" section).

1 Like

Xray is a superset of v2ray-core that using it as a VPN server.
but I don't think it's the problem because I never had this problem and I even tested different versions of Xray.

Okay. Thanks. Didn't know.

It's never xray. Until it is.

Xray requires scripts to manage its config properly.