What's new

100% CPU Utilization by Miniupnpd and Netstat

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I'm not aware of any direct link between miniupnpd and dcd. I think the most likely solution to dcd problems is to install the latest firmware and/or not create custom network interfaces.

The only idea I can think of regarding miniupnpd is to strace it and see if there's something obvious that it's looping on.

@ColinTaylor

The following are the listening connections and logs for the service stop_upnp and service start_upnp of the miniupnpd daemon.

Code:
# netstat -anp | grep -i upnp
tcp        0      0 0.0.0.0:30467           0.0.0.0:*               LISTEN      1533/miniupnpd

Code:
Aug 29 20:26:23 router rc_service: service 1067:notify_rc stop_upnp
Aug 29 20:26:23 router custom_script: Running /jffs/scripts/service-event (args: stop upnp)
Aug 29 20:26:24 router miniupnpd[32710]: shutting down MiniUPnPd
Aug 29 20:26:24 router custom_script: Running /jffs/scripts/service-event-end (args: stop upnp)

Code:
# netstat -anp | grep -i upnp
tcp        0      0 0.0.0.0:63138           0.0.0.0:*               LISTEN      32710/miniupnpd

Code:
# ps w | grep -i upnp
32710 admin      888 S    miniupnpd -f /etc/upnp/config

Code:
Aug 29 20:21:15 router rc_service: service 32693:notify_rc start_upnp
Aug 29 20:21:15 router custom_script: Running /jffs/scripts/service-event (args: start upnp)
Aug 29 20:21:15 router custom_script: Running /jffs/scripts/service-event-end (args: start upnp)
Aug 29 20:21:15 router miniupnpd[32710]: HTTP listening on port 63138
Aug 29 20:21:15 router miniupnpd[32710]: Listening for NAT-PMP/PCP traffic on port 5351

As for DCD... I would rather not use DCD to avoid upgrading the firmware on all my Asuswrt nodes and router.

Thanks, again.


Gary
 
Last edited:
@ColinTaylor

An strace -o upnp -ff miniupnpd -f /etc/upnp/config -d shows miniupnpd start-up and reload a custom port mapping for uTorrent that has been working forever. It also shows a new RDP port mapping that I recently added to access a local Windows machine externally.

Code:
# strace -o upnp -ff miniupnpd -f /etc/upnp/config -d
miniupnpd[1533]: system uptime is 64632 seconds
miniupnpd[1533]: Reloading rules from lease file
miniupnpd[1533]: parsing lease file line 'TCP:11111:192.168.0.237:11111:0:uTorrent (TCP)
'
miniupnpd[1533]: UPnP permission rule 5 matched : port mapping accepted
miniupnpd[1533]: updating existing port mapping 11111 TCP (rhost '') => 192.168.0.237:11111
miniupnpd[1533]: parsing lease file line 'UDP:11111:192.168.0.237:11111:0:uTorrent (UDP)
'
miniupnpd[1533]: UPnP permission rule 5 matched : port mapping accepted
miniupnpd[1533]: updating existing port mapping 11111 UDP (rhost '') => 192.168.0.237:11111
miniupnpd[1533]: version 2.1 starting NAT-PMP/PCP UPnP-IGD ext if vlan2 BOOTID=1724984944
miniupnpd[1533]: HTTP listening on port 30467
miniupnpd[1533]: Listening for NAT-PMP/PCP traffic on port 5351
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53541 : GET /rootDesc.xml (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53542 : POST /ctl/IPConn (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress
miniupnpd[1533]: HTTP REQUEST from 192.168.0.212:49717 : GET /rootDesc.xml (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53543 : GET /rootDesc.xml (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53544 : GET /L3F.xml (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53545 : SUBSCRIBE /evt/L3F (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: ProcessHTTPSubscribe /evt/L3F
miniupnpd[1533]: Callback '<http://192.168.0.237:2869/upnp/eventing/qmgarkyxtj>' Timeout=1800
miniupnpd[1533]: SID ''
miniupnpd[1533]: addSubscriber(/evt/L3F, http://192.168.0.237:2869/upnp/eventing/qmgarkyxtj, 1800)
miniupnpd[1533]: generated sid=uuid:b3636f5a-957a-4a9c-9272-f281dc4e2206
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 1 11
miniupnpd[1533]: upnp_event_notify_connect: '192.168.0.237' 2869 '/upnp/eventing/qmgarkyxtj'
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53546 : GET /WANCfg.xml (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53547 : SUBSCRIBE /evt/CmnIfCfg (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: ProcessHTTPSubscribe /evt/CmnIfCfg
miniupnpd[1533]: Callback '<http://192.168.0.237:2869/upnp/eventing/uvcdjunbdo>' Timeout=1800
miniupnpd[1533]: SID ''
miniupnpd[1533]: addSubscriber(/evt/CmnIfCfg, http://192.168.0.237:2869/upnp/eventing/uvcdjunbdo, 1800)
miniupnpd[1533]: generated sid=uuid:c3ceec14-a05a-4511-bd47-6f051962ffb5
miniupnpd[1533]: upnpevents_selectfds: 0x2c260 1 12
miniupnpd[1533]: upnp_event_notify_connect: '192.168.0.237' 2869 '/upnp/eventing/uvcdjunbdo'
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2c260 2 12 0 1
miniupnpd[1533]: upnp_event_send: sending event notify message to 192.168.0.237:2869
miniupnpd[1533]: upnp_event_send: msg: NOTIFY /upnp/eventing/uvcdjunbdo HTTP/1.1
Host: 192.168.0.237:2869
Content-Type: text/xml; charset="utf-8"
Content-Length: 142
NT: upnp:event
NTS: upnp:propchange
SID: uuid:c3ceec14-a05a-4511-bd47-6f051962ffb5
SEQ: 0
Connection: close
Cache-Control: no-cache

<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0"><e:property><PhysicalLinkStatus>Up</PhysicalLinkStatus></e:property></e:propertyset>

miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: upnpevents_selectfds: 0x2c260 4 12
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2c260 4 12 1 0
miniupnpd[1533]: upnp_event_recv: (125bytes) HTTP/1.1 200 OK
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 30 Aug 2024 02:29:03 GMT
Connection: close
Content-Length: 0


miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53548 : GET /WANIPCn.xml (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53549 : SUBSCRIBE /evt/IPConn (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: ProcessHTTPSubscribe /evt/IPConn
miniupnpd[1533]: Callback '<http://192.168.0.237:2869/upnp/eventing/ewpuugjqdd>' Timeout=1800
miniupnpd[1533]: SID ''
miniupnpd[1533]: addSubscriber(/evt/IPConn, http://192.168.0.237:2869/upnp/eventing/ewpuugjqdd, 1800)
miniupnpd[1533]: generated sid=uuid:2d53e0ef-be21-4d90-8c32-f5c74a4e2d55
miniupnpd[1533]: upnpevents_selectfds: 0x2c2e0 1 12
miniupnpd[1533]: upnp_event_notify_connect: '192.168.0.237' 2869 '/upnp/eventing/ewpuugjqdd'
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2c2e0 2 12 0 1
miniupnpd[1533]: upnp_event_send: sending event notify message to 192.168.0.237:2869
miniupnpd[1533]: upnp_event_send: msg: NOTIFY /upnp/eventing/ewpuugjqdd HTTP/1.1
Host: 192.168.0.237:2869
Content-Type: text/xml; charset="utf-8"
Content-Length: 390
NT: upnp:event
NTS: upnp:propchange
SID: uuid:2d53e0ef-be21-4d90-8c32-f5c74a4e2d55
SEQ: 0
Connection: close
Cache-Control: no-cache

<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0"><e:property><PossibleConnectionTypes>IP_Routed</PossibleConnectionTypes></e:property><e:property><ConnectionStatus>Connected</ConnectionStatus></e:property><e:property><ExternalIPAddress>###.###.###.###</ExternalIPAddress></e:property><e:property><PortMappingNumberOfEntries>2</PortMappingNumberOfEntries></e:property></e:propertyset>

miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: upnpevents_selectfds: 0x2c2e0 4 12
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2c2e0 4 12 1 0
miniupnpd[1533]: upnp_event_recv: (125bytes) HTTP/1.1 200 OK
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 30 Aug 2024 02:29:03 GMT
Connection: close
Content-Length: 0


miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53550 : POST /ctl/IPConn (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetConnectionTypeInfo
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53551 : POST /ctl/IPConn (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetNATRSIPStatus
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53552 : GET /rootDesc.xml (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 0
miniupnpd[1533]: HTTP REQUEST from 192.168.0.237:53553 : UNSUBSCRIBE /evt/L3F (HTTP/1.1)
miniupnpd[1533]: Host: 192.168.0.1:30467
miniupnpd[1533]: ProcessHTTPUnSubscribe /evt/L3F
miniupnpd[1533]: SID 'uuid:b3636f5a-957a-4a9c-9272-f281dc4e2206'
miniupnpd[1533]: upnpevents_selectfds: 0x2d350 2 11
miniupnpd[1533]: upnpevents_processfds: 0x2d350 2 11 0 1
miniupnpd[1533]: level=0 type=8
miniupnpd[1533]: ifindex = 11  192.168.0.1
miniupnpd[1533]: ST: urn:schemas-upnp-org:device:MediaRenderer:1 (ver=1)
miniupnpd[1533]: SSDP M-SEARCH from 192.168.0.237:51619 ST: urn:schemas-upnp-org:device:MediaRenderer:1
miniupnpd[1533]: level=0 type=8
miniupnpd[1533]: ifindex = 11  192.168.0.1
miniupnpd[1533]: ST: urn:schemas-upnp-org:device:MediaRenderer:1 (ver=1)
miniupnpd[1533]: SSDP M-SEARCH from 192.168.0.237:51619 ST: urn:schemas-upnp-org:device:MediaRenderer:1
miniupnpd[1533]: level=0 type=8
miniupnpd[1533]: ifindex = 11  192.168.0.1
miniupnpd[1533]: ST: urn:schemas-upnp-org:device:MediaRenderer:1 (ver=1)
miniupnpd[1533]: SSDP M-SEARCH from 192.168.0.237:51619 ST: urn:schemas-upnp-org:device:MediaRenderer:1
miniupnpd[1533]: level=0 type=8
miniupnpd[1533]: ifindex = 11  192.168.0.1
miniupnpd[1533]: level=0 type=8
miniupnpd[1533]: ifindex = 11  192.168.0.1
miniupnpd[1533]: level=0 type=8
miniupnpd[1533]: ifindex = 11  192.168.0.1

I'll try removing the recent RDP port mapping and confirm whether it resolves the issue.

Please let me know if there is anything in the strace that I missed.

Thanks, again.


Gary
 
Last edited:
@ColinTaylor

UPDATE: I removed the recent RDP port mapping to no effect. However, I discovered that re-enabling DCD, with Miniupnpd stopped, did not produce the issue. It appears that the root cause is Miniupnpd and DCD is simply trying to keep up with it.

EDIT: Disregard the above update. It appears I spoke too soon. DCD took a bit to start-up and it is consuming all resources on 1 CPU core with Miniupnpd stopped.

Still not sure what is causing the Miniupnpd issue.

Respectfully,


Gary
 
Last edited:
As for DCD... I would rather not use DCD to avoid upgrading the firmware on all my Asuswrt nodes and router.
Then don't use it, I don't. Just turn off the TrendMicro stuff.

Please let me know if there is anything in the strace that I missed.
You'll have to run the strace against the PID of the miniupnpd process when the problem is actually occurring.
 
The dcd code has been garbage for years. Either Trend Micro doesn`t care, or they lack the competence to properly debug it.

At some point it might be time to just give up on Trend Micro's bwdpi IMHO. Beside the shoddy coding, faster Internet connections are becoming bottlenecked by bwdpi as well.
 
@Tech9 @ColinTaylor @RMerlin et al:

UPDATE: The root cause appears to have been a DOS attack against the dedicated VPN configured via my Asuswrt-Merlin router. After dropping traffic for the offending addresses, the Miniupnpd service no longer consums all resources on 1 CPU core, which DCD, in turn, no longer consums all resources on the other CPU core.

Once, again, thank you for your support!

Respectfully,


Gary
 
Last edited:

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top