Hello.
I am using uwsgi.lock() in my stats system.
It is seems i got deadlock with 1.0.4 stable.
But all runs ok on linux.

It is seems deadlock happens when worker doing after request cleanup
and stats flush and uses uwsgi.lock()
and at the same time master process also aquiring a lock.

Attaching ktrace.out (of master process)
I am currently using prefork 200. If you with i can try to deadlock
with say prefork 3 and ktrace workers also.


uwsgi versions i'tried that produce deadlock:
parent: 36:34ff46a694c5tip
Added tag 1.0.4 for changeset 1f0c629d5cfa
and http://projects.unbit.it/downloads/uwsgi-1.0.4.tar.gz

Sys info:
FreeBSD xxxhostnamexxx 8.1-20100727-SNAP FreeBSD 8.1-20100727-SNAP #0:
Tue Jul 27 01:49:07 UTC 2010

last few lines of kdump:
"""
 25452 uwsgi    RET   write 63/0x3f
 25452 uwsgi    CALL  gettimeofday(0x7fffffffe440,0)
 25452 uwsgi    RET   gettimeofday 0
 25452 uwsgi    CALL  _umtx_lock(0x8005c0000)
 25452 uwsgi    RET   _umtx_lock RESTART
 25452 uwsgi    PSIG  SIGKILL SIG_DFL
"""

uwsgi get stucked just after i start it and do
openload url 150  or  ab -n 10000 -c 150 url
it serves a 3-4 requests and stop responding.

I can send you my stats.py that is using uwsgi.lock() in private if
you wish or can provide any other debug info.

uwsgi.xml start config also attached.

Maybe i should use uwsgi.lock(1) in my code cause uwsgi seems to be
using lock(0) in master internally?
(Or maybe it should not expose lock(0) to user code?)

Best regards.

-- 
--------------------------------------------
Турнаев Евгений Викторович
+7 906 875 09 43
--------------------------------------------
<uwsgi>
    <socket>/var/run/uwsgi_hypernova.sock</socket>
    <listen>1024</listen>
    <chmod-socket>777</chmod-socket>
    <workers>200</workers>

    <pythonpath>.</pythonpath>
    <module>hypernova.app</module>
    <pyargv>--modules-path ../data/modules --mode=debug --log-handler=file</pyargv>
    <optimize>2</optimize>

    <pidfile>/var/run/uwsgi_hypernova.pid</pidfile>
    
    <logdate/>

    <harakiri>10</harakiri>
    <harakiri-verbose/>

    <single-interpreter/>
    <master/>
    <!-- vacuum/ -->
    
    <daemonize>/spool/logs/hnova/uwsgi.log</daemonize>
</uwsgi>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to