Hello,
the issue was a sig bus this time, which more enforced in sparc/solaris,
not common in linux. I was looked at the structure and seems aligned ok,
mis-alignment being the most often used to rise sigbus. What I could
think as next reason was the empty string default value which may make
solaris think is not accessible anymore at runtime via the cfg
structure, so I changed the field for prefix to str and initialized to
null to force allocation in any case.
Can you try with the attached patch and tell if works fine?
Cheers,
Daniel
On 4/28/12 6:49 PM, Akan wrote:
I tried adding the realm_prefix and still got the same problem. I ran
kamailio thru gdb to try and step thru and get more information and
have included the output in the attached text file. Hope this helps.
Thanks
Nathaniel L Keeling
On 4/26/2012 2:42 PM, Akan wrote:
No, but I do have an alias defined.
alias="mydomain.com:5080"
Thanks
Nathaniel
On 4/26/2012 3:41 AM, Daniel-Constantin Mierla wrote:
Hello,
do you set the realm_prefix parameter of registrar module?
http://kamailio.org/docs/modules/stable/modules_k/registrar.html#id2495082
If yes, can you paste it here?
Cheers,
Daniel
On 4/25/12 9:42 PM, Akan wrote:
I have 2 servers running Solaris and Kamailio 3.2.3 where on one
Kamailio is terminating when it tries to save the location for a
register request and the other is producing a core dump when
processing an Option request. I have one server handling Register
request while the other sip server forwards the register requests
and handles the other requests. I have included the backtraces from
the core dumps and the output from the log for the registrar server
as well as the command that is causing kamailio to terminate:
if (!save("location"))
sl_reply_error();
4(3364) ERROR: *** cfgtrace:
c=[/opt/kamailio-3.2/etc/kamailio/kamailio.cfg] l=714 a=17 n=if
4(3364) ERROR: *** cfgtrace:
c=[/opt/kamailio-3.2/etc/kamailio/kamailio.cfg] l=711 a=26 n=save
14(3374) : <core> [pass_fd.c:293]: ERROR: receive_fd: EOF on 15
14(3374) DEBUG: <core> [tcp_main.c:3555]: DBG: handle_ser_child:
dead child 4, pid 3364 (shutting down?)
14(3374) DEBUG: <core> [io_wait.h:617]: DBG: io_watch_del
(1003743d8, 15, 0, 0x0) fd_no=18 called
0(3360) ALERT: <core> [main.c:751]: child process 3364 exited by a
signal 10
0(3360) ALERT: <core> [main.c:754]: core was not generated
0(3360) INFO: <core> [main.c:766]: INFO: terminating due to SIGCHLD
6(3366) INFO: <core> [main.c:817]: INFO: signal 15 received
1(3361) INFO: <core> [main.c:817]: INFO: signal 15 received
2(3362) INFO: <core> [main.c:817]: INFO: signal 15 received
3(3363) INFO: <core> [main.c:817]: INFO: signal 15 received
5(3365) INFO: <core> [main.c:817]: INFO: signal 15 received
7(3367) INFO: <core> [main.c:817]: INFO: signal 15 received
8(3368) INFO: <core> [main.c:817]: INFO: signal 15 received
9(3369) INFO: <core> [main.c:817]: INFO: signal 15 received
10(3370) INFO: <core> [main.c:817]: INFO: signal 15 received
11(3371) INFO: <core> [main.c:817]: INFO: signal 15 received
12(3372) INFO: <core> [main.c:817]: INFO: signal 15 received
13(3373) INFO: <core> [main.c:817]: INFO: signal 15 received
14(3374) INFO: <core> [main.c:817]: INFO: signal 15 received
0(3360) DEBUG: presence_xml [presence_xml.c:347]: start
0(3360) ERROR: ctl [ctl.c:379]: ERROR: ctl: could not delete unix
socket /tmp/kamailio_ctl: Permission denied (13)
0(3360) DEBUG: <core> [db_pool.c:102]: removing connection from
the pool
0(3360) DEBUG: db_postgres [km_pg_con.c:122]: PQfinish(100842470)
0(3360) DEBUG: db_postgres [km_pg_con.c:126]: pkg_free(1004c1f30)
0(3360) DEBUG: tm [t_funcs.c:122]: DEBUG: tm_shutdown : start
0(3360) DEBUG: tm [t_funcs.c:125]: DEBUG: tm_shutdown : emptying
hash table
0(3360) DEBUG: tm [t_funcs.c:127]: DEBUG: tm_shutdown : removing
semaphores
0(3360) DEBUG: tm [t_funcs.c:129]: DEBUG: tm_shutdown : destroying
tmcb lists
0(3360) DEBUG: tm [t_funcs.c:132]: DEBUG: tm_shutdown : done
Thanks
Nathaniel
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -http://www.asipto.com
http://twitter.com/#!/miconda -http://www.linkedin.com/in/miconda
No virus found in this message.
Checked by AVG - www.avg.com <http://www.avg.com>
Version: 2012.0.1913 / Virus Database: 2411/4959 - Release Date:
04/25/12
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2411/4960 - Release Date:
04/26/12
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
diff --git a/modules_k/registrar/common.c b/modules_k/registrar/common.c
index 824b635..baf09fb 100644
--- a/modules_k/registrar/common.c
+++ b/modules_k/registrar/common.c
@@ -99,8 +99,8 @@ int extract_aor(str* _uri, str* _a)
if (user_len)
aor_buf[_a->len++] = '@';
/* strip prefix (if defined) */
- realm_prefix.s = cfg_get(registrar, registrar_cfg, realm_pref);
- realm_prefix.len = strlen(realm_prefix.s);
+ realm_prefix.s = cfg_get(registrar, registrar_cfg,
realm_pref).s;
+ realm_prefix.len = cfg_get(registrar, registrar_cfg,
realm_pref).len;
if (realm_prefix.len && realm_prefix.len<puri.host.len &&
(memcmp(realm_prefix.s, puri.host.s, realm_prefix.len)==0) ) {
memcpy(aor_buf + _a->len, puri.host.s +
realm_prefix.len,
diff --git a/modules_k/registrar/config.c b/modules_k/registrar/config.c
index f187c1a..038a68c 100644
--- a/modules_k/registrar/config.c
+++ b/modules_k/registrar/config.c
@@ -40,7 +40,7 @@ struct cfg_group_registrar default_registrar_cfg = {
0, /* case_sensitive */
Q_UNSPECIFIED, /* default_q */
1, /* append_branches */
- "" /* realm_pref */
+ STR_NULL /* realm_pref */
};
void *registrar_cfg = &default_registrar_cfg;
@@ -64,7 +64,7 @@ cfg_def_t registrar_cfg_def[] = {
"The parameter represents default q value for new contacts."},
/* Q_UNSPECIFIED is -1 */
{"append_branches", CFG_VAR_INT , 0, 0, 0, 0,
"If set to 1(default), lookup will put all contacts found in
msg structure"},
- {"realm_pref", CFG_VAR_STRING , 0, 0,
0, 0,
+ {"realm_pref", CFG_VAR_STR, 0, 0, 0, 0,
"Realm prefix to be removed. Default is \"\""},
{0, 0, 0, 0, 0, 0}
};
diff --git a/modules_k/registrar/config.h b/modules_k/registrar/config.h
index 06b1390..f2708d6 100644
--- a/modules_k/registrar/config.h
+++ b/modules_k/registrar/config.h
@@ -36,7 +36,7 @@ struct cfg_group_registrar {
unsigned int case_sensitive;
qvalue_t default_q;
unsigned int append_branches;
- char* realm_pref;
+ str realm_pref;
};
extern struct cfg_group_registrar default_registrar_cfg;
diff --git a/modules_k/registrar/reg_mod.c b/modules_k/registrar/reg_mod.c
index e8089db..4626db5 100644
--- a/modules_k/registrar/reg_mod.c
+++ b/modules_k/registrar/reg_mod.c
@@ -189,7 +189,7 @@ static param_export_t params[] = {
{"append_branches", INT_PARAM,
&default_registrar_cfg.append_branches },
{"case_sensitive", INT_PARAM, &default_registrar_cfg.case_sensitive
},
/* {"tcp_persistent_flag",INT_PARAM, &tcp_persistent_flag }, */
- {"realm_prefix", STR_PARAM, &default_registrar_cfg.realm_pref
},
+ {"realm_prefix", PARAM_STR, &default_registrar_cfg.realm_pref
},
{"min_expires", INT_PARAM, &default_registrar_cfg.min_expires
},
{"max_expires", INT_PARAM, &default_registrar_cfg.max_expires
},
{"received_param", STR_PARAM, &rcv_param
},
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users