Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#555 do_routing function crash without group id parameter

1.7.x
open-accepted
modules (454)
5
2012-10-12
2012-08-30
piero ferraresso
No

I\'m using opensips v. 1.7.2-TLS on a Debian 6.04 machine.
If I call the function do_routing without specifing the group id parameter - do_routing(\"\",\"1\") for example - opensips crah (segfault at 0 ip 081399d8 sp bfed0480 error 4 in opensips[8048000+150000]).
If I insert the group id - do_routing(\"0\",\"1\") for example - all works fine.
Where do I wrong?

Thanks in advance

Piero Ferraresso

Discussion

1 2 > >> (Page 1 of 2)
  • output with debug=8

     
    Attachments
    • priority: 5 --> 6
     
  • gdb bt full core dump

     
    Attachments
    • assigned_to: nobody --> bogdan_iancu
     
  • Hi Piero,

    Could you try without the db_virtual module (direct query to mysql) to see if you still have this issue ?

    Thanks and regards,
    Bogdan

     
  • I tried to reproduce this, using 1.7 :

    if (!do_routing("","1")) {
    xlog("----DR failed !!\n");
    exit;
    }

    But with no success - I get error messages with no crash:

    Sep 17 12:34:54 [6354] DBG:core:parse_to_param: tag=fuzyi
    Sep 17 12:34:54 [6354] DBG:core:parse_to: end of header reached, state=29
    Sep 17 12:34:54 [6354] DBG:core:parse_to: display={"bogdan"}, ruri={sip:bogdan@opensips.org}
    Sep 17 12:34:54 [6354] DBG:core:db_new_result: allocate 48 bytes for result set at 0x7cc598
    Sep 17 12:34:54 [6354] DBG:db_mysql:db_mysql_get_columns: 1 columns returned from the query
    Sep 17 12:34:54 [6354] DBG:core:db_allocate_columns: allocate 28 bytes for result columns at 0x7cc5e0
    Sep 17 12:34:54 [6354] DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7cc5e8)[0]=[groupid]
    Sep 17 12:34:54 [6354] DBG:db_mysql:db_mysql_get_columns: use DB_INT result type
    Sep 17 12:34:54 [6354] DBG:db_mysql:db_mysql_convert_rows: no rows returned from the query
    Sep 17 12:34:54 [6354] ERROR:drouting:get_group_id: no group for user "bogdan"@"opensips.org"
    Sep 17 12:34:54 [6354] DBG:core:db_free_columns: freeing result columns at 0x7cc5e0
    Sep 17 12:34:54 [6354] DBG:core:db_free_rows: freeing 0 rows
    Sep 17 12:34:54 [6354] DBG:core:db_free_result: freeing result set at 0x7cc598
    Sep 17 12:34:54 [6354] ERROR:drouting:do_routing: failed to get group id
    Sep 17 12:34:54 [6354] DBG:core:buf_init: initializing...
    ----DR failed !!

    Maybe it is something particular to your case, so please provide an backtrace.

    Regards,
    Bogdan

     
    • priority: 6 --> 3
    • status: open --> open-works-for-me
     
  • Yes, It seems to depend on using the virtual db module.

    Piero

     
  • Please post the db virtual configuration you are using for the DR module. And one again, if you get a core file, extract please the backtrace from it.

    Regards,
    Bogdan

     
  • This is my actual configuration:

    #db_default_url="virtual://set1" # parallel
    db_default_url="virtual://set2" # failover
    #db_default_url="virtual://set3" # round

    #Setting module-specific parameters

    # DB_virtual
    modparam("db_virtual", "db_probe_time", 10)#default 10 sec
    modparam("db_virtual", "db_max_consec_retrys", 3)#default 10 consecutive times

    modparam("db_virtual", "db_urls", "define set1 PARALLEL")
    modparam("db_virtual", "db_urls", "mysql://opensips:xxx@sqlnode1/opensips17")
    modparam("db_virtual", "db_urls", "mysql://opensips:xxx@sqlnode2/opensips17")

    modparam("db_virtual", "db_urls", "define set2 FAILOVER")
    modparam("db_virtual", "db_urls", "mysql://opensips:xxx@localhost/opensips17")
    modparam("db_virtual", "db_urls", "mysql://opensips:xxx@sqlnode1/opensips17")
    modparam("db_virtual", "db_urls", "mysql://opensips:xxx@sqlnode2/opensips17")

    modparam("db_virtual", "db_urls", "define set3 ROUND")
    modparam("db_virtual", "db_urls", "mysql://opensips:xx@sqlnode1/opensips17")
    modparam("db_virtual", "db_urls", "mysql://opensips:xx@sqlnode2/opensips17")

    # Dynamic Routing + Load Balancer

    modparam("drouting", "use_domain", 0)
    modparam("drouting", "probing_interval", 60)
    modparam("drouting", "probing_from", "sip:pinger@si.unimib.it")
    modparam("drouting", "probing_method", "OPTIONS")
    modparam("drouting", "probing_reply_codes", "501, 403, 404")

     
1 2 > >> (Page 1 of 2)