[OpenSIPS-Devel] trying to examine presence/timer crash
Juha Heinanen
jh at tutpro.com
Sun Sep 26 15:20:44 CEST 2010
Juha Heinanen writes:
> (gdb) where
> #0 0xb758e3e3 in db_mysql_val2bind (v=0xbfcbdf3c, binds=0x8188190, i=1)
> at val.c:274
> #1 0xb758993e in db_mysql_do_prepared_query (conn=<value optimized out>,
> v=<value optimized out>, n=2, uv=0x0, un=0, query=<value optimized out>)
> at dbase.c:443
> #2 0xb758b0dd in db_mysql_delete (_h=0x817c1a0, _k=0xbfcbdf70,
> _o=0xbfcbdf64, _v=0xbfcbdf28, _n=2) at dbase.c:893
> #3 0xb723dea4 in msg_watchers_clean (ticks=3600, param=0x0)
> at subscribe.c:484
> #4 0x080b64cf in timer_ticker () at timer.c:325
> #5 run_timer_process () at timer.c:395
> #6 start_timer_processes () at timer.c:475
> #7 0x08069ea3 in main_loop (argc=16, argv=0xbfcbe134) at main.c:867
> #8 main (argc=16, argv=0xbfcbe134) at main.c:1388
a bit more about this. at frame 2, i can get value of v. the function
and call of db_mysql_do_prepared_query:
int db_mysql_delete(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
const db_val_t* _v, const int _n)
...
ret = db_mysql_do_prepared_query(_h, &query_holder, _v, _n, NULL, 0);
(gdb) frame 2
#2 0xb758b0dd in db_mysql_delete (_h=0x817c1a0, _k=0xbfcbdf70,
_o=0xbfcbdf64, _v=0xbfcbdf28, _n=2) at dbase.c:893
893 ret = db_mysql_do_prepared_query(_h, &query_holder, _v, _n, NULL, 0);
(gdb) info args
_h = 0x817c1a0
_k = 0xbfcbdf70
_o = 0xbfcbdf64
_v = 0xbfcbdf28
_n = 2
(gdb) print _v->type
$7 = DB_INT
but when in frame 1 (in db_mysql_do_prepared_query):
static int db_mysql_do_prepared_query(const db_con_t* conn, const str *query,
const db_val_t* v, int n, const db_val_t* uv, int un)
...
if (db_mysql_val2bind( v+i , mysql_bind, i)<0 ) {
(gdb) info args
conn = <value optimized out>
v = <value optimized out>
n = 2
uv = 0x0
un = 0
query = <value optimized out>
gdb) print v->type
Cannot access memory at address 0x0
perhaps v has changed in db_mysql_do_prepared_query before
db_mysql_val2bind call?
-- juha
More information about the Devel
mailing list