This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: xmlrpc server hangs
Type: behavior Stage:
Components: XML Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Abhishek.Singh, amaury.forgeotdarc
Priority: normal Keywords:

Created on 2012-06-07 00:01 by Abhishek.Singh, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg162432 - (view) Author: Abhishek Singh (Abhishek.Singh) Date: 2012-06-07 00:01
Hi Terry,

I am running into a xmlrpc server issue where it just hangs.

  9.914048    127.0.0.1 -> 127.0.0.1    TCP 52327 > 8012 [SYN] Seq=0 Win=32792 Len=0 MSS=16396 TSV=3131436173 TSER=0 WS=6

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 3c 27 64 40 00 40 06 15 56 7f 00 00 01 7f 00   .<'d@.@..V......
0020  00 01 cc 67 1f 4c ee eb cb e9 00 00 00 00 a0 02   ...g.L..........
0030  80 18 41 d1 00 00 02 04 40 0c 04 02 08 0a ba a5   ..A.....@.......
0040  ec 8d 00 00 00 00 01 03 03 06                     ..........

  9.914060    127.0.0.1 -> 127.0.0.1    TCP 8012 > 52327 [SYN, ACK] Seq=0 Ack=1 Win=32768 Len=0 MSS=16396 TSV=3131436173 TSER=3131436173 WS=6

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 3c 00 00 40 00 40 06 3c ba 7f 00 00 01 7f 00   .<..@.@.<.......
0020  00 01 1f 4c cc 67 0e c1 e9 95 ee eb cb ea a0 12   ...L.g..........
0030  80 00 a2 4d 00 00 02 04 40 0c 04 02 08 0a ba a5   ...M....@.......
0040  ec 8d ba a5 ec 8d 01 03 03 06                     ..........

  9.914070    127.0.0.1 -> 127.0.0.1    TCP 52327 > 8012 [ACK] Seq=1 Ack=1 Win=32832 Len=0 TSV=3131436173 TSER=3131436173

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 34 27 65 40 00 40 06 15 5d 7f 00 00 01 7f 00   .4'e@.@..]......
0020  00 01 cc 67 1f 4c ee eb cb ea 0e c1 e9 96 80 10   ...g.L..........
0030  02 01 89 70 00 00 01 01 08 0a ba a5 ec 8d ba a5   ...p............
0040  ec 8d                                             ..

  9.914123    127.0.0.1 -> 127.0.0.1    TCP 52327 > 8012 [PSH, ACK] Seq=1 Ack=1 Win=32832 Len=141 TSV=3131436173 TSER=3131436173

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 c1 27 66 40 00 40 06 14 cf 7f 00 00 01 7f 00   ..'f@.@.........
0020  00 01 cc 67 1f 4c ee eb cb ea 0e c1 e9 96 80 18   ...g.L..........
0030  02 01 fe b5 00 00 01 01 08 0a ba a5 ec 8d ba a5   ................
0040  ec 8d 50 4f 53 54 20 2f 20 48 54 54 50 2f 31 2e   ..POST / HTTP/1.
0050  30 0d 0a 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f   0..Host: localho
0060  73 74 3a 38 30 31 32 0d 0a 55 73 65 72 2d 41 67   st:8012..User-Ag
0070  65 6e 74 3a 20 78 6d 6c 72 70 63 6c 69 62 2e 70   ent: xmlrpclib.p
0080  79 2f 31 2e 30 2e 31 20 28 62 79 20 77 77 77 2e   y/1.0.1 (by www.
0090  70 79 74 68 6f 6e 77 61 72 65 2e 63 6f 6d 29 0d   pythonware.com).
00a0  0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74   .Content-Type: t
00b0  65 78 74 2f 78 6d 6c 0d 0a 43 6f 6e 74 65 6e 74   ext/xml..Content
00c0  2d 4c 65 6e 67 74 68 3a 20 39 38 0d 0a 0d 0a      -Length: 98....

  9.914130    127.0.0.1 -> 127.0.0.1    TCP 8012 > 52327 [ACK] Seq=1 Ack=142 Win=33856 Len=0 TSV=3131436173 TSER=3131436173

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 34 05 1b 40 00 40 06 37 a7 7f 00 00 01 7f 00   .4..@.@.7.......
0020  00 01 1f 4c cc 67 0e c1 e9 96 ee eb cc 77 80 10   ...L.g.......w..
0030  02 11 88 d3 00 00 01 01 08 0a ba a5 ec 8d ba a5   ................
0040  ec 8d                                             ..

  9.914171    127.0.0.1 -> 127.0.0.1    TCP 52327 > 8012 [PSH, ACK] Seq=142 Ack=1 Win=32832 Len=98 TSV=3131436173 TSER=3131436173

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 96 27 67 40 00 40 06 14 f9 7f 00 00 01 7f 00   ..'g@.@.........
0020  00 01 cc 67 1f 4c ee eb cc 77 0e c1 e9 96 80 18   ...g.L...w......
0030  02 01 fe 8a 00 00 01 01 08 0a ba a5 ec 8d ba a5   ................
0040  ec 8d 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d   ..<?xml version=
0050  27 31 2e 30 27 3f 3e 0a 3c 6d 65 74 68 6f 64 43   '1.0'?>.<methodC
0060  61 6c 6c 3e 0a 3c 6d 65 74 68 6f 64 4e 61 6d 65   all>.<methodName
0070  3e 69 6e 66 6f 3c 2f 6d 65 74 68 6f 64 4e 61 6d   >info</methodNam
0080  65 3e 0a 3c 70 61 72 61 6d 73 3e 0a 3c 2f 70 61   e>.<params>.</pa
0090  72 61 6d 73 3e 0a 3c 2f 6d 65 74 68 6f 64 43 61   rams>.</methodCa
00a0  6c 6c 3e 0a                                       ll>.

  9.914177    127.0.0.1 -> 127.0.0.1    TCP 8012 > 52327 [ACK] Seq=1 Ack=240 Win=33856 Len=0 TSV=3131436173 TSER=3131436173

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 34 05 1c 40 00 40 06 37 a6 7f 00 00 01 7f 00   .4..@.@.7.......
0020  00 01 1f 4c cc 67 0e c1 e9 96 ee eb cc d9 80 10   ...L.g..........
0030  02 11 88 71 00 00 01 01 08 0a ba a5 ec 8d ba a5   ...q............
0040  ec 8d                                             ..


<Client sent a request, and server just hangs here>

When I look at the server, it is stuck here:

(gdb) bt
#0  0x00310424 in __kernel_vsyscall ()
#1  0x003df758 in recv () from /lib/libpthread.so.0
#2  0x00dbbca5 in sock_recv_guts (s=0xb7489890, cbuf=<value optimized out>, len=8192, flags=0) at /home/shankar/python/Python-2.7.3/Modules/socketmodule.c:2361
#3  0x00dbbee6 in sock_recv (s=0xb7489890, args=0xb746780c) at /home/shankar/python/Python-2.7.3/Modules/socketmodule.c:2442
#4  0x080e1071 in call_function (f=0x8db3a3c, throwflag=0) at Python/ceval.c:4021
#5  PyEval_EvalFrameEx (f=0x8db3a3c, throwflag=0) at Python/ceval.c:2666
#6  0x080e2c1b in PyEval_EvalCodeEx (co=0xb77211d0, globals=0xb7706604, locals=0x0, args=0x8db3a14, argcount=2, kws=0x8db3a1c, kwcount=0, defs=0xb74a79b8, defcount=1, closure=0x0) at Python/ceval.c:3253
#7  0x080e12e9 in fast_function (f=0x8db38cc, throwflag=0) at Python/ceval.c:4117
#8  call_function (f=0x8db38cc, throwflag=0) at Python/ceval.c:4042
#9  PyEval_EvalFrameEx (f=0x8db38cc, throwflag=0) at Python/ceval.c:2666
#10 0x080e1b55 in fast_function (f=0x8db3774, throwflag=0) at Python/ceval.c:4107
#11 call_function (f=0x8db3774, throwflag=0) at Python/ceval.c:4042
#12 PyEval_EvalFrameEx (f=0x8db3774, throwflag=0) at Python/ceval.c:2666
#13 0x080e1b55 in fast_function (f=0x8db2f3c, throwflag=0) at Python/ceval.c:4107
#14 call_function (f=0x8db2f3c, throwflag=0) at Python/ceval.c:4042
#15 PyEval_EvalFrameEx (f=0x8db2f3c, throwflag=0) at Python/ceval.c:2666
#16 0x080e2c1b in PyEval_EvalCodeEx (co=0xb747c458, globals=0xb7477714, locals=0x0, args=0xb7469538, argcount=4, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#17 0x0813ee2a in function_call (func=0xb748b8b4, arg=0xb746952c, kw=0x0) at Objects/funcobject.c:526
#18 0x0805d90a in PyObject_Call (func=0xb748b8b4, arg=0xb746952c, kw=0x0) at Objects/abstract.c:2529
#19 0x080657f1 in instancemethod_call (func=0xb748b8b4, arg=<value optimized out>, kw=0x0) at Objects/classobject.c:2578
#20 0x0805d90a in PyObject_Call (func=0xb7470054, arg=0xb74896bc, kw=0x0) at Objects/abstract.c:2529
#21 0x080db852 in PyEval_CallObjectWithKeywords (func=0xb7470054, arg=0xb74896bc, kw=0x0) at Python/ceval.c:3890
#22 0x08067900 in PyInstance_New (klass=0xb747ff8c, arg=0xb74896bc, kw=0x0) at Objects/classobject.c:571
#23 0x0805d90a in PyObject_Call (func=0xb747ff8c, arg=0xb74896bc, kw=0x0) at Objects/abstract.c:2529
#24 0x080e04ba in do_call (f=0x8db2dd4, throwflag=0) at Python/ceval.c:4239
#25 call_function (f=0x8db2dd4, throwflag=0) at Python/ceval.c:4044
#26 PyEval_EvalFrameEx (f=0x8db2dd4, throwflag=0) at Python/ceval.c:2666
#27 0x080e1b55 in fast_function (f=0x8db2c6c, throwflag=0) at Python/ceval.c:4107
#28 call_function (f=0x8db2c6c, throwflag=0) at Python/ceval.c:4042
#29 PyEval_EvalFrameEx (f=0x8db2c6c, throwflag=0) at Python/ceval.c:2666
#30 0x080e1b55 in fast_function (f=0x8db26dc, throwflag=0) at Python/ceval.c:4107
#31 call_function (f=0x8db26dc, throwflag=0) at Python/ceval.c:4042
#32 PyEval_EvalFrameEx (f=0x8db26dc, throwflag=0) at Python/ceval.c:2666
#33 0x080e1b55 in fast_function (f=0x8db251c, throwflag=0) at Python/ceval.c:4107
#34 call_function (f=0x8db251c, throwflag=0) at Python/ceval.c:4042
#35 PyEval_EvalFrameEx (f=0x8db251c, throwflag=0) at Python/ceval.c:2666
#36 0x080e1b55 in fast_function (f=0x8d3855c, throwflag=0) at Python/ceval.c:4107
#37 call_function (f=0x8d3855c, throwflag=0) at Python/ceval.c:4042
#38 PyEval_EvalFrameEx (f=0x8d3855c, throwflag=0) at Python/ceval.c:2666
#39 0x080e1b55 in fast_function (f=0x8757eac, throwflag=0) at Python/ceval.c:4107
#40 call_function (f=0x8757eac, throwflag=0) at Python/ceval.c:4042
#41 PyEval_EvalFrameEx (f=0x8757eac, throwflag=0) at Python/ceval.c:2666
#42 0x080e2c1b in PyEval_EvalCodeEx (co=0xb76f99b0, globals=0xb779935c, locals=0x0, args=0x870ec84, argcount=0, kws=0x870ec84, kwcount=0, defs=0xb7467778, defcount=1, closure=0x0) at Python/ceval.c:3253
#43 0x080e12e9 in fast_function (f=0x870eb44, throwflag=0) at Python/ceval.c:4117
#44 call_function (f=0x870eb44, throwflag=0) at Python/ceval.c:4042
#45 PyEval_EvalFrameEx (f=0x870eb44, throwflag=0) at Python/ceval.c:2666
#46 0x080e2c1b in PyEval_EvalCodeEx (co=0xb76f99f8, globals=0xb779935c, locals=0xb779935c, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#47 0x080e2d47 in PyEval_EvalCode (co=0xb76f99f8, globals=0xb779935c, locals=0xb779935c) at Python/ceval.c:667
#48 0x08100276 in run_mod (fp=0x870eb38, filename=0xbfb0388b "/home/shankar/apsim-6.2/1.1.5/apsim.py", start=257, globals=0xb779935c, locals=0xb779935c, closeit=1, flags=0xbfb0361c) at Python/pythonrun.c:1353
#49 PyRun_FileExFlags (fp=0x870eb38, filename=0xbfb0388b "/home/shankar/apsim-6.2/1.1.5/apsim.py", start=257, globals=0xb779935c, locals=0xb779935c, closeit=1, flags=0xbfb0361c) at Python/pythonrun.c:1339
#50 0x081004d2 in PyRun_SimpleFileExFlags (fp=0x870eb38, filename=0xbfb0388b "/home/shankar/apsim-6.2/1.1.5/apsim.py", closeit=1, flags=0xbfb0361c) at Python/pythonrun.c:943
#51 0x080592f1 in Py_Main (argc=8, argv=0xbfb03704) at Modules/main.c:639
#52 0x0805839b in main (argc=8, argv=0xbfb03704) at ./Modules/python.c:23
(gdb) q


Here is good/complete one (another process, serving 8011)

  9.911198    127.0.0.1 -> 127.0.0.1    TCP 8011 > 55371 [SYN, ACK] Seq=0 Ack=1 Win=32768 Len=0 MSS=16396 TSV=3131436170 TSER=3131436170 WS=6

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 3c 00 00 40 00 40 06 3c ba 7f 00 00 01 7f 00   .<..@.@.<.......
0020  00 01 1f 4b d8 4b 01 ce ef bc 30 38 0b 97 a0 12   ...K.K....08....
0030  80 00 1c 44 00 00 02 04 40 0c 04 02 08 0a ba a5   ...D....@.......
0040  ec 8a ba a5 ec 8a 01 03 03 06                     ..........

  9.911208    127.0.0.1 -> 127.0.0.1    TCP 55371 > 8011 [ACK] Seq=1 Ack=1 Win=32832 Len=0 TSV=3131436170 TSER=3131436170

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 34 e7 1d 40 00 40 06 55 a4 7f 00 00 01 7f 00   .4..@.@.U.......
0020  00 01 d8 4b 1f 4b 30 38 0b 97 01 ce ef bd 80 10   ...K.K08........
0030  02 01 03 67 00 00 01 01 08 0a ba a5 ec 8a ba a5   ...g............
0040  ec 8a                                             ..

  9.911260    127.0.0.1 -> 127.0.0.1    TCP 55371 > 8011 [PSH, ACK] Seq=1 Ack=1 Win=32832 Len=141 TSV=3131436170 TSER=3131436170

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 c1 e7 1e 40 00 40 06 55 16 7f 00 00 01 7f 00   ....@.@.U.......
0020  00 01 d8 4b 1f 4b 30 38 0b 97 01 ce ef bd 80 18   ...K.K08........
0030  02 01 fe b5 00 00 01 01 08 0a ba a5 ec 8a ba a5   ................
0040  ec 8a 50 4f 53 54 20 2f 20 48 54 54 50 2f 31 2e   ..POST / HTTP/1.
0050  30 0d 0a 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f   0..Host: localho
0060  73 74 3a 38 30 31 31 0d 0a 55 73 65 72 2d 41 67   st:8011..User-Ag
0070  65 6e 74 3a 20 78 6d 6c 72 70 63 6c 69 62 2e 70   ent: xmlrpclib.p
0080  79 2f 31 2e 30 2e 31 20 28 62 79 20 77 77 77 2e   y/1.0.1 (by www.
0090  70 79 74 68 6f 6e 77 61 72 65 2e 63 6f 6d 29 0d   pythonware.com).
00a0  0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74   .Content-Type: t
00b0  65 78 74 2f 78 6d 6c 0d 0a 43 6f 6e 74 65 6e 74   ext/xml..Content
00c0  2d 4c 65 6e 67 74 68 3a 20 39 38 0d 0a 0d 0a      -Length: 98....

  9.911267    127.0.0.1 -> 127.0.0.1    TCP 8011 > 55371 [ACK] Seq=1 Ack=142 Win=33856 Len=0 TSV=3131436171 TSER=3131436170

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 34 03 37 40 00 40 06 39 8b 7f 00 00 01 7f 00   .4.7@.@.9.......
0020  00 01 1f 4b d8 4b 01 ce ef bd 30 38 0c 24 80 10   ...K.K....08.$..
0030  02 11 02 c9 00 00 01 01 08 0a ba a5 ec 8b ba a5   ................
0040  ec 8a                                             ..

  9.911307    127.0.0.1 -> 127.0.0.1    TCP 55371 > 8011 [PSH, ACK] Seq=142 Ack=1 Win=32832 Len=98 TSV=3131436171 TSER=3131436171

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 96 e7 1f 40 00 40 06 55 40 7f 00 00 01 7f 00   ....@.@.U@......
0020  00 01 d8 4b 1f 4b 30 38 0c 24 01 ce ef bd 80 18   ...K.K08.$......
0030  02 01 fe 8a 00 00 01 01 08 0a ba a5 ec 8b ba a5   ................
0040  ec 8b 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d   ..<?xml version=
0050  27 31 2e 30 27 3f 3e 0a 3c 6d 65 74 68 6f 64 43   '1.0'?>.<methodC
0060  61 6c 6c 3e 0a 3c 6d 65 74 68 6f 64 4e 61 6d 65   all>.<methodName
0070  3e 69 6e 66 6f 3c 2f 6d 65 74 68 6f 64 4e 61 6d   >info</methodNam
0080  65 3e 0a 3c 70 61 72 61 6d 73 3e 0a 3c 2f 70 61   e>.<params>.</pa
0090  72 61 6d 73 3e 0a 3c 2f 6d 65 74 68 6f 64 43 61   rams>.</methodCa
00a0  6c 6c 3e 0a                                       ll>.

  9.911313    127.0.0.1 -> 127.0.0.1    TCP 8011 > 55371 [ACK] Seq=1 Ack=240 Win=33856 Len=0 TSV=3131436171 TSER=3131436171

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 34 03 38 40 00 40 06 39 8a 7f 00 00 01 7f 00   .4.8@.@.9.......
0020  00 01 1f 4b d8 4b 01 ce ef bd 30 38 0c 86 80 10   ...K.K....08....
0030  02 11 02 66 00 00 01 01 08 0a ba a5 ec 8b ba a5   ...f............
0040  ec 8b                                             ..

  9.911990    127.0.0.1 -> 127.0.0.1    TCP 8011 > 55371 [PSH, ACK] Seq=1 Ack=240 Win=33856 Len=508 TSV=3131436171 TSER=3131436171

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  02 30 03 39 40 00 40 06 37 8d 7f 00 00 01 7f 00   .0.9@.@.7.......
0020  00 01 1f 4b d8 4b 01 ce ef bd 30 38 0c 86 80 18   ...K.K....08....
0030  02 11 00 25 00 00 01 01 08 0a ba a5 ec 8b ba a5   ...%............
0040  ec 8b 48 54 54 50 2f 31 2e 30 20 32 30 30 20 4f   ..HTTP/1.0 200 O
0050  4b 0d 0a 53 65 72 76 65 72 3a 20 42 61 73 65 48   K..Server: BaseH
0060  54 54 50 2f 30 2e 33 20 50 79 74 68 6f 6e 2f 32   TTP/0.3 Python/2
0070  2e 37 2e 33 0d 0a 44 61 74 65 3a 20 57 65 64 2c   .7.3..Date: Wed,
0080  20 30 36 20 4a 75 6e 20 32 30 31 32 20 32 33 3a    06 Jun 2012 23:
0090  33 34 3a 32 31 20 47 4d 54 0d 0a 43 6f 6e 74 65   34:21 GMT..Conte
00a0  6e 74 2d 74 79 70 65 3a 20 74 65 78 74 2f 78 6d   nt-type: text/xm
00b0  6c 0d 0a 43 6f 6e 74 65 6e 74 2d 6c 65 6e 67 74   l..Content-lengt
00c0  68 3a 20 33 37 32 0d 0a 0d 0a 3c 3f 78 6d 6c 20   h: 372....<?xml
00d0  76 65 72 73 69 6f 6e 3d 27 31 2e 30 27 3f 3e 0a   version='1.0'?>.
00e0  3c 6d 65 74 68 6f 64 52 65 73 70 6f 6e 73 65 3e   <methodResponse>
00f0  0a 3c 70 61 72 61 6d 73 3e 0a 3c 70 61 72 61 6d   .<params>.<param
0100  3e 0a 3c 76 61 6c 75 65 3e 3c 73 74 72 69 6e 67   >.<value><string
0110  3e 70 6f 72 74 20 3d 20 38 30 31 31 0a 73 74 61   >port = 8011.sta
0120  72 74 5f 74 69 6d 65 20 3d 20 32 30 31 32 2d 30   rt_time = 2012-0
0130  36 2d 30 35 20 32 33 3a 32 37 3a 34 39 0a 75 70   6-05 23:27:49.up
0140  74 69 6d 65 20 3d 20 36 31 35 39 32 0a 6e 75 6d   time = 61592.num
0150  61 70 73 20 3d 20 35 0a 6e 75 6d 73 74 73 20 3d   aps = 5.numsts =
0160  20 39 30 0a 66 69 72 73 74 5f 61 70 5f 69 70 20    90.first_ap_ip
0170  3d 20 31 37 32 2e 33 32 2e 31 2e 35 38 0a 66 69   = 172.32.1.58.fi
0180  72 73 74 5f 73 74 5f 69 70 20 3d 20 30 2e 30 2e   rst_st_ip = 0.0.
0190  30 2e 30 0a 66 69 72 73 74 5f 73 74 5f 6d 61 63   0.0.first_st_mac
01a0  20 3d 20 30 30 3a 66 66 3a 30 30 3a 30 30 3a 30    = 00:ff:00:00:0
01b0  33 3a 64 65 0a 65 74 68 30 5f 6d 61 63 20 3d 20   3:de.eth0_mac =
01c0  30 30 3a 30 32 3a 30 34 3a 30 30 3a 30 30 3a 33   00:02:04:00:00:3
01d0  37 0a 66 69 72 73 74 5f 61 70 20 3d 20 73 69 6d   7.first_ap = sim
01e0  5f 61 70 5f 30 35 35 5f 30 30 30 0a 66 69 72 73   _ap_055_000.firs
01f0  74 5f 73 74 20 3d 20 73 69 6d 5f 73 74 61 5f 39   t_st = sim_sta_9
0200  39 30 5f 30 30 30 0a 3c 2f 73 74 72 69 6e 67 3e   90_000.</string>
0210  3c 2f 76 61 6c 75 65 3e 0a 3c 2f 70 61 72 61 6d   </value>.</param
0220  3e 0a 3c 2f 70 61 72 61 6d 73 3e 0a 3c 2f 6d 65   >.</params>.</me
0230  74 68 6f 64 52 65 73 70 6f 6e 73 65 3e 0a         thodResponse>.

  9.912012    127.0.0.1 -> 127.0.0.1    TCP 55371 > 8011 [ACK] Seq=240 Ack=509 Win=33920 Len=0 TSV=3131436171 TSER=3131436171

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 34 e7 20 40 00 40 06 55 a1 7f 00 00 01 7f 00   .4. @.@.U.......
0020  00 01 d8 4b 1f 4b 30 38 0c 86 01 ce f1 b9 80 10   ...K.K08........
0030  02 12 00 69 00 00 01 01 08 0a ba a5 ec 8b ba a5   ...i............
0040  ec 8b                                             ..

  9.912038    127.0.0.1 -> 127.0.0.1    TCP 8011 > 55371 [FIN, ACK] Seq=509 Ack=240 Win=33856 Len=0 TSV=3131436171 TSER=3131436171

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 34 03 3a 40 00 40 06 39 88 7f 00 00 01 7f 00   .4.:@.@.9.......
0020  00 01 1f 4b d8 4b 01 ce f1 b9 30 38 0c 86 80 11   ...K.K....08....
0030  02 11 00 69 00 00 01 01 08 0a ba a5 ec 8b ba a5   ...i............
0040  ec 8b                                             ..

  9.912779    127.0.0.1 -> 127.0.0.1    TCP 55371 > 8011 [FIN, ACK] Seq=240 Ack=510 Win=33920 Len=0 TSV=3131436172 TSER=3131436171

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 34 e7 21 40 00 40 06 55 a0 7f 00 00 01 7f 00   .4.!@.@.U.......
0020  00 01 d8 4b 1f 4b 30 38 0c 86 01 ce f1 ba 80 11   ...K.K08........
0030  02 12 00 66 00 00 01 01 08 0a ba a5 ec 8c ba a5   ...f............
0040  ec 8b                                             ..

  9.912790    127.0.0.1 -> 127.0.0.1    TCP 8011 > 55371 [ACK] Seq=510 Ack=241 Win=33856 Len=0 TSV=3131436172 TSER=3131436172

0000  00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00   ..............E.
0010  00 34 03 3b 40 00 40 06 39 87 7f 00 00 01 7f 00   .4.;@.@.9.......
0020  00 01 1f 4b d8 4b 01 ce f1 ba 30 38 0c 87 80 10   ...K.K....08....
0030  02 11 00 66 00 00 01 01 08 0a ba a5 ec 8c ba a5   ...f............
0040  ec 8c                                             ..

A good server is always at select:

(gdb) bt
#0  0x00bb8424 in __kernel_vsyscall ()
#1  0x0030e921 in select () from /lib/libc.so.6
#2  0x0016baf8 in select_select (self=0x0, args=0xb754052c) at /home/shankar/python/Python-2.7.3/Modules/selectmodule.c:271
#3  0x080e1071 in call_function (f=0xa35fcec, throwflag=0) at Python/ceval.c:4021
#4  PyEval_EvalFrameEx (f=0xa35fcec, throwflag=0) at Python/ceval.c:2666
#5  0x080e1b55 in fast_function (f=0xa2bf7bc, throwflag=0) at Python/ceval.c:4107
#6  call_function (f=0xa2bf7bc, throwflag=0) at Python/ceval.c:4042
#7  PyEval_EvalFrameEx (f=0xa2bf7bc, throwflag=0) at Python/ceval.c:2666
#8  0x080e1b55 in fast_function (f=0x9cd5eac, throwflag=0) at Python/ceval.c:4107
#9  call_function (f=0x9cd5eac, throwflag=0) at Python/ceval.c:4042
#10 PyEval_EvalFrameEx (f=0x9cd5eac, throwflag=0) at Python/ceval.c:2666
#11 0x080e2c1b in PyEval_EvalCodeEx (co=0xb77d09b0, globals=0xb787035c, locals=0x0, args=0x9c8cc84, argcount=0, kws=0x9c8cc84, kwcount=0, defs=0xb753e778, defcount=1, closure=0x0) at Python/ceval.c:3253
#12 0x080e12e9 in fast_function (f=0x9c8cb44, throwflag=0) at Python/ceval.c:4117
#13 call_function (f=0x9c8cb44, throwflag=0) at Python/ceval.c:4042
#14 PyEval_EvalFrameEx (f=0x9c8cb44, throwflag=0) at Python/ceval.c:2666
#15 0x080e2c1b in PyEval_EvalCodeEx (co=0xb77d09f8, globals=0xb787035c, locals=0xb787035c, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#16 0x080e2d47 in PyEval_EvalCode (co=0xb77d09f8, globals=0xb787035c, locals=0xb787035c) at Python/ceval.c:667
#17 0x08100276 in run_mod (fp=0x9c8cb38, filename=0xbfee888b "/home/shankar/apsim-6.2/1.1.5/apsim.py", start=257, globals=0xb787035c, locals=0xb787035c, closeit=1, flags=0xbfee6b2c) at Python/pythonrun.c:1353
#18 PyRun_FileExFlags (fp=0x9c8cb38, filename=0xbfee888b "/home/shankar/apsim-6.2/1.1.5/apsim.py", start=257, globals=0xb787035c, locals=0xb787035c, closeit=1, flags=0xbfee6b2c) at Python/pythonrun.c:1339
#19 0x081004d2 in PyRun_SimpleFileExFlags (fp=0x9c8cb38, filename=0xbfee888b "/home/shankar/apsim-6.2/1.1.5/apsim.py", closeit=1, flags=0xbfee6b2c) at Python/pythonrun.c:943
#20 0x080592f1 in Py_Main (argc=8, argv=0xbfee6c14) at Modules/main.c:639
#21 0x0805839b in main (argc=8, argv=0xbfee6c14) at ./Modules/python.c:23
msg162484 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2012-06-07 18:09
What kind of xmlrpc server do you run?  And how exactly?
Try to set a timeout to all sockets:
   socket.setdefaulttimeout(10)
Does this change something? Which exception (and traceback) do you get?
msg162560 - (view) Author: Abhishek Singh (Abhishek.Singh) Date: 2012-06-09 13:21
I have a pretty complicated setup. 100's of threads, xmlrpc being in the main thread and providing show routines for my program. I have 10's of such processes doing some heavy duty simulation/crunching.

The threads and program is in C. I use swig routines to throw in my show framework. 

There is no traceback - it is just stuck and unresponsive. If I quit my client, the socket gets closed and it recovers. But it is annoying to do so, and it can get stuck again :(.

I will try your timeout suggestion, but having a infinite timeout might help given my system is loaded with lots of competing (for CPU) threads. I am running the Simple xmlrpc server.
msg162693 - (view) Author: Abhishek Singh (Abhishek.Singh) Date: 2012-06-12 20:10
I found my problem.

I was also using pipes to implement my show output (between python and C). The pipe was getting full, and xmlrpc server was locking up because of that.

The gdb traceback was confusing though (will re-open if I see this again, and if it is indeed a different issue).
History
Date User Action Args
2022-04-11 14:57:31adminsetgithub: 59226
2012-06-12 20:10:51Abhishek.Singhsetstatus: open -> closed
resolution: not a bug
messages: + msg162693
2012-06-09 13:21:47Abhishek.Singhsetmessages: + msg162560
2012-06-07 18:09:14amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg162484
2012-06-07 00:01:11Abhishek.Singhcreate