When latest Kamailio git master sends a message over WebSocket
(specifically an MSRP reply on my test system) I get the error,
One or more reserved bits are on: reserved1 = 1, reserved2 = 0, reserved3 = 0
in Google Chrome. This happens for WebSockets over TCP and WebSockets
over TLS. It doesn't happen with a build of Kamailio git master from
around two weeks ago.
Have there been any changes in the network code over the last couple of
weeks that might have had an effect on what Kamailio puts out on the
wire for TCP and TLS?
The code to send an MSRP reply over WebSocket is in
modules/msrp/msrp_netio.c:msrp_reply()
if (unlikely((env->srcinfo.proto == PROTO_WS
|| env->srcinfo.proto == PROTO_WSS)
&& sr_event_enabled(SREV_TCP_WS_FRAME_OUT))) {
struct tcp_connection *con = tcpconn_get(env->srcinfo.id, 0, 0,
0, 0);
ws_event_info_t wsev;
if (con == NULL)
{
LM_WARN("TCP/TLS connection for WebSocket could not be"
"found\n");
return -1;
}
memset(&wsev, 0, sizeof(ws_event_info_t));
wsev.type = SREV_TCP_WS_FRAME_OUT;
wsev.buf = rplbuf;
wsev.len = p - rplbuf;
wsev.id = con->id;
return sr_event_exec(SREV_TCP_WS_FRAME_OUT, (void *) &wsev);
}
The code that handles the SREV_TCP_WS_FRAME_OUT event is in
modules/websocket/ws_frame.c and basically involves:
* filling in the WebSocket message header
* identifying the correct TCP/TLS connection
* setting some flags (for example, SND_F_FORCE_CON_REUSE)
* calling tcp_send()
These areas of the code haven't been changed for months.
Regards,
Peter
When I have explicit listen directives like this (PRIV_IP_ADDR is a
substdef included from another file):
listen=tcp:"PRIV_IP_ADDR":80
listen=tls:"PRIV_IP_ADDR":443
listen=tls:"PRIV_IP_ADDR":2855
Kamailio seg-faults very early in start-up.
The output from GDB is:
(gdb) run
Starting program: /usr/sbin/kamailio
loading modules under /usr/lib64/kamailio/modules
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
qm_detach_free (qm=0x7ffff722b010, p=<value optimized out>)
at mem/q_malloc.c:269
269 FRAG_END(next)->prev_free=prev;
Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.107.el6.x86_64 keyutils-libs-1.4-4.el6.x86_64
krb5-libs-1.10.3-10.el6_4.2.x86_64 libcom_err-1.41.12-14.el6.x86_64
libselinux-2.0.94-5.3.el6_4.1.x86_64 libunistring-0.9.3-5.el6.x86_64
mysql-libs-5.1.69-1.el6_4.x86_64
nss-softokn-freebl-3.12.9-11.el6.x86_64
openssl-1.0.0-27.el6_4.2.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0 qm_detach_free (qm=0x7ffff722b010, p=<value optimized out>)
at mem/q_malloc.c:269
#1 qm_free (qm=0x7ffff722b010, p=<value optimized out>) at
mem/q_malloc.c:511
#2 0x00000000005b7927 in yyparse () at cfg.y:2699
#3 0x000000000046b8e3 in main (argc=1, argv=0x7fffffffe548) at
main.c:2083
This happens with Kamailio git master built about 20 minutes ago.
Regards,
Peter
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Camille Oudot (coudot)
Attached to Project - sip-router
Summary - Crash in ims_registrar_scscf caused by log
Task Type - Bug Report
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - When processing a SAA answer for an unreg user, a log instruction modules/ims_registrar_scscf/cxdx_sar.c makes kamailio crash.
The pointer check in the attached patch prevents the segfault.
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=305
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Camille Oudot (coudot)
Attached to Project - sip-router
Summary - Segfault in ims_auth's ims_proxy_authenticate function when IMPU != IMPI
Task Type - Bug Report
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Medium
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - If a client sends an INVITE with no Proxy-Authorization header, and this request is challenged using ims_proxy_authenticate(), ims_auth module tries to use the address in From header as IMPI for the MAR diameter request.
When IMPI != IMPU, the HSS replies with an error code since the user cannot be found. In that case the SIP-Auth-Data-Item AVP isn't found in the MAA answer, and avlist is never initialized in async_cdp_callback().
Adding a safety check in the "done" section prevented the crash to occur (see attached patch).
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=304
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#303 - Crash in topoh module when To header missing
User who did this - Michel de Weerd (mweerd)
----------
The configuration from http://github.com/flowroute/kamailio/blob/master/examples/pcscf/kamailio.cfg is being used with additionally the topoh module loaded
loadmodule "topoh"
modparam("topoh", "mask_key", "Secrets")
modparam("topoh", "mask_ip", "10.168.56.252")
The topoh module is being loaded after the sanity check module has been loaded.
I have also test with different values for default_checks
modparam("sanity", "default_checks", 4095)
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=303#comment916
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#303 - Crash in topoh module when To header missing
User who did this - Daniel-Constantin Mierla (miconda)
----------
Have you loaded sanity module and set the default checks for required headers? Topoh binds to that module for making sip message checks.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=303#comment915
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Michel de Weerd (mweerd)
Attached to Project - sip-router
Summary - Crash in topoh module when To header missing
Task Type - Bug Report
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - Linux
Severity - Medium
Priority - Normal
Reported Version - 4.0
Due in Version - Undecided
Due Date - Undecided
Details - Testing with tool https://www.ee.oulu.fi/research/ouspg/PROTOS_Test-Suite_c07-sip reveals a problem in the topoh module, testscenario 1243
java -jar c07-sip-r2.jar -lport 10000 -dport 4060 -touri test(a)10.38.102.50 -start 1243 -stop 1243
When the To header is mising in the request the topoh crashes with the following backtrace:
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff8867000
Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio.pid -m 64 -M 4 -u kamailio -g kam'.
Program terminated with signal 11, Segmentation fault.
#0 0x00002b58c950870b in th_msg_received (data=<value optimized out>) at topoh_mod.c:262
262 if(dialog)
(gdb) bt
#0 0x00002b58c950870b in th_msg_received (data=<value optimized out>) at topoh_mod.c:262
#1 0x00000000004a6de4 in receive_msg ()
#2 0x000000000053e22b in udp_rcv_loop ()
#3 0x0000000000470af5 in main_loop ()
#4 0x0000000000474898 in main ()
The SIP request to kamailio contains the following SIP data:
INVITE sip:test@10.38.102.50 SIP/2.0
Via: SIP/2.0/UDP mdw:10000;branch=z9hG4bK000012430
From: 1243 <sip:user@mdw>;tag=1243
: Receiver <sip:test@10.38.102.50>
Call-ID: 0@mdw
CSeq: 1 INVITE
Contact: 1243 <sip:user@mdw>
Expires: 1200
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 122
v=0
o=1243 1243 1243 IN IP4 mdw
s=Session SDP
c=IN IP4 127.0.1.1
t=0 0
m=audio 9876 RTP/AVP 0
a=rtpmap:0 PCMU/8000
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=303
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#299 - modules/debugger: be able to log assign actions
User who did this - Víctor Seva (linuxmaniac)
----------
Patch reworked.
- _dbg_pvcache is reserved only if log_assign is 1
- no pvid field on dbg_pvcache_t
- used spec pointer value to hash
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment914
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#299 - modules/debugger: be able to log assign actions
User who did this - Daniel-Constantin Mierla (miconda)
----------
dbg_enable_log_assign() is wrong, because _dbg_pvcache is not-NULL always as you declared it in this version. Perhaps you have to add have more values for log_assign, like:
- 0 - completely disabled
- 1 - feature enabled, but not active
- 2 - feature enabled and active (could be 3 if you want to use bits)
It opens the way to make it changeable at runtime via rpc (only to make it active/inactive), if set to 0, should not be changeable.
The dbg pv cache should not keep pvid field, the pointer is long and can be compared directly. For strings makes sense to have an integer id, as strcmp() can be lengthy operation. Here just go and compare the pointers, values are taken in one bus fetch.
Also, you do the hash function over the content of pvspec, not the pointer value, which you try to find. Although it may work, is not that natural. The hash should be over the value that is searched.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment913
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.