- **status**: unassigned --> accepted
- **assigned_to**: Hans Nordebäck
---
** [tickets:#2290] mds: (TCP) Libraries cause high CPU load when opensaf
service stops**
**Status:** accepted
**Milestone:** 5.2.FC
**Created:** Tue Feb 07, 2017 11:03 AM UTC by Hung Nguyen
**Last Updated:** Tue Feb 07, 2017 11:03 AM 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 opensaf-tickets@lists.sourceforge.net 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
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets