Ticket #717 (closed defect: fixed)

Opened 8 weeks ago

Last modified 6 weeks ago

ncs_mqnd uses 100% CPU after IMM integration

Reported by: hafe Owned by: shekhar
Priority: blocker Milestone: 4.0.0-M3
Component: MQSv Version: 4.0-B3
Keywords: Cc:
patch waiting for maintainer: no

Description

Same problem as in another ticket. The main thread spawns a new thread that executes the main poll loop of mqnd. After that the main thread initialize IMM and gets a selection object too late for the poll thread which is already spinning round in an EAGAIN with a bad file descriptor:

[pid 7395] recvfrom(22, 0x4007e390, 1, 64, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 7395] poll([{fd=16, events=POLLIN}, {fd=18, events=POLLIN}, {fd=13, events=POLLIN}, {fd=0, events=POLLIN, revents=POLLIN}], 4, -1) = 1
[pid 7395] recvfrom(22, 0x4007e390, 1, 64, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 7395] poll([{fd=16, events=POLLIN}, {fd=18, events=POLLIN}, {fd=13, events=POLLIN}, {fd=0, events=POLLIN, revents=POLLIN}], 4, -1) = 1
[pid 7395] recvfrom(22, 0x4007e390, 1, 64, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 7395] poll([{fd=16, events=POLLIN}, {fd=18, events=POLLIN}, {fd=13, events=POLLIN}, {fd=0, events=POLLIN, revents=POLLIN}], 4, -1) = 1
[pid 7395] recvfrom(22, 0x4007e390, 1, 64, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 7395] poll([{fd=16, events=POLLIN}, {fd=18, events=POLLIN}, {fd=13, events=POLLIN}, {fd=0, events=POLLIN, revents=POLLIN}], 4, -1) = 1
[pid 7395] recvfrom(22, 0x4007e390, 1, 64, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)

The idiotic common main in ncs_main_pvt.c must go! Please remove mqnd from that one and create a local main() routine that does initialize and then poll!

Attachments

Change History

Changed 8 weeks ago by shekhar

  • owner set to shekhar
  • status changed from new to accepted

Changed 6 weeks ago by shekhar

  • status changed from accepted to closed
  • resolution set to fixed

changeset: 714:ea6067b0036f
tag: tip
user: Shekhar <chandrasekhar.yadav@…>
date: Fri Nov 20 21:05:00 2009 +0530
summary: MQSv: ncs_mqnd uses 100% CPU after IMM integration(#717)

Add/Change #717 (ncs_mqnd uses 100% CPU after IMM integration)

Author



Action
as closed
Next status will be 'reopened'
Note: See TracTickets for help on using tickets.