POE process getting too busy

Markus Jansen <[email protected]> Wed, 15 Aug 2012 19:37:24 +0200
Newsgroups gmane.comp.lang.perl.poe
Message-ID <4682B762ECD8E9428E39B8ED2EEDF3EA48A24D996D@ESESSCMS0365.eemea.ericsson.se>
--_004_4682B762ECD8E9428E39B8ED2EEDF3EA48A24D996DESESSCMS0365e_
Content-Type: multipart/alternative;
	boundary="_000_4682B762ECD8E9428E39B8ED2EEDF3EA48A24D996DESESSCMS0365e_"

--_000_4682B762ECD8E9428E39B8ED2EEDF3EA48A24D996DESESSCMS0365e_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi POE experts,

I have discovered an annoying phenomenon, where after some while (days, wee=
ks) a process (which is part of a multi-server POE network)
all of a sudden goes berzerk by using all resources of its CPU.
The good news is that the process itself remains fully functional, but from=
 a system usage/load perspective, the situation is quite intolerable.

The problem shows up with POE 1.354 running with Perl 5.10 under Solaris 10=
.
Typical truss output (unless real work is done) is an endless loop of the f=
ollowing pattern (repeated once for clarity):

pollsys(0xFFBFF260, 4, 0xFFBFF3C8, 0x00000000)  =3D 1
time()                                          =3D 1345049722
read(10, 0x028BDE2B, 5)                         Err#11 EAGAIN
time()                                          =3D 1345049722
read(10, 0x028BDE2B, 5)                         Err#11 EAGAIN
pollsys(0xFFBFF260, 4, 0xFFBFF3C8, 0x00000000)  =3D 1
time()                                          =3D 1345049722
read(10, 0x028BDE2B, 5)                         Err#11 EAGAIN
time()                                          =3D 1345049722
read(10, 0x028BDE2B, 5)                         Err#11 EAGAIN

The problem does *not* occur on an earlier code version using POE 1.312, bu=
t showed up on POE versions earlier than 1.354.

No special POE loop is explicitly used.
The POE 1.312 version working properly does not have access to any XS POE m=
odules (since compiled via PAR).

There are signs that the process malbehaviour might be triggered by another=
 process with a connection not shut down properly or the like.
Killing the other process then results in the wanted behaviour again:

pollsys(0xFFBFEC70, 3, 0xFFBFEDD8, 0x00000000) (sleeping...)
<do_something>
pollsys(0xFFBFEC70, 3, 0xFFBFEDD8, 0x00000000) (sleeping...)


Any hints how to get the problem cured, or to further debug the code, are v=
ery appreciated.

Best regards,
        Markus



MARKUS JANSEN Dipl.-Ing.

Ericsson Deutschland GmbH
EDD/IFT/E
Ericsson Allee 1
52134, Herogenrath, Germany
Phone +49 2407 575 5157
Fax +49 2407 575 14761
Mobile +49 172 2742003
[email protected]
www.ericsson.com


http://www.ericsson.com/

Ericsson GmbH. Sitz: D=FCsseldorf. Registergericht: Amtsgericht D=FCsseldor=
f, HRB 33012. Gesch=E4ftsf=FChrer: Stefan Koetz. Aufsichtsratsvorsitzender:=
 Anders Olin

This Communication is Confidential. We only send and receive email on the b=
asis of the terms set out at www.ericsson.com/email_disclaimer<http://www.e=
ricsson.com/email_disclaimer>.




--_000_4682B762ECD8E9428E39B8ED2EEDF3EA48A24D996DESESSCMS0365e_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<meta name=3D"Generator" content=3D"Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left:=
 #800000 2px solid; } --></style>
</head>
<body>
<font face=3D"Arial, sans-serif" size=3D"2">
<div>Hi POE experts,</div>
<div>&nbsp;</div>
<div>I have discovered an annoying phenomenon, where after some while (days=
, weeks) a process (which is part of a multi-server POE network) </div>
<div>all of a sudden goes berzerk by using all resources of its CPU.</div>
<div>The good news is that the process itself remains fully functional, but=
 from a system usage/load perspective, the situation is quite intolerable.<=
/div>
<div>&nbsp;</div>
<div>The problem shows up with POE 1.354 running with Perl 5.10 under Solar=
is 10.</div>
<div>Typical truss output (unless real work is done) is an endless loop of =
the following pattern (repeated once for clarity):</div>
<div>&nbsp;</div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">p=
ollsys(0xFFBFF260, 4, 0xFFBFF3C8, 0x00000000)&nbsp; =3D 1</font></div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">t=
ime()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; =3D 1345049722</font></div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">r=
ead(10, 0x028BDE2B, 5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; Err#11 EAGAIN</font></div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">t=
ime()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; =3D 1345049722</font></div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">r=
ead(10, 0x028BDE2B, 5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; Err#11 EAGAIN</font></div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">p=
ollsys(0xFFBFF260, 4, 0xFFBFF3C8, 0x00000000)&nbsp; =3D 1</font></div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">t=
ime()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; =3D 1345049722</font></div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">r=
ead(10, 0x028BDE2B, 5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; Err#11 EAGAIN</font></div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">t=
ime()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; =3D 1345049722</font></div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">r=
ead(10, 0x028BDE2B, 5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; Err#11 EAGAIN</font></div>
<div><font face=3D"Courier New, monospace">&nbsp;</font></div>
<div>The problem does *not* occur on an earlier code version using POE 1.31=
2, but showed up on POE versions earlier than 1.354.</div>
<div>&nbsp;</div>
<div>No special POE loop is explicitly used.</div>
<div>The POE 1.312 version working properly does not have access to any XS =
POE modules (since compiled via PAR).</div>
<div>&nbsp;</div>
<div>There are signs that the process malbehaviour might be triggered by an=
other process with a connection not shut down properly or the like.</div>
<div>Killing the other process then results in the wanted behaviour again:<=
/div>
<div>&nbsp;</div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">p=
ollsys(0xFFBFEC70, 3, 0xFFBFEDD8, 0x00000000) (sleeping...)</font></div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">&=
lt;do_something&gt;</font></div>
<div style=3D"padding-left: 19pt; "><font face=3D"Courier New, monospace">p=
ollsys(0xFFBFEC70, 3, 0xFFBFEDD8, 0x00000000) (sleeping...)</font></div>
<div><font face=3D"Courier New, monospace">&nbsp;</font></div>
<div><font face=3D"Courier New, monospace">&nbsp;</font></div>
<div>Any hints how to get the problem cured, or to further debug the code, =
are very appreciated.</div>
<div>&nbsp;</div>
<div>Best regards,</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Markus</div>
<div>&nbsp;</div>
<div><img src=3D"cid:f5c2dba8-8b6a-4351-ae73-55140c873bf4"> <font face=3D"A=
rial, sans-serif">
<br>

<br>

</font><font face=3D"Arial, sans-serif" color=3D"#333333"><b>MARKUS JANSEN =
</b></font><font face=3D"Arial, sans-serif" color=3D"#333333">Dipl.-Ing.</f=
ont><font face=3D"Times New Roman, serif" size=3D"3" color=3D"#333333"> </f=
ont></div>
<div><font face=3D"Times New Roman, serif" size=3D"3" color=3D"#333333"><br=
>

<font face=3D"Arial, sans-serif" size=3D"2">Ericsson Deutschland GmbH<br>

EDD/IFT/E<br>

Ericsson Allee 1<br>

52134, Herogenrath, Germany<br>

Phone &#43;49 2407 575 5157<br>

Fax &#43;49 2407 575 14761<br>

Mobile &#43;49 172 2742003<br>

[email protected]<br>

</font><a href=3D"www.ericsson.com"><font face=3D"Arial, sans-serif" size=
=3D"2" color=3D"#0000FF"><u>www.ericsson.com</u></font></a><font face=3D"Ar=
ial, sans-serif" size=3D"2"> </font> </font></div>
<div><font face=3D"Times New Roman, serif" size=3D"3" color=3D"#333333"><br=
>

<br>

<a href=3D"http://www.ericsson.com/"><font color=3D"#0000FF"><u>http://www.=
ericsson.com/</u></font></a><font face=3D"Arial, sans-serif" size=3D"2" col=
or=3D"#000000"> </font><font color=3D"#000000"> </font></font></div>
<div><font face=3D"Times New Roman, serif" size=3D"3"><br>

<font face=3D"Arial, sans-serif" size=3D"1" color=3D"#333333">Ericsson GmbH=
. Sitz: D=FCsseldorf. Registergericht: Amtsgericht D=FCsseldorf, HRB 33012.=
 Gesch=E4ftsf=FChrer: Stefan Koetz. Aufsichtsratsvorsitzender: Anders Olin<=
br>

<br>

This Communication is Confidential. </font><font face=3D"Arial, sans-serif"=
 size=3D"1" color=3D"#333333">We only send and receive email on the basis o=
f the terms set out at </font><a href=3D"http://www.ericsson.com/email_disc=
laimer"><font face=3D"Arial, sans-serif" size=3D"1" color=3D"#333333"><u>ww=
w.ericsson.com/email_disclaimer</u></font></a><font face=3D"Arial, sans-ser=
if" size=3D"1" color=3D"#333333">.</font>
</font></div>
<div><font face=3D"Times New Roman, serif" size=3D"3">&nbsp;</font></div>
<div><font face=3D"Times New Roman, serif" size=3D"3">&nbsp;</font></div>
<div>&nbsp;</div>
</font>
</body>
</html>

--_000_4682B762ECD8E9428E39B8ED2EEDF3EA48A24D996DESESSCMS0365e_--

--_004_4682B762ECD8E9428E39B8ED2EEDF3EA48A24D996DESESSCMS0365e_
Content-Type: image/jpeg; name="Picture (Metafile) 1.jpg"
Content-Description: Picture (Metafile) 1.jpg
Content-Disposition: inline; filename="Picture (Metafile) 1.jpg";
	creation-date="Wed, 15 Aug 2012 17:37:25 GMT";
	modification-date="Wed, 15 Aug 2012 17:37:25 GMT"
Content-ID: <f5c2dba8-8b6a-4351-ae73-55140c873bf4>
Content-Transfer-Encoding: base64

/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a
HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAADAP8DASIA
AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA
AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3
ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm
p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA
AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx
BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK
U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3
uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD0TxiN
uqqRnJQZyf8AOK5V3Lgg7f8AvkD1oor4LHf73V9TCruV7nncfUjpx3NUJziMkdcH+VFFbYfZHnVt
yCVQTJkDhcj/AMeqhIxIZjjJB5xRRXp0Dz6pA38X4/1pkgAOR/nmiivQpPU4p7EYPT/PpS+lFFel
AwAUDt/n0oorppPURHuIcAYwCAOP93/GmqSdnTt2/wB3/GiivYglyo2S0BDyp+nb/d/x/l6ClXnb
74/9l/x/l6Ciit4Axv8ACD3wOf8Avn/E/wCQKrs53Dp09PaiirZrTIGc5Y8ZDgDjscVCpJA6c47f
7v8AjRRSO2CVhAAduR3B/wDQf8T/AJAqtLweAOcHp6//AK6KKDaluRZycnqf/rVFk/kAf5UUVDPS
gkIT0/ClU5BP+elFFZyPRw/QkU/OPr/jUo+6TRRXPPY9jDt3QoPJ6flVhfuZ7kZP/j1FFcsz3MLu
yRWPy9OWIPH1r1X4LKDqmqOSdwgQdTjlj26dqKK5Z7G2af7hU9F+h//Z

--_004_4682B762ECD8E9428E39B8ED2EEDF3EA48A24D996DESESSCMS0365e_--