Ticket #187 (closed defect: duplicate)
mio "select" backend goes into infinite loop
| Reported by: | Zerg2000 | Owned by: | smoku |
|---|---|---|---|
| Priority: | major | Component: | General |
| Version: | 2.1.21 | Keywords: | mio select infinite loop |
| Cc: | Tracforge_linkmap: | ||
| Blocking: | Blocked By: |
Description
Hello,
Today I have upgraded jabberd from 2.1.6 to 2.1.21, updated configuration files and database. When I start jabberd s2s, c2s, sm and resolver eats 100% CPU. I have solved the problem by passing --enable-mio=poll to configure script.
I use gentoo linux and there is MIO_SELECT and MIO_POLL defined in config.h by default when installing package. What I can see from mio.c - select() is used first.
OS: Gentoo Linux (hardened - SSP, PIE, PaX) Kernel version 2.4.x gcc (GCC) 3.4.6 (Gentoo Hardened 3.4.6-r2, ssp-3.4.6-1.0, pie-8.7.10) glibc 2.5
Here is debug log from resolver using mio select:
Fri Jan 25 17:21:54 2008 [notice] starting up
Fri Jan 25 17:21:54 2008 [info] process id is 18452, written to /var/run/jabber/resolver.pid
sx (ssl.c:642) initialising ssl plugin
sx (ssl.c:701) Setting verify mode to 00
sx (ssl.c:705) ssl context initialised; certificate and key loaded from (...)
sx (env.c:75) plugin initialised (index 0)
Fri Jan 25 17:21:54 2008 [notice] attempting connection to router at 127.0.0.1, port=5347
mio.c#378: mio connecting to 127.0.0.1, port=5347
mio.c#403: connect returned -1 and Operation now in progress
mio.c#422: connect processing non-blocking mode
sx (sx.c:53) allocated new sx for 7
sx (client.c:122) doing client init for sx 7
sx (client.c:138) stream request: ns (null) to (null) from (null) version 1.0
sx (client.c:168) prepared stream header: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
sx (client.c:175) tag 7 event 1 data 0x0
Fri Jan 25 17:21:54 2008 resolver.c:138 want write
mio.c#212: mio running for 5
mio.c#228: mio working: 1
mio.c#212: mio running for 5
mio.c#228: mio working: 1
mio.c#212: mio running for 5
(infinite loop until terminated...)
