[issue15021] xmlrpc server hangs

2012-06-12 Thread Abhishek Singh

Abhishek Singh abhishekrsi...@gmail.com added the comment:

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).

--
resolution:  - invalid
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15021
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15021] xmlrpc server hangs

2012-06-09 Thread Abhishek Singh

Abhishek Singh abhishekrsi...@gmail.com added the comment:

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15021
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15021] xmlrpc server hangs

2012-06-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

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?

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15021
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15021] xmlrpc server hangs

2012-06-06 Thread Abhishek Singh

New submission from Abhishek Singh abhishekrsi...@gmail.com:

Hi Terry,

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

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

  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.914060127.0.0.1 - 127.0.0.1TCP 8012  52327 [SYN, ACK] Seq=0 Ack=1 
Win=32768 Len=0 MSS=16396 TSV=3131436173 TSER=3131436173 WS=6

  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.914070127.0.0.1 - 127.0.0.1TCP 52327  8012 [ACK] Seq=1 Ack=1 
Win=32832 Len=0 TSV=3131436173 TSER=3131436173

  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.914123127.0.0.1 - 127.0.0.1TCP 52327  8012 [PSH, ACK] Seq=1 Ack=1 
Win=32832 Len=141 TSV=3131436173 TSER=3131436173

  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.914130127.0.0.1 - 127.0.0.1TCP 8012  52327 [ACK] Seq=1 Ack=142 
Win=33856 Len=0 TSV=3131436173 TSER=3131436173

  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.914171127.0.0.1 - 127.0.0.1TCP 52327  8012 [PSH, ACK] Seq=142 
Ack=1 Win=32832 Len=98 TSV=3131436173 TSER=3131436173

  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.914177127.0.0.1 - 127.0.0.1TCP 8012  52327 [ACK] Seq=1 Ack=240 
Win=33856 Len=0 TSV=3131436173 TSER=3131436173

  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