Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

umysql can hang forever #53

Open
thomasj02 opened this issue Jun 4, 2014 · 4 comments
Open

umysql can hang forever #53

thomasj02 opened this issue Jun 4, 2014 · 4 comments

Comments

@thomasj02
Copy link

I've found the frequently when starting a large number of simultaneous jobs that all hit a MySQL server at once, sometimes umysql will hang indefinitely when trying to connect. Stacktrace is:

(gdb) bt
#0 0x00007f64612d14cc in recv () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00000000004fb139 in ?? ()
#2 0x0000000000510b4b in ?? ()
#3 0x00000000004cbb0a in PyObject_CallMethodObjArgs ()
#4 0x00007f645e2ee69c in API_recvSocket (sock=0x4f03d00, buffer=0x7f644774b010 "", cbBuffer=cbBuffer@entry=65536) at ./python/io_cpython.c:229
#5 0x00007f645e2ef1c0 in Connection::readSocket (this=this@entry=0x5301720) at ./lib/Connection.cpp:153
#6 0x00007f645e2ef264 in Connection::recvPacket (this=this@entry=0x5301720) at ./lib/Connection.cpp:354
#7 0x00007f645e2efd84 in Connection::connect (this=0x5301720, _host=, _port=, _username=,

_password=<optimized out>, _database=<optimized out>, _autoCommit=0x0, _charset=MCS_utf8_general_ci) at ./lib/Connection.cpp:487

#8 0x00007f645e2ee8aa in UMConnection_Connect (conn=, _host=, _port=, _username=,

_password=<optimized out>, _database=<optimized out>, _autoCommit=0x0, _charset=33) at ./lib/capi.cpp:84

#9 0x00007f645e2ed74e in Connection_connect (self=0x510fcd8, args=) at ./python/umysql.c:860
#10 0x00000000004ac5ce in PyEval_EvalFrameEx ()
#11 0x00000000004b3fd8 in PyEval_EvalCodeEx ()
#12 0x00000000004b4b4c in ?? ()
#13 0x0000000000481cc4 in ?? ()
#14 0x00000000004613b4 in ?? ()
#15 0x0000000000463cc2 in ?? ()
#16 0x00000000004acc66 in PyEval_EvalFrameEx ()
#17 0x00000000004acde0 in PyEval_EvalFrameEx ()
#18 0x00000000004b3fd8 in PyEval_EvalCodeEx ()
#19 0x00000000004acb98 in PyEval_EvalFrameEx ()
#20 0x00000000004b3fd8 in PyEval_EvalCodeEx ()
#21 0x0000000000536723 in ?? ()
#22 0x0000000000446bf2 in PyRun_FileExFlags ()
#23 0x00000000004470ec in PyRun_SimpleFileExFlags ()
#24 0x0000000000447cdc in Py_Main ()
#25 0x00007f64606b6ead in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#26 0x00000000004c7f39 in _start ()

@Jahaja
Copy link
Member

Jahaja commented Oct 20, 2014

Interesting, have you been able to figure out a repro for this?

@thomasj02
Copy link
Author

Happens basically every time I fire up a ton of jobs at once, but I don't have a small test case that reproduces

@jskorpan
Copy link

Do you have a repro with any other driver for MySQL?
Being stuck in the recv syscall would indicate that you've just sent your query and are expecting result data from the server which for some reason is never received.

What does the SQL server say about what these jobs are doing?

@thomasj02
Copy link
Author

I haven't tried with the standard python driver. I filed the bug a while
ago, so unfortunately I'm not using the exact setup I had back then. (I'm
not complaining about response time, just saying that my setup has changed
a bit).

My real concern was that there should be some kind of timeout somewhere in
that call stack where umysql throws an exception if it hasn't heard
anything back at all in X minutes.

On Tue, Oct 21, 2014 at 2:19 AM, Jonas Tärnström [email protected]
wrote:

Do you have a repro with any other driver for MySQL?
Being stuck in the recv syscall would indicate that you've just sent your
query and are expecting result data from the server which for some reason
is never received.

What does the SQL server say about what these jobs are doing?


Reply to this email directly or view it on GitHub
#53 (comment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants