[asterisk-dev] I don't have if this is a bug: crash res_odbc.conf with pgsql

Germán Aracil Boned german at tecnoxarxa.com
Wed Mar 26 00:38:00 CDT 2008


Hello

I have one problem and I don't know if this is a bug:

I have:

client charset = UTF-8

in my odbc.ini (unixodbc/debian/etch), for access to one database with 
UTF-8 encoding (pgsql/8.2/debian/etch)
In sip.conf, I have pedantic=yes
(all asterisk versions make crash)

And I have crash some times:

Core was generated by `/usr/sbin/asterisk -f -p -g -c'.
Program terminated with signal 11, Segmentation fault.
#0 0xb7b4ec7d in SQLTablesW () from /usr/lib/libodbc.so.1
(gdb) bt
#0 0xb7b4ec7d in SQLTablesW () from /usr/lib/libodbc.so.1
#1 0xb7b27316 in SQLFreeEnv () from /usr/lib/libodbc.so.1
#2 0xb7b27605 in SQLFreeHandle () from /usr/lib/libodbc.so.1
#3 0xb7d0dc3f in realtime_odbc (database=0xb7dbecac "ast_cnf", 
table=0xb7dbebac "voip_sip_conf",
ap=0xb7dbedc4 "\237�\205�\200�۷") at res_config_odbc.c:172
#4 0x0808ecd7 in ast_load_realtime (family=0xb785cd2e "sippeers") at 
config.c:1408
#5 0xb7823ad8 in find_peer (peer=0xb7dbee80 "globalgt1-b672a960", 
sin=0x0, realtime=1) at chan_sip.c:2529
#6 0xb7825981 in sip_devicestate (data=0xb7dbf314) at chan_sip.c:15826
#7 0x08094c24 in ast_device_state (device=0x8322fd4 
"SIP/globalgt1-b672a960") at devicestate.c:170
#8 0x080950d3 in do_state_change (device=0x0) at devicestate.c:285
#9 0x080951a9 in do_devstate_changes (data=0x0) at devicestate.c:369
#10 0x080fab80 in dummy_start (data=0x81792d8) at utils.c:852
#11 0xb7fae0bd in start_thread () from /lib/tls/libpthread.so.0
#12 0xb7ec901e in clone () from /lib/tls/libc.so.6

But, not always make crash.

Postgresql log write:

2008-03-25 12:43:03 CET ERROR: secuencia de bytes no válida para 
codificación «UTF8»: 0x88
2008-03-25 12:43:03 CET HINT: This error can also happen if the byte 
sequence does not match the encoding expected by the server, which is 
controlled by "client_encoding".

I need use any character encoding in my pgsql client config ?

All system use UTF-8 by default and Asterisk (any version) was compiled.

If not, I report this bug for digium.It can make crash asterisk sending 
corrupts/malicius headers from sip clients.


thank to all





More information about the asterisk-dev mailing list