Re: Lock-ups with multi-threading and psycopg 2.0.11
Richard Davies <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
> OK, I've managed to generate the simple test case, which is a big step > forward! And now I've just discovered the PSYCOPG_DEBUG option too. Here are a few different traces of the last lines before a lockup, running with Python 2.5.2, PostgreSQL 8.1.4 and Psycopg2 2.0.12 with PSYCOPG_DEBUG: after <Tester(Thread-2, started)> [20525] _psyco_curs_prefetch: result = 0 [20525] psyco_curs_close: cursor at 0xf7c1e48c closed [20525] psyco_conn_cursor: new cursor for connection at 0xf7bbe2fc [20525] psyco_conn_cursor: parameters: name = (null) [20525] cursor_setup: init cursor object at 0xf7c1e41c [20525] cursor_setup: parameters: name = (null), conn = 0xf7bbe2fc [20525] cursor_setup: good cursor object at 0xf7c1e41c, refcnt = 1 [20525] psyco_conn_cursor: new cursor at 0xf7c1e41c: refcnt = 1 [20525] cursor_dealloc: deleted cursor object at 0xf7c1e48c, refcnt = 0 before <Tester(Thread-2, started)> [20525] pq_execute: entering syncronous DBAPI compatibility mode [20525] pq_fetch: pgstatus = PGRES_TUPLES_OK [20525] pq_fetch: data from a SELECT (got tuples) [20525] _pq_fetch_tuples: looking for cast 25: [20525] _pq_fetch_tuples: per-connection dict: (nil) [20525] _pq_fetch_tuples: global dict: 0xf7b593ec [20525] _pq_fetch_tuples: using cast at 0xf7b593ec (STRING) for type 25 [20525] _pq_fetch_tuples: looking for cast 25: [20525] _pq_fetch_tuples: per-connection dict: (nil) [20525] _pq_fetch_tuples: global dict: 0xf7b593ec [20525] _pq_fetch_tuples: using cast at 0xf7b593ec (STRING) for type 25 [20525] pq_fetch: fetching done; check for critical errors [20525] psyco_curs_execute: res = 1, pgres = 0x959a858 after <Tester(Thread-1, started)> [20525] _psyco_curs_prefetch: result = 0 [20525] psyco_curs_close: cursor at 0xf7c1e72c closed [20525] psyco_conn_cursor: new cursor for connection at 0xf7bbe2fc [20525] psyco_conn_cursor: parameters: name = (null) [20525] cursor_setup: init cursor object at 0xf7c1e48c [20525] cursor_setup: parameters: name = (null), conn = 0xf7bbe2fc [20525] cursor_setup: good cursor object at 0xf7c1e48c, refcnt = 1 [20525] psyco_conn_cursor: new cursor at 0xf7c1e48c: refcnt = 1 [20525] cursor_dealloc: deleted cursor object at 0xf7c1e72c, refcnt = 0 before <Tester(Thread-1, started)> [20525] psyco_curs_execute: starting execution of new query [20525] curs_execute: pg connection at 0x95d8a28 OK [20525] pq_begin_locked: pgconn = 0x95d8a28, isolevel = 1, status = 2 [20525] pq_begin_locked: transaction in progress [20525] pq_execute: executing SYNC query: [20525] select * from test [20525] psyco_curs_execute: starting execution of new query [20525] curs_execute: pg connection at 0x95d8a28 OK [20525] pq_execute: entering syncronous DBAPI compatibility mode [20525] pq_fetch: pgstatus = PGRES_TUPLES_OK [20525] pq_fetch: data from a SELECT (got tuples) [20525] pq_begin_locked: pgconn = 0x95d8a28, isolevel = 1, status = 2 [20525] pq_begin_locked: transaction in progress [20525] pq_execute: executing SYNC query: [20525] select * from test [20525] pq_execute: entering syncronous DBAPI compatibility mode [20525] pq_fetch: pgstatus = PGRES_TUPLES_OK [20525] pq_fetch: data from a SELECT (got tuples) [20525] _pq_fetch_tuples: looking for cast 25: [20525] _pq_fetch_tuples: per-connection dict: (nil) [20525] _pq_fetch_tuples: global dict: 0xf7b593ec [20525] _pq_fetch_tuples: using cast at 0xf7b593ec (STRING) for type 25 [20525] _pq_fetch_tuples: looking for cast 25: [20525] _pq_fetch_tuples: per-connection dict: (nil) [20525] _pq_fetch_tuples: global dict: 0xf7b593ec [20525] _pq_fetch_tuples: using cast at 0xf7b593ec (STRING) for type 25 [20525] pq_fetch: fetching done; check for critical errors after <Tester(Thread-1, started)> [20655] _psyco_curs_prefetch: result = 0 [20655] psyco_curs_close: cursor at 0xf7c2c41c closed [20655] psyco_conn_cursor: new cursor for connection at 0xf7bcc2fc [20655] psyco_conn_cursor: parameters: name = (null) [20655] cursor_setup: init cursor object at 0xf7c2c72c [20655] cursor_setup: parameters: name = (null), conn = 0xf7bcc2fc [20655] cursor_setup: good cursor object at 0xf7c2c72c, refcnt = 1 [20655] psyco_conn_cursor: new cursor at 0xf7c2c72c: refcnt = 1 [20655] cursor_dealloc: deleted cursor object at 0xf7c2c41c, refcnt = 0 before <Tester(Thread-1, started)> [20655] psyco_curs_execute: starting execution of new query [20655] curs_execute: pg connection at 0x8916a28 OK [20655] pq_begin_locked: pgconn = 0x8916a28, isolevel = 1, status = 2 [20655] pq_begin_locked: transaction in progress [20655] pq_execute: executing SYNC query: [20655] select * from test [20655] pq_execute: entering syncronous DBAPI compatibility mode [20655] pq_fetch: pgstatus = PGRES_TUPLES_OK [20655] pq_fetch: data from a SELECT (got tuples) [20655] _pq_fetch_tuples: looking for cast 25: [20655] _pq_fetch_tuples: per-connection dict: (nil) [20655] _pq_fetch_tuples: global dict: 0xf7b673ec [20655] _pq_fetch_tuples: using cast at 0xf7b673ec (STRING) for type 25 [20655] _pq_fetch_tuples: looking for cast 25: [20655] _pq_fetch_tuples: per-connection dict: (nil) [20655] _pq_fetch_tuples: global dict: 0xf7b673ec [20655] _pq_fetch_tuples: using cast at 0xf7b673ec (STRING) for type 25 [20655] pq_fetch: fetching done; check for critical errors [20655] psyco_curs_execute: res = 1, pgres = 0x8901298 after <Tester(Thread-2, started)> [20655] _psyco_curs_prefetch: result = 0 [20655] psyco_curs_close: cursor at 0xf7c2c48c closed [20655] psyco_conn_cursor: new cursor for connection at 0xf7bcc2fc [20655] psyco_conn_cursor: parameters: name = (null) [20655] cursor_setup: init cursor object at 0xf7c2c41c [20655] cursor_setup: parameters: name = (null), conn = 0xf7bcc2fc [20655] cursor_setup: good cursor object at 0xf7c2c41c, refcnt = 1 [20655] psyco_conn_cursor: new cursor at 0xf7c2c41c: refcnt = 1 [20655] cursor_dealloc: deleted cursor object at 0xf7c2c48c, refcnt = 0 before <Tester(Thread-2, started)> [20655] psyco_curs_execute: starting execution of new query [20655] curs_execute: pg connection at 0x8916a28 OK [20655] pq_begin_locked: pgconn = 0x8916a28, isolevel = 1, status = 2 [20655] pq_begin_locked: transaction in progress [20655] pq_execute: executing SYNC query: [20655] select * from test [20655] pq_execute: entering syncronous DBAPI compatibility mode [20655] pq_fetch: pgstatus = PGRES_TUPLES_OK [20655] pq_fetch: data from a SELECT (got tuples) after <Tester(Thread-1, started)> [20680] _psyco_curs_prefetch: result = 0 [20680] psyco_curs_close: cursor at 0xf7ce772c closed [20680] psyco_conn_cursor: new cursor for connection at 0xf7c872fc [20680] psyco_conn_cursor: parameters: name = (null) [20680] cursor_setup: init cursor object at 0xf7ce741c [20680] cursor_setup: parameters: name = (null), conn = 0xf7c872fc [20680] cursor_setup: good cursor object at 0xf7ce741c, refcnt = 1 [20680] psyco_conn_cursor: new cursor at 0xf7ce741c: refcnt = 1 [20680] cursor_dealloc: deleted cursor object at 0xf7ce772c, refcnt = 0 before <Tester(Thread-1, started)> [20680] psyco_curs_execute: starting execution of new query [20680] curs_execute: pg connection at 0x817ba28 OK [20680] pq_begin_locked: pgconn = 0x817ba28, isolevel = 1, status = 2 [20680] pq_begin_locked: transaction in progress [20680] pq_execute: executing SYNC query: [20680] select * from test [20680] pq_execute: entering syncronous DBAPI compatibility mode [20680] pq_fetch: pgstatus = PGRES_TUPLES_OK [20680] pq_fetch: data from a SELECT (got tuples) [20680] _pq_fetch_tuples: looking for cast 25: [20680] _pq_fetch_tuples: per-connection dict: (nil) [20680] _pq_fetch_tuples: global dict: 0xf7c223ec [20680] _pq_fetch_tuples: using cast at 0xf7c223ec (STRING) for type 25 [20680] _pq_fetch_tuples: looking for cast 25: [20680] _pq_fetch_tuples: per-connection dict: (nil) [20680] _pq_fetch_tuples: global dict: 0xf7c223ec [20680] _pq_fetch_tuples: using cast at 0xf7c223ec (STRING) for type 25 [20680] pq_fetch: fetching done; check for critical errors [20680] psyco_curs_execute: res = 1, pgres = 0x8166308 after <Tester(Thread-2, started)> [20680] _psyco_curs_prefetch: result = 0 [20680] psyco_curs_close: cursor at 0xf7ce748c closed [20680] psyco_conn_cursor: new cursor for connection at 0xf7c872fc [20680] psyco_conn_cursor: parameters: name = (null) [20680] cursor_setup: init cursor object at 0xf7ce772c [20680] cursor_setup: parameters: name = (null), conn = 0xf7c872fc [20680] cursor_setup: good cursor object at 0xf7ce772c, refcnt = 1 [20680] psyco_conn_cursor: new cursor at 0xf7ce772c: refcnt = 1 [20680] cursor_dealloc: deleted cursor object at 0xf7ce748c, refcnt = 0 before <Tester(Thread-2, started)> [20680] psyco_curs_execute: starting execution of new query [20680] curs_execute: pg connection at 0x817ba28 OK [20680] pq_begin_locked: pgconn = 0x817ba28, isolevel = 1, status = 2 [20680] pq_begin_locked: transaction in progress [20680] pq_execute: executing SYNC query: [20680] select * from test [20680] pq_execute: entering syncronous DBAPI compatibility mode [20680] pq_fetch: pgstatus = PGRES_TUPLES_OK [20680] pq_fetch: data from a SELECT (got tuples)