- **status**: review --> fixed
- **Comment**:
changeset: 8566:7531f6abf2cf
tag: tip
user: Hans Nordeback <[email protected]>
date: Thu Feb 09 13:03:30 2017 +0100
summary: mds: TCP Libraries cause high CPU load when opensaf service stops
[#2290]
---
** [tickets:#2290] mds: (TCP) Libraries cause high CPU load when opensaf
service stops**
**Status:** fixed
**Milestone:** 5.2.FC
**Created:** Tue Feb 07, 2017 11:03 AM UTC by Hung Nguyen
**Last Updated:** Wed Feb 08, 2017 12:34 PM UTC
**Owner:** Hans Nordebäck
When DBSRsock is closed and it returns from mdtm_process_poll_recv_data_tcp()
~~~
:::c
syslog(LOG_ERR, "MDTM:SOCKET recd_bytes :%zd, conn lost with dh server",
recd_bytes);
close(tcp_cb->DBSRsock);
return;
~~~
the while() loops rapidly because the poll() returns **1** and pfd[0].revents
is **32 (POLLNVAL 0x020)**
~~~
:::c
pfd[0].fd = tcp_cb->DBSRsock;
pfd[1].fd = tcp_cb->tmr_fd;
while (1) {
int pollres;
pfd[0].events = POLLIN;
pfd[1].events = POLLIN;
pfd[0].revents = pfd[1].revents = 0;
pollres = poll(pfd, 2, MDTM_TCP_POLL_TIMEOUT);
...
}
~~~
-----
Reproduce steps:
* run immcfg
~~~
root@SC-1:~# immcfg
>
~~~
* stop opensaf service
~~~
root@SC-1:~# service opensafd stop
~~~
* check the CPU
---
Sent from sourceforge.net because [email protected] is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets