unbit/uwsgi — pull request #118 by prymitive (2013-01-16 12:00:59+00:00)
Title: carbon - detect stuck workers

as as with cheaper busyness but for carbon graphs

But before You merge this please take a look at this segfault I've got during testing:

cmd line:
```
./uwsgi --master --logdate -L --http :8080 --wsgi-file staticfile.py -p 10 --auto-procname --cheaper-algo busyness --cheaper-busyness-verbose --cheaper-overload 5 --cheaper-busyness-multiplier 2 --carbon 172.16.200.72:2003 --carbon-id carbontest
```
and
```
ab -r -c 8 -n 10000 -t 66 http://localhost:8080/
```

staticfile.py (just added sleep(60) to tests/staticfile.py)
```
import sys
import time
import uwsgi

content_type = 'image/png'
filename = 'logo_uWSGI.png'

try:
filename = sys.argv[1]
except:
pass

try:
content_type = sys.argv[2]
except:
pass

def application(environ, start_response):
time.sleep(60)
start_response('200 OK', [('Content-Type', content_type)])
fd = open(filename,'r')
yield environ['wsgi.file_wrapper'](fd, 32*1024)
```

```
Wed Jan 16 12:35:09 2013 - [busyness] 5s average busyness is at 0%, cheap one of 2 running workers
Wed Jan 16 12:35:09 2013 - SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) on request / (ip 127.0.0.1) !!!
Wed Jan 16 12:35:09 2013 - sendfile(): Broken pipe [core/sendfile.c line 105]
Wed Jan 16 12:35:10 2013 - uWSGI worker 10 cheaped.
Wed Jan 16 12:35:14 2013 - [busyness] 5s average busyness of 1 worker(s) is at 0%
Wed Jan 16 12:35:19 2013 - [busyness] 5s average busyness of 1 worker(s) is at 0%
Wed Jan 16 12:35:24 2013 - [busyness] 5s average busyness of 1 worker(s) is at 0%
Wed Jan 16 12:35:29 2013 - SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) on request / (ip 127.0.0.1) !!!
Wed Jan 16 12:35:29 2013 - sendfile(): Broken pipe [core/sendfile.c line 105]
Wed Jan 16 12:35:29 2013 - [busyness] 5s average busyness of 1 worker(s) is at 100%
Wed Jan 16 12:35:29 2013 - [busyness] decreasing cheaper multiplier to 2
Wed Jan 16 12:35:29 2013 - [busyness] 5s average busyness is at 100%, will spawn 1 new worker(s)
Wed Jan 16 12:35:29 2013 - Respawned uWSGI worker 2 (new pid: 1810)
*** glibc detected *** uWSGI worker 2: realloc(): invalid next size: 0x0000000001672c90 ***
======= Backtrace: =========
/lib/libc.so.6(+0x78bb6)[0x7ff786972bb6]
/lib/libc.so.6(+0x7f396)[0x7ff786979396]
/lib/libc.so.6(realloc+0xf0)[0x7ff7869796b0]
/usr/lib/libpython2.6.so.1.0(PyList_Append+0xa1)[0x7ff786f3dfb1]
/usr/lib/libpython2.6.so.1.0(+0x10fa3a)[0x7ff786fc8a3a]
/usr/lib/libpython2.6.so.1.0(+0x10f16d)[0x7ff786fc816d]
======= Memory map: ========
00400000-004a0000 r-xp 00000000 fd:02 1712724 /home/lukasz.mierzwa/uwsgi/uwsgi
0069f000-006a0000 r--p 0009f000 fd:02 1712724 /home/lukasz.mierzwa/uwsgi/uwsgi
006a0000-006ad000 rw-p 000a0000 fd:02 1712724 /home/lukasz.mierzwa/uwsgi/uwsgi
006ad000-006b2000 rw-p 00000000 00:00 0
015dc000-016a4000 rw-p 00000000 00:00 0 [heap]
7ff780000000-7ff780021000 rw-p 00000000 00:00 0
7ff780021000-7ff784000000 ---p 00000000 00:00 0
7ff7845a9000-7ff7845bf000 r-xp 00000000 fd:02 1439034 /lib/libgcc_s.so.1
7ff7845bf000-7ff7847be000 ---p 00016000 fd:02 1439034 /lib/libgcc_s.so.1
7ff7847be000-7ff7847bf000 r--p 00015000 fd:02 1439034 /lib/libgcc_s.so.1
7ff7847bf000-7ff7847c0000 rw-p 00016000 fd:02 1439034 /lib/libgcc_s.so.1
7ff7847c8000-7ff7847ca000 rw-s 00000000 00:04 38000547 /dev/zero (deleted)
7ff7847ca000-7ff7847cb000 rw-s 00000000 00:04 38000546 /dev/zero (deleted)
7ff7847cb000-7ff7847cc000 rw-s 00000000 00:04 38000545 /dev/zero (deleted)
7ff7847cc000-7ff7847cd000 rw-s 00000000 00:04 38000544 /dev/zero (deleted)
7ff7847cd000-7ff7847dd000 rw-s 00000000 00:04 38000543 /dev/zero (deleted)
7ff7847dd000-7ff7847df000 rw-s 00000000 00:04 38000542 /dev/zero (deleted)
7ff7847df000-7ff7847e0000 rw-s 00000000 00:04 38000541 /dev/zero (deleted)
7ff7847e0000-7ff7847e1000 rw-s 00000000 00:04 38000540 /dev/zero (deleted)
7ff7847e1000-7ff7847e2000 rw-s 00000000 00:04 38000539 /dev/zero (deleted)
7ff7847e2000-7ff7847f2000 rw-s 00000000 00:04 38000538 /dev/zero (deleted)
7ff7847f2000-7ff7847f4000 rw-s 00000000 00:04 38000537 /dev/zero (deleted)
7ff7847f4000-7ff7847f5000 rw-s 00000000 00:04 38000536 /dev/zero (deleted)
7ff7847f5000-7ff7847f6000 rw-s 00000000 00:04 38000535 /dev/zero (deleted)
7ff7847f6000-7ff7847f7000 rw-s 00000000 00:04 38000534 /dev/zero (deleted)
7ff7847f7000-7ff784807000 rw-s 00000000 00:04 38000533 /dev/zero (deleted)
7ff784807000-7ff784809000 rw-s 00000000 00:04 38000532 /dev/zero (deleted)
7ff784809000-7ff78480a000 rw-s 00000000 00:04 38000531 /dev/zero (deleted)
7ff78480a000-7ff78480b000 rw-s 00000000 00:04 38000530 /dev/zero (deleted)
7ff78480b000-7ff78480c000 rw-s 00000000 00:04 38000529 /dev/zero (deleted)
7ff78480c000-7ff78481c000 rw-s 00000000 00:04 38000528 /dev/zero (deleted)
7ff78481c000-7ff78481e000 rw-s 00000000 00:04 38000527 /dev/zero (deleted)
7ff78481e000-7ff78481f000 rw-s 00000000 00:04 38000526 /dev/zero (deleted)
7ff78481f000-7ff784820000 rw-s 00000000 00:04 38000525 /dev/zero (deleted)
7ff784820000-7ff784821000 rw-s 00000000 00:04 38000524 /dev/zero (deleted)
7ff784821000-7ff784831000 rw-s 00000000 00:04 38000523 /dev/zero (deleted)
7ff784831000-7ff784841000 rw-s 00000000 00:04 38000518 /dev/zero (deleted)
7ff784841000-7ff784844000 r-xp 00000000 fd:02 1439330 /lib/libgpg-error.so.0.4.0
7ff784844000-7ff784a43000 ---p 00003000 fd:02 1439330 /lib/libgpg-error.so.0.4.0
7ff784a43000-7ff784a44000 r--p 00002000 fd:02 1439330 /lib/libgpg-error.so.0.4.0
7ff784a44000-7ff784a45000 rw-p 00003000 fd:02 1439330 /lib/libgpg-error.so.0.4.0
7ff784a45000-7ff784aba000 r-xp 00000000 fd:02 1442779 /lib/libgcrypt.so.11.5.2
7ff784aba000-7ff784cb9000 ---p 00075000 fd:02 1442779 /lib/libgcrypt.so.11.5.2
7ff784cb9000-7ff784cba000 r--p 00074000 fd:02 1442779 /lib/libgcrypt.so.11.5.2
7ff784cba000-7ff784cbd000 rw-p 00075000 fd:02 1442779 /lib/libgcrypt.so.11.5.2
7ff784cbd000-7ff784ccd000 r-xp 00000000 fd:02 142182 /usr/lib/libtasn1.so.3.1.7
7ff784ccd000-7ff784ecc000 ---p 00010000 fd:02 142182 /usr/lib/libtasn1.so.3.1.7
7ff784ecc000-7ff784ecd000 r--p 0000f000 fd:02 142182 /usr/lib/libtasn1.so.3.1.7
7ff784ecd000-7ff784ece000 rw-p 00010000 fd:02 142182 /usr/lib/libtasn1.so.3.1.7
7ff784ece000-7ff784ed0000 r-xp 00000000 fd:02 1439332 /lib/libkeyutils-1.2.so
7ff784ed0000-7ff7850cf000 ---p 00002000 fd:02 1439332 /lib/libkeyutils-1.2.so
7ff7850cf000-7ff7850d0000 r--p 00001000 fd:02 1439332 /lib/libkeyutils-1.2.so
7ff7850d0000-7ff7850d1000 rw-p 00002000 fd:02 1439332 /lib/libkeyutils-1.2.so
7ff7850d1000-7ff7850d8000 r-xp 00000000 fd:02 133742 /usr/lib/libkrb5support.so.0.1
7ff7850d8000-7ff7852d7000 ---p 00007000 fd:02 133742 /usr/lib/libkrb5support.so.0.1
7ff7852d7000-7ff7852d8000 r--p 00006000 fd:02 133742 /usr/lib/libkrb5support.so.0.1
7ff7852d8000-7ff7852d9000 rw-p 00007000 fd:02 133742 /usr/lib/libkrb5support.so.0.1
7ff7852d9000-7ff7852dc000 r-xp 00000000 fd:02 1438989 /lib/libcom_err.so.2.1
7ff7852dc000-7ff7854db000 ---p 00003000 fd:02 1438989 /lib/libcom_err.so.2.1
7ff7854db000-7ff7854dc000 r--p 00002000 fd:02 1438989 /lib/libcom_err.so.2.1
7ff7854dc000-7ff7854dd000 rw-p 00003000 fd:02 1438989 /lib/libcom_err.so.2.1
7ff7854dd000-7ff785501000 r-xp 00000000 fd:02 147335 /usr/lib/libk5crypto.so.3.1
7ff785501000-7ff785701000 ---p 00024000 fd:02 147335 /usr/lib/libk5crypto.so.3.1
7ff785701000-7ff785702000 r--p 00024000 fd:02 147335 /usr/lib/libk5crypto.so.3.1
7ff785702000-7ff785703000 rw-p 00025000 fd:02 147335 /usr/lib/libk5crypto.so.3.1
7ff785703000-7ff7857bd000 r-xp 00000000 fd:02 147350 /usr/lib/libkrb5.so.3.3
7ff7857bd000-7ff7859bd000 ---p 000ba000 fd:02 147350 /usr/lib/libkrb5.so.3.3
7ff7859bd000-7ff7859c6000 r--p 000ba000 fd:02 147350 /usr/lib/libkrb5.so.3.3
7ff7859c6000-7ff7859c7000 rw-p 000c3000 fd:02 147350 /usr/lib/libkrb5.so.3.3
7ff7859c7000-7ff7859dd000 r-xp 00000000 fd:02 1439213 /lib/libz.so.1.2.3.3
7ff7859dd000-7ff785bdc000 ---p 00016000 fd:02 1439213 /lib/libz.so.1.2.3.3
7ff785bdc000-7ff785bdd000 r--p 00015000 fd:02 1439213 /lib/libz.so.1.2.3.3
7ff785bdd000-7ff785bde000 rw-p 00016000 fd:02 1439213 /lib/libz.so.1.2.3.3
7ff785bde000-7ff785c79000 r-xp 00000000 fd:02 146060 /usr/lib/libgnutls.so.26.14.12
7ff785c79000-7ff785e79000 ---p 0009b000 fd:02 146060 /usr/lib/libgnutls.so.26.14.12
7ff785e79000-7ff785e7f000 r--p 0009b000 fd:02 146060 /usr/lib/libgnutls.so.26.14.12
7ff785e7f000-7ff785e80000 rw-p 000a1000 fd:02 146060 /usr/lib/libgnutls.so.26.14.12
7ff785e80000-7ff785eb3000 r-xp 00000000 fd:02 147343 /usr/lib/libgssapi_krb5.so.2.2
7ff785eb3000-7ff7860b2000 ---p 00033000 fd:02 147343 /usr/lib/libgssapi_krb5.so.2.2
7ff7860b2000-7ff7860b3000 r--p 00032000 fd:02 147343 /usr/lib/libgssapi_krb5.so.2.2
7ff7860b3000-7ff7860b4000 rw-p 00033000 fd:02 147343 /usr/lib/libgssapi_krb5.so.2.2
7ff7860b4000-7ff7860cd000 r-xp 00000000 fd:02 139264 /usr/lib/libsasl2.so.2.0.23
7ff7860cd000-7ff7862cc000 ---p 00019000 fd:02 139264 /usr/lib/libsasl2.so.2.0.23
7ff7862cc000-7ff7862cd000 r--p 00018000 fd:02 139264 /usr/lib/libsasl2.so.2.0.23
7ff7862cd000-7ff7862ce000 rw-p 00019000 fd:02 139264 /usr/lib/libsasl2.so.2.0.23
7ff7862ce000-7ff7862e4000 r-xp 00000000 fd:02 1439726 /lib/libresolv-2.11.1.so
7ff7862e4000-7ff7864e3000 ---p 00016000 fd:02 1439726 /lib/libresolv-2.11.1.so
7ff7864e3000-7ff7864e4000 r--p 00015000 fd:02 1439726 /lib/libresolv-2.11.1.so
7ff7864e4000-7ff7864e5000 rw-p 00016000 fd:02 1439726 /lib/libresolv-2.11.1.so
7ff7864e5000-7ff7864e7000 rw-p 00000000 00:00 0
7ff7864e7000-7ff7864f4000 r-xp 00000000 fd:02 139882 /usr/lib/liblber-2.4.so.2.5.4
7ff7864f4000-7ff7866f3000 ---p 0000d000 fd:02 139882 /usr/lib/liblber-2.4.so.2.5.4
7ff7866f3000-7ff7866f4000 r--p 0000c000 fd:02 139882 /usr/lib/liblber-2.4.so.2.5.4
7ff7866f4000-7ff7866f5000 rw-p 0000d000 fd:02 139882 /usr/lib/liblber-2.4.so.2.5.4
7ff7866f5000-7ff7866f9000 r-xp 00000000 fd:02 1438987 /lib/libattr.so.1.1.0
7ff7866f9000-7ff7868f8000 ---p 00004000 fd:02 1438987 /lib/libattr.so.1.1.0
7ff7868f8000-7ff7868f9000 r--p 00003000 fd:02 1438987 /lib/libattr.so.1.1.0
7ff7868f9000-7ff7868fa000 rw-p 00004000 fd:02 1438987 /lib/libattr.so.1.1.0
7ff7868fa000-7ff786a77000 r-xp 00000000 fd:02 1439746 /lib/libc-2.11.1.so
7ff786a77000-7ff786c76000 ---p 0017d000 fd:02 1439746 /lib/libc-2.11.1.so
7ff786c76000-7ff786c7a000 r--p 0017c000 fd:02 1439746 /lib/libc-2.11.1.so
7ff786c7a000-7ff786c7b000 rw-p 00180000 fd:02 1439746 /lib/libc-2.11.1.so
7ff786c7b000-7ff786c80000 rw-p 00000000 00:00 0
7ff786c80000-7ff786c89000 r-xp 00000000 fd:02 1439738 /lib/libcrypt-2.11.1.so
7ff786c89000-7ff786e89000 ---p 00009000 fd:02 1439738 /lib/libcrypt-2.11.1.so
7ff786e89000-7ff786e8a000 r--p 00009000 fd:02 1439738 /lib/libcrypt-2.11.1.so
7ff786e8a000-7ff786e8b000 rw-p 0000a000 fd:02 1439738 /lib/libcrypt-2.11.1.so
7ff786e8b000-7ff786eb9000 rw-p 00000000 00:00 0
7ff786eb9000-7ff7870f8000 r-xp 00000000 fd:02 144372 /usr/lib/libpython2.6.so.1.0
7ff7870f8000-7ff7872f7000 ---p 0023f000 fd:02 144372 /usr/lib/libpython2.6.so.1.0
7ff7872f7000-7ff7872f9000 r--p 0023e000 fd:02 144372 /usr/lib/libpython2.6.so.1.0
7ff7872f9000-7ff78735b000 rw-p 00240000 fd:02 144372 /usr/lib/libpython2.6.so.1.0
7ff78735b000-7ff78736a000 rw-p 00000000 00:00 0
7ff78736a000-7ff78736c000 r-xp 00000000 fd:02 1439727 /lib/libutil-2.11.1.so
7ff78736c000-7ff78756b000 ---p 00002000 fd:02 1439727 /lib/libutil-2.11.1.so
7ff78756b000-7ff78756c000 r--p 00001000 fd:02 1439727 /lib/libutil-2.11.1.so
7ff78756c000-7ff78756d000 rw-p 00002000 fd:02 1439727 /lib/libutil-2.11.1.so
7ff78756d000-7ff7875f7000 r-xp 00000000 fd:02 139330 /usr/lib/libsqlite3.so.0.8.6
7ff7875f7000-7ff7877f6000 ---p 0008a000 fd:02 139330 /usr/lib/libsqlite3.so.0.8.6
7ff7877f6000-7ff7877f8000 r--p 00089000 fd:02 139330 /usr/lib/libsqlite3.so.0.8.6
7ff7877f8000-7ff7877fa000 rw-p 0008b000 fd:02 139330 /usr/lib/libsqlite3.so.0.8.6
7ff7877fa000-7ff787940000 r-xp 00000000 fd:02 133522 /usr/lib/libxml2.so.2.7.6
7ff787940000-7ff787b3f000 ---p 00146000 fd:02 133522 /usr/lib/libxml2.so.2.7.6
7ff787b3f000-7ff787b47000 r--p 00145000 fd:02 133522 /usr/lib/libxml2.so.2.7.6
7ff787b47000-7ff787b49000 rw-p 0014d000 fd:02 133522 /usr/lib/libxml2.so.2.7.6
7ff787b49000-7ff787b4a000 rw-p 00000000 00:00 0
7ff787b4a000-7ff787cb2000 r-xp 00000000 fd:02 1439008 /lib/libcrypto.so.0.9.8
7ff787cb2000-7ff787eb2000 ---p 00168000 fd:02 1439008 /lib/libcrypto.so.0.9.8
7ff787eb2000-7ff787ebf000 r--p 00168000 fd:02 1439008 /lib/libcrypto.so.0.9.8
7ff787ebf000-7ff787ed7000 rw-p 00175000 fd:02 1439008 /lib/libcrypto.so.0.9.8
7ff787ed7000-7ff787edb000 rw-p 00000000 00:00 0
7ff787edb000-7ff787f26000 r-xp 00000000 fd:02 1439048 /lib/libssl.so.0.9.8
7ff787f26000-7ff788125000 ---p 0004b000 fd:02 1439048 /lib/libssl.so.0.9.8
7ff788125000-7ff788127000 r--p 0004a000 fd:02 1439048 /lib/libssl.so.0.9.8
7ff788127000-7ff78812c000 rw-p 0004c000 fd:02 1439048 /lib/libssl.so.0.9.8
7ff78812c000-7ff78812d000 rw-p 00000000 00:00 0
7ff78812d000-7ff788174000 r-xp 00000000 fd:02 149306 /usr/lib/libldap_r-2.4.so.2.5.4
7ff788174000-7ff788374000 ---p 00047000 fd:02 149306 /usr/lib/libldap_r-2.4.so.2.5.4
7ff788374000-7ff788376000 r--p 00047000 fd:02 149306 /usr/lib/libldap_r-2.4.so.2.5.4
7ff788376000-7ff788377000 rw-p 00049000 fd:02 149306 /usr/lib/libldap_r-2.4.so.2.5.4
7ff788377000-7ff788379000 rw-p 00000000 00:00 0
7ff788379000-7ff788398000 r-xp 00000000 fd:02 145876 /usr/lib/libyaml-0.so.2.0.1
7ff788398000-7ff788597000 ---p 0001f000 fd:02 145876 /usr/lib/libyaml-0.so.2.0.1
7ff788597000-7ff788598000 r--p 0001e000 fd:02 145876 /usr/lib/libyaml-0.so.2.0.1
7ff788598000-7ff788599000 rw-p 0001f000 fd:02 145876 /usr/lib/libyaml-0.so.2.0.1
7ff788599000-7ff78859d000 r-xp 00000000 fd:02 1439073 /lib/libuuid.so.1.3.0
7ff78859d000-7ff78879c000 ---p 00004000 fd:02 1439073 /lib/libuuid.so.1.3.0
7ff78879c000-7ff78879d000 r--p 00003000 fd:02 1439073 /lib/libuuid.so.1.3.0
7ff78879d000-7ff78879e000 rw-p 00004000 fd:02 1439073 /lib/libuuid.so.1.3.0
7ff78879e000-7ff7887a2000 r-xp 00000000 fd:02 1438992 /lib/libcap.so.2.17
7ff7887a2000-7ff7889a1000 ---p 00004000 fd:02 1438992 /lib/libcap.so.2.17
7ff7889a1000-7ff7889a2000 r--p 00003000 fd:02 1438992 /lib/libcap.so.2.17
7ff7889a2000-7ff7889a3000 rw-p 00004000 fd:02 1438992 /lib/libcap.so.2.17
7ff7889a3000-7ff7889d0000 r-xp 00000000 fd:02 1439067 /lib/libpcre.so.3.12.1
7ff7889d0000-7ff788bcf000 ---p 0002d000 fd:02 1439067 /lib/libpcre.so.3.12.1
7ff788bcf000-7ff788bd0000 r--p 0002c000 fd:02 1439067 /lib/libpcre.so.3.12.1
7ff788bd0000-7ff788bd1000 rw-p 0002d000 fd:02 1439067 /lib/libpcre.so.3.12.1
7ff788bd1000-7ff788bd3000 r-xp 00000000 fd:02 1439743 /lib/libdl-2.11.1.so
7ff788bd3000-7ff788dd3000 ---p 00002000 fd:02 1439743 /lib/libdl-2.11.1.so
7ff788dd3000-7ff788dd4000 r--p 00002000 fd:02 1439743 /lib/libdl-2.11.1.so
7ff788dd4000-7ff788dd5000 rw-p 00003000 fd:02 1439743 /lib/libdl-2.11.1.so
7ff788dd5000-7ff788e57000 r-xp 00000000 fd:02 1439714 /lib/libm-2.11.1.so
7ff788e57000-7ff789056000 ---p 00082000 fd:02 1439714 /lib/libm-2.11.1.so
7ff789056000-7ff789057000 r--p 00081000 fd:02 1439714 /lib/libm-2.11.1.so
7ff789057000-7ff789058000 rw-p 00082000 fd:02 1439714 /lib/libm-2.11.1.so
7ff789058000-7ff789070000 r-xp 00000000 fd:02 1439734 /lib/libpthread-2.11.1.so
7ff789070000-7ff78926f000 ---p 00018000 fd:02 1439734 /lib/libpthread-2.11.1.so
7ff78926f000-7ff789270000 r--p 00017000 fd:02 1439734 /lib/libpthread-2.11.1.so
7ff789270000-7ff789271000 rw-p 00018000 fd:02 1439734 /lib/libpthread-2.11.1.so
7ff789271000-7ff789275000 rw-p 00000000 00:00 0
7ff789275000-7ff789295000 r-xp 00000000 fd:02 1439729 /lib/ld-2.11.1.so
7ff789299000-7ff78929a000 rw-p 00000000 00:00 0
7ff78929a000-7ff78929c000 rw-s 00000000 00:04 38000522 /dev/zero (deleted)
7ff78929c000-7ff78929d000 rw-s 00000000 00:04 38000521 /dev/zero (deleted)
7ff78929d000-7ff78929e000 rw-s 00000000 00:04 38000520 /dev/zero (deleted)
7ff78929e000-7ff7892a0000 rw-s 00000000 00:04 38000517 /dev/zero (deleted)
7ff7892a0000-7ff7892a1000 rw-s 00000000 00:04 38000516 /dev/zero (deleted)
7ff7892a1000-7ff7892a2000 rw-s 00000000 00:04 38000515 /dev/zero (deleted)
7ff7892a2000-7ff7892a3000 rw-s 00000000 00:04 38000514 /dev/zero (deleted)
7ff7892a3000-7ff7892b3000 rw-s 00000000 00:04 38000513 /dev/zero (deleted)
7ff7892b3000-7ff7892b5000 rw-s 00000000 00:04 38000512 /dev/zero (deleted)
7ff7892b5000-7ff7892b6000 rw-s 00000000 00:04 38000511 /dev/zero (deleted)
7ff7892b6000-7ff7892b7000 rw-s 00000000 00:04 38000510 /dev/zero (deleted)
7ff7892b7000-7ff7892b8000 rw-s 00000000 00:04 38000509 /dev/zero (deleted)
7ff7892b8000-7ff7892c8000 rw-s 00000000 00:04 38000508 /dev/zero (deleted)
7ff7892c8000-7ff7892ca000 rw-s 00000000 00:04 38000507 /dev/zero (deleted)
7ff7892ca000-7ff7892cb000 rw-s 00000000 00:04 38000506 /dev/zero (deleted)
7ff7892cb000-7ff7892cc000 rw-s 00000000 00:04 38000505 /dev/zero (deleted)
7ff7892cc000-7ff7892cd000 rw-s 00000000 00:04 38000504 /dev/zero (deleted)
7ff7892cd000-7ff7892dd000 rw-s 00000000 00:04 38000503 /dev/zero (deleted)
7ff7892dd000-7ff7892df000 rw-s 00000000 00:04 38000502 /dev/zero (deleted)
7ff7892df000-7ff7892e0000 rw-s 00000000 00:04 38000501 /dev/zero (deleted)
7ff7892e0000-7ff7892e1000 rw-s 00000000 00:04 38000500 /dev/zero (deleted)
7ff7892e1000-7ff7892e2000 rw-s 00000000 00:04 38000499 /dev/zero (deleted)
7ff7892e2000-7ff7892f2000 rw-s 00000000 00:04 38000498 /dev/zero (deleted)
7ff7892f2000-7ff7892f4000 rw-s 00000000 00:04 38000497 /dev/zero (deleted)
7ff7892f4000-7ff7892f5000 rw-s 00000000 00:04 38000496 /dev/zero (deleted)
7ff7892f5000-7ff7892f6000 rw-s 00000000 00:04 38000495 /dev/zero (deleted)
7ff7892f6000-7ff7892f7000 rw-s 00000000 00:04 38000494 /dev/zero (deleted)
7ff7892f7000-7ff789307000 rw-s 00000000 00:04 38000493 /dev/zero (deleted)
7ff789307000-7ff789309000 rw-s 00000000 00:04 38000492 /dev/zero (deleted)
7ff789309000-7ff789310000 r--s 00000000 fd:02 153632 /usr/lib/gconv/gconv-modules.cache
7ff789310000-7ff78934f000 r--p 00000000 fd:02 142026 /usr/lib/locale/pl_PL.utf8/LC_CTYPE
7ff78934f000-7ff7893c1000 rw-p 00000000 00:00 0
7ff7893c1000-7ff7893c2000 rw-s 00000000 00:04 38000519 /dev/zero (deleted)
7ff7893c2000-7ff789444000 rw-p 00000000 00:00 0
7ff789444000-7ff789445000 rw-s 00000000 00:04 38000487 /dev/zero (deleted)
7ff789445000-7ff789446000 rw-s 00000000 00:04 38000486 /dev/zero (deleted)
7ff789446000-7ff789447000 rw-s 00000000 00:04 38000485 /dev/zero (deleted)
7ff789447000-7ff789448000 rw-s 00000000 00:04 38000484 /dev/zero (deleted)
7ff789448000-7ff789449000 rw-s 00000000 00:04 38000483 /dev/zero (deleted)
7ff789449000-7ff78944a000 rw-s 00000000 00:04 38000482 /dev/zero (deleted)
7ff78944a000-7ff78944b000 rw-s 00000000 00:04 38000481 /dev/zero (deleted)
7ff78944b000-7ff78944c000 rw-s 00000000 00:04 38000480 /dev/zero (deleted)
7ff78944c000-7ff78944d000 rw-s 00000000 00:04 38000479 /dev/zero (deleted)
7ff78944d000-7ff78944e000 rw-s 00000000 00:04 38000478 /dev/zero (deleted)
7ff78944e000-7ff78947b000 rw-s 00000000 00:04 38000467 /dev/zero (deleted)
7ff78947b000-7ff78948a000 rw-p 00000000 00:00 0
7ff78948a000-7ff78948b000 rw-s 00000000 00:04 38000477 /dev/zero (deleted)
7ff78948b000-7ff78948c000 rw-s 00000000 00:04 38000476 /dev/zero (deleted)
7ff78948c000-7ff78948d000 rw-s 00000000 00:04 38000475 /dev/zero (deleted)
7ff78948d000-7ff78948e000 rw-s 00000000 00:04 38000474 /dev/zero (deleted)
7ff78948e000-7ff78948f000 rw-s 00000000 00:04 38000473 /dev/zero (deleted)
7ff78948f000-7ff789490000 rw-s 00000000 00:04 38000472 /dev/zero (deleted)
7ff789490000-7ff789491000 rw-s 00000000 00:04 38000471 /dev/zero (deleted)
7ff789491000-7ff789492000 rw-s 00000000 00:04 38000470 /dev/zero (deleted)
7ff789492000-7ff789494000 rw-p 00000000 00:00 0
7ff789494000-7ff789495000 r--p 0001f000 fd:02 1439729 /lib/ld-2.11.1.so
7ff789495000-7ff789496000 rw-p 00020000 fd:02 1439729 /lib/ld-2.11.1.so
7ff789496000-7ff789497000 rw-p 00000000 00:00 0
7fff982e6000-7fff98307000 rw-p 00000000 00:00 0 [stack]
7fff983ff000-7fff98400000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Wed Jan 16 12:35:30 2013 - DAMN ! worker 2 (pid: 1810) died, killed by signal 6 :( trying respawn ...
Wed Jan 16 12:35:30 2013 - Respawned uWSGI worker 2 (new pid: 1811)
*** glibc detected *** uWSGI worker 2: realloc(): invalid next size: 0x0000000001672c90 ***
======= Backtrace: =========
/lib/libc.so.6(+0x78bb6)[0x7ff786972bb6]
/lib/libc.so.6(+0x7f396)[0x7ff786979396]
/lib/libc.so.6(realloc+0xf0)[0x7ff7869796b0]
/usr/lib/libpython2.6.so.1.0(PyList_Append+0xa1)[0x7ff786f3dfb1]
/usr/lib/libpython2.6.so.1.0(+0x10fa3a)[0x7ff786fc8a3a]
/usr/lib/libpython2.6.so.1.0(+0x10f16d)[0x7ff786fc816d]
```

I can only trigger it with uWSGI from before #117 + this patch, with latest master + this patch it works fine (or I was lucky). Maybe it uncovered bug in python plugin?