[SR-Users] Kamailio 4.2.3 generates core dump when using sql_xquery in event_route htable:mod-init
Daniel-Constantin Mierla
miconda at gmail.com
Fri Nov 6 16:17:04 CET 2015
Hello,
at that moment the sqlops module is not initialized. The master branch
introduced a new event_route that would be suitable for that.
The htable module is able to load records from a database table in
memory, you just need to have a structure like htable table -- if you
need to pull records from another tables structure, then you can make a
view to look like htable.
Another alternative would be to load via timer or rtimer modules, with a
custom process that runs on timer and first time it executes it will
load records (a $var(...) can be used to know if data was loaded or not).
Anyhow, would be good to get the backtrace from the core dump you got to
know why was crashing -- it should just have thrown errors...
Cheers,
Daniel
On 06/11/15 14:22, Jan Hazenberg wrote:
> Daniel,
>
> I'm currently running a kamailio 4.2.3 with htable enabled and i'm
> trying to load data into a hash table using the
> "event_route[htable:mod-init]". When i try to execute a sql_xquery
> kamailio generates a core dump on startup.
>
>
> Example event_route:
> event_route[htable:mod-init] {
> sql_xquery("kamailio", "SELECT id,number FROM
> blacklist_number", "blacklist_number");
> }
>
> Log output when starting kamailio:
> 0(16905) INFO: rr [../outbound/api.h:54]: ob_load_api(): Failed to
> import bind_ob
> 0(16905) INFO: rr [rr_mod.c:160]: mod_init(): outbound module not
> available
> 0(16905) INFO: usrloc [hslot.c:53]: ul_init_locks(): locks array size
> 1024
> 0(16905) INFO: auth [auth_mod.c:350]: mod_init(): auth: qop set, but
> nonce-count (nc_enabled) support disabled
> 0(16905) INFO: permissions [parse_config.c:251]: parse_config_file():
> file not found: //etc/kamailio/permissions.allow
> 0(16905) INFO: permissions [permissions.c:608]: mod_init(): default
> allow file (//etc/kamailio/permissions.allow) not found => empty rule set
> 0(16905) INFO: permissions [parse_config.c:251]: parse_config_file():
> file not found: //etc/kamailio/permissions.deny
> 0(16905) INFO: permissions [permissions.c:617]: mod_init(): default
> deny file (//etc/kamailio/permissions.deny) not found => empty rule set
> 0(16905) INFO: pike [pike.c:115]: pike_init(): PIKE - initializing
> 0(16905) INFO: pike [ip_tree.c:88]: init_lock_set(): probing 256 set
> size
> 0(16905) INFO: <core> [udp_server.c:175]: probe_max_receive_buffer():
> SO_RCVBUF is initially 124928
> 0(16905) INFO: <core> [udp_server.c:225]: probe_max_receive_buffer():
> SO_RCVBUF is finally 249856
> 0(16905) INFO: rtpproxy [rtpproxy.c:1593]: rtpp_test(): rtp proxy
> <udp:10.1.8.20:22000> found, support for it enabled
> 0(16905) NOTICE: <script>: Startup event route!
> Segmentation fault (core dumped)
>
>
> Could this be a bug? Or is there a better way to load data from a
> custom table into a hashtable on startup.
>
>
> Thanks,
>
> Jan Hazenberg
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
Kamailio Advanced Training, Nov 30-Dec 2, Berlin - http://asipto.com/kat
More information about the sr-users
mailing list