Hello,
I am proposing to switch the development version to target 6.0.x as next
major series. I have pushed a new mode for receiving UDP traffic via a
multi-threaded process, useful when having to deal with a rather large
set of UDP sockets. While it is built reusing some existing components
(async workers group and sworker design), it changes substantially how
the core can deal with the sip traffic. Similar approach might be added
for TCP (TLS), but right now this transport is already using a single
pool of works for all sockets, so it doesn't faces the same issues as
with UDP for large number of sockets.
The old way of handling UDP traffic is not removed, it is still the
default, the new one needs testing, of course.
Furthermore, the socket global parameter (which is an alternative to
listen) can now take a port range to the bind field, simplifying the
config when Kamailio has to listen on large number on consecutive ports.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
See <https://kamailio.sipwise.com/job/kamailio57-binaries/architecture=amd64,dis…>
Changes:
------------------------------------------
[...truncated 10.24 KiB...]
+ '[' -r /etc/jenkins/pbuilderrc ']'
+ echo '*** Adding content of /etc/jenkins/pbuilderrc to pbuilder configfile ***'
*** Adding content of /etc/jenkins/pbuilderrc to pbuilder configfile ***
+ echo '# /etc/jenkins/pbuilderrc added via jenkins-debian-glue:'
+ cat /etc/jenkins/pbuilderrc
+ '[' -n '' ']'
+ echo '*** COMPONENTS is not set, checking whether we need to enable Ubuntu workaround ***'
*** COMPONENTS is not set, checking whether we need to enable Ubuntu workaround ***
+ '[' -n /etc/jenkins/pbuilderrc ']'
+ echo '*** PBUILDER_CONFIG is set, not overwriting COMPONENTS for Ubuntu workaround ***'
*** PBUILDER_CONFIG is set, not overwriting COMPONENTS for Ubuntu workaround ***
+ echo '*** NOTE: If you want to build for Ubuntu make sure COMPONENTS also includes '\''universe'\'' ***'
*** NOTE: If you want to build for Ubuntu make sure COMPONENTS also includes 'universe' ***
+ grep -q Ubuntu
+ lsb_release --id
+ echo '*** Listing pbuilder configuration file as reference: ***'
*** Listing pbuilder configuration file as reference: ***
+ cat /tmp/tmp.nNF2yQ8N6s
# pbuilder config file generated by jenkins-debian-glue on Wed May 8 10:36:13 UTC 2024
ADDITIONAL_BUILDRESULTS+=('../*lintian.txt')
EXTRAPACKAGES="$EXTRAPACKAGES eatmydata"
export LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}libeatmydata.so"
# builtin support available with pbuilder >=0.225 (otherwise ignored):
EATMYDATA=yes
# /etc/jenkins/pbuilderrc added via jenkins-debian-glue:
# distribution specific configuration
case "$distribution" in
xenial|bionic|focal|jammy)
MIRRORSITE="http://archive.ubuntu.com/ubuntu/"
# we need key id 40976EAF437D05B5
DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg")
# cowdancer is in universe
COMPONENTS="main universe"
# security and updates
OTHERMIRROR="deb http://archive.ubuntu.com/ubuntu/ ${distribution}-updates main universe|deb-src http://security.ubuntu.com/ubuntu ${distribution}-security main universe"
# package install speedup
EXTRAPACKAGES="eatmydata"
export LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}libeatmydata.so"
;;
trusty)
# lacks eatmydata package, so explicitly configure it
MIRRORSITE="http://archive.ubuntu.com/ubuntu/"
# we need key id 40976EAF437D05B5
DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg")
# cowdancer is in universe
COMPONENTS="main universe"
# security and updates
OTHERMIRROR="deb http://archive.ubuntu.com/ubuntu/ ${distribution}-updates main universe|deb-src http://security.ubuntu.com/ubuntu ${distribution}-security main universe"
# ensure it's unset
unset LD_PRELOAD
;;
precise)
# lacks eatmydata package, so explicitly configure it
# also EOL nowadays, so need other mirror
MIRRORSITE="http://old-releases.ubuntu.com/ubuntu/"
# we need key id 40976EAF437D05B5
DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg")
# cowdancer is in universe
COMPONENTS="main universe"
# security and updates
OTHERMIRROR="deb http://old-releases.ubuntu.com/ubuntu/ ${distribution}-updates main universe|deb-src http://old-releases.ubuntu.com/ubuntu ${distribution}-security main universe"
# ensure it's unset
unset LD_PRELOAD
;;
wheezy)
# nowadays resides on archive
MIRRORSITE="http://archive.debian.org/debian/"
# we need key id 6FB2A1C265FFB764
DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/debian-archive-removed-keys.gpg")
# package install speedup
EXTRAPACKAGES="eatmydata"
export LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}libeatmydata.so"
;;
jessie)
# nowadays resides on archive
MIRRORSITE="http://archive.debian.org/debian/"
# security and updates
OTHERMIRROR="deb http://archive.debian.org/debian-security ${distribution}/updates main"
# we need key id CBF8D6FD518E17E1
DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/debian-archive-removed-keys.gpg")
# support bootstrapping archived repository with expired GPG key
APTGETOPT=("${APTGETOPT[@]}" "-o Acquire::Check-Valid-Until=false" "-o APT::Get::AllowUnauthenticated=true" --force-yes)
# package install speedup
EXTRAPACKAGES="eatmydata"
export LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}libeatmydata.so"
;;
stretch)
# nowadays resides on archive
MIRRORSITE="http://archive.debian.org/debian/"
# archived security repository
OTHERMIRROR="deb http://archive.debian.org/debian-security ${distribution}/updates main"
# package install speedup
EXTRAPACKAGES="eatmydata"
export LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}libeatmydata.so"
;;
buster)
MIRRORSITE="http://deb.debian.org/debian"
# security and updates
OTHERMIRROR="deb http://security.debian.org/debian-security ${distribution}/updates main"
# package install speedup
EXTRAPACKAGES="eatmydata"
export LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}libeatmydata.so"
;;
bullseye|bookworm)
MIRRORSITE="http://deb.debian.org/debian"
# security and updates
OTHERMIRROR="deb http://security.debian.org/debian-security ${distribution}-security main"
# package install speedup
EXTRAPACKAGES="eatmydata"
export LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}libeatmydata.so"
;;
*)
MIRRORSITE="http://deb.debian.org/debian"
# package install speedup
EXTRAPACKAGES="eatmydata"
export LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}libeatmydata.so"
;;
esac
+ ls '/var/cache/pbuilder/base-bullseye-amd64.cow.building.*'
+ ls '/run/lock/bullseye-amd64.update*'
+ flock --nonblock 9
+ touch /run/lock/bullseye-amd64.update.18075
+ '[' '!' -d /var/cache/pbuilder/base-bullseye-amd64.cow ']'
+ '[' '' = true ']'
+ echo '*** Updating cowbuilder cow base ***'
*** Updating cowbuilder cow base ***
+ sudo DIST=bullseye ARCH=amd64 cowbuilder --update --basepath /var/cache/pbuilder/base-bullseye-amd64.cow --configfile=/tmp/tmp.nNF2yQ8N6s
I: Copying COW directory
I: forking: rm -rf /var/cache/pbuilder/build/cow.18103
I: forking: cp -al /var/cache/pbuilder/base-bullseye-amd64.cow /var/cache/pbuilder/build/cow.18103
I: removed stale ilistfile /var/cache/pbuilder/build/cow.18103/.ilist
I: Invoking pbuilder
I: forking: pbuilder update --configfile /tmp/tmp.nNF2yQ8N6s --buildplace /var/cache/pbuilder/build/cow.18103 --mirror http://deb.debian.org/debian --distribution sid --extrapackages eatmydata --no-targz --internal-chrootexec 'chroot /var/cache/pbuilder/build/cow.18103 cow-shell'
W: /root/.pbuilderrc does not exist
I: Running in no-targz mode
I: Current time: Wed May 8 10:36:13 UTC 2024
I: pbuilder-time-stamp: 1715164573
I: copying local configuration
W: No local /etc/mailname to copy, relying on /var/cache/pbuilder/build/cow.18103/etc/mailname to be correct
W: --override-config is not set; not updating apt.conf Read the manpage for details.
I: mounting /proc filesystem
I: mounting /sys filesystem
I: creating /{dev,run}/shm
I: mounting /dev/pts filesystem
I: redirecting /dev/ptmx to /dev/pts/ptmx
I: policy-rc.d already exists
I: using eatmydata during job
I: Refreshing the base.tgz
I: upgrading packages
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Reading package lists...
I: Obtaining the cached apt archive contents
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
FATAL: command execution failed
java.io.EOFException
at java.base/java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2911)
at java.base/java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3406)
at java.base/java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:932)
at java.base/java.io.ObjectInputStream.<init>(ObjectInputStream.java:375)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:50)
at hudson.remoting.Command.readFrom(Command.java:142)
at hudson.remoting.Command.readFrom(Command.java:128)
at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:61)
Caused: java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:75)
Caused: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@46b3467e:EC2 (ec2-eu-west-1) - jenkins-debian-glue-slave bullseye (i-07f4d2bdcc03f3a7c)": Remote call on EC2 (ec2-eu-west-1) - jenkins-debian-glue-slave bullseye (i-07f4d2bdcc03f3a7c) failed. The channel is closing down or has closed down
at hudson.remoting.Channel.call(Channel.java:996)
at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:285)
at com.sun.proxy.$Proxy135.isAlive(Unknown Source)
at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1212)
at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:1204)
at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:195)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:145)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:92)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:164)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
at hudson.model.Run.execute(Run.java:1895)
at hudson.matrix.MatrixRun.run(MatrixRun.java:153)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
FATAL: Unable to delete script file /tmp/jenkins2733275163131865227.sh
java.io.EOFException
at java.base/java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2911)
at java.base/java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3406)
at java.base/java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:932)
at java.base/java.io.ObjectInputStream.<init>(ObjectInputStream.java:375)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:50)
at hudson.remoting.Command.readFrom(Command.java:142)
at hudson.remoting.Command.readFrom(Command.java:128)
at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:61)
Caused: java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:75)
Caused: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@46b3467e:EC2 (ec2-eu-west-1) - jenkins-debian-glue-slave bullseye (i-07f4d2bdcc03f3a7c)": Remote call on EC2 (ec2-eu-west-1) - jenkins-debian-glue-slave bullseye (i-07f4d2bdcc03f3a7c) failed. The channel is closing down or has closed down
at hudson.remoting.Channel.call(Channel.java:996)
at hudson.FilePath.act(FilePath.java:1230)
at hudson.FilePath.act(FilePath.java:1219)
at hudson.FilePath.delete(FilePath.java:1766)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:163)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:92)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:164)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
at hudson.model.Run.execute(Run.java:1895)
at hudson.matrix.MatrixRun.run(MatrixRun.java:153)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Build step 'Execute shell' marked build as failure
FATAL: Channel "hudson.remoting.Channel@46b3467e:EC2 (ec2-eu-west-1) - jenkins-debian-glue-slave bullseye (i-07f4d2bdcc03f3a7c)": Remote call on EC2 (ec2-eu-west-1) - jenkins-debian-glue-slave bullseye (i-07f4d2bdcc03f3a7c) failed. The channel is closing down or has closed down
java.io.EOFException
at java.base/java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2911)
at java.base/java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3406)
at java.base/java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:932)
at java.base/java.io.ObjectInputStream.<init>(ObjectInputStream.java:375)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:50)
at hudson.remoting.Command.readFrom(Command.java:142)
at hudson.remoting.Command.readFrom(Command.java:128)
at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:61)
Caused: java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:75)
Caused: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@46b3467e:EC2 (ec2-eu-west-1) - jenkins-debian-glue-slave bullseye (i-07f4d2bdcc03f3a7c)": Remote call on EC2 (ec2-eu-west-1) - jenkins-debian-glue-slave bullseye (i-07f4d2bdcc03f3a7c) failed. The channel is closing down or has closed down
at hudson.remoting.Channel.call(Channel.java:996)
at hudson.Launcher$RemoteLauncher.kill(Launcher.java:1147)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:538)
at hudson.model.Run.execute(Run.java:1895)
at hudson.matrix.MatrixRun.run(MatrixRun.java:153)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Archiving artifacts
Agent went offline during the build
ERROR: Connection was broken
Build step 'Archive the artifacts' marked build as failure
ERROR: Step ‘Publish TAP Results’ failed: no workspace for kamailio57-binaries/architecture=amd64,distribution=bullseye #6
ERROR: Step ‘Publish JUnit test result report’ failed: no workspace for kamailio57-binaries/architecture=amd64,distribution=bullseye #6
Hello,
Kamailio SIP Server v5.7.5 stable release is out.
This is a maintenance release of the latest stable branch, 5.7, that
includes fixes since the release of v5.7.4. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.7.x. Deployments running previous v5.7.x
versions are strongly recommended to be upgraded to v5.7.5.
For more details about version 5.7.5 (including links and guidelines to
download the tarball or from GIT repository), visit:
* https://www.kamailio.org/w/2024/05/kamailio-v5-7-5-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Note that 5.7.x is currently the previous stable release series, the
latest is 5.8.x and v5.8.1 was released on April 3, 2024.
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Hi,
I am trying to run a load test of 1000 messages/sec with 3gpp-SMS
#### Kamailio details
> Kamailio version : 5.7.4 (downloaded from deb repo)
> Ruuning under Ubuntu 18.04.6 LT
> PKG Mem 32 MB
> SHM Mem 1024 MB
When I run the load for around half an hour the PKG mem usgae keeps on increasing and finally after the mentioned (half an hour) time Kamailio start putting Error Logs that : **_could not allocate private memory from pkg pool_**
I referred to https://www.kamailio.org/wiki/tutorials/troubleshooting/memory, and when I use **kamcmd pkg.stats** I see blow out put for the udp receivers :
```
{
entry: 1
pid: 11070
rank: 1
used: 3652840
free: 0
real_used: 16777216
total_size: 16777216
total_frags: 0
desc: udp receiver child=0 sock=192.168.136.151:5060
}
{
entry: 2
pid: 11071
rank: 2
used: 3652840
free: 0
real_used: 16777216
total_size: 16777216
total_frags: 0
desc: udp receiver child=1 sock=192.168.136.151:5060
}
{
entry: 3
pid: 11072
rank: 3
used: 3652912
free: 0
real_used: 16777216
total_size: 16777216
total_frags: 0
desc: udp receiver child=2 sock=192.168.136.151:5060
}
```
On further enabling **memdbg** for individual packets, I could see that for each message processing :
204 Malloc operations , 184 free operations .
_Seems to be a memory leak condition_ . Am i missing something here ?
On matching the allocated and freed address, I could find below source files where address is allocated but not freed :
```
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:450]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 48) called from core: core/route.c: route_add(124)
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:540]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 48) returns address 0x7fc29f2a4188
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:450]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 48) called from core: core/route.c: route_add(124)
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:540]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 48) returns address 0x7fc29f2a4200
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:450]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 48) called from core: core/route.c: route_add(124)
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:540]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 48) returns address 0x7fc29f2a4278
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:450]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 48) called from core: core/route.c: route_add(124)
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:540]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 48) returns address 0x7fc29f2a42f0
```
```
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:540]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 64) returns address 0x7fc29f2a44f8
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:450]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 64) called from core: core/parser/msg_parser.c: parse_heade
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:540]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 64) returns address 0x7fc29f2b2df8
May 6 15:23:48 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[14646]: INFO: <core> [core/mem/f_malloc.c:450]: fm_malloc(): fm_malloc(0x7fc29f1fb010, 64) called from core: core/parser/msg_parser.c: parse_heade
```
Need guidance support here how to avoid this memory leak condition and how to get more details to aid further investigation.
Thank you!
Regards
Paresh Panda
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3841
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3841(a)github.com>
Hello,
I am considering to release Kamailio v5.7.5 (out of branch 5.7) on
Wednesday, May 8, 2024. If anyone is aware of issues not yet on the bug
tracker, report them there asap in order to have a better chance to be
fixed.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Module: kamailio
Branch: 5.8
Commit: c3f424bd6c0f8b9a2557cd58a3e3f5ac586d8c99
URL: https://github.com/kamailio/kamailio/commit/c3f424bd6c0f8b9a2557cd58a3e3f5a…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2024-05-07T19:46:19+02:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/tcpops/README
---
Diff: https://github.com/kamailio/kamailio/commit/c3f424bd6c0f8b9a2557cd58a3e3f5a…
Patch: https://github.com/kamailio/kamailio/commit/c3f424bd6c0f8b9a2557cd58a3e3f5a…
---
diff --git a/src/modules/tcpops/README b/src/modules/tcpops/README
index bbebe20ffb3..1897be96e1b 100644
--- a/src/modules/tcpops/README
+++ b/src/modules/tcpops/README
@@ -437,6 +437,14 @@ event_route[tcp:closed] {
Whether these routes are always called, never, or on a per socket basis
is controlled by the closed_event parameter.
+ Note that the event routes can be executed by TCP main process, which
+ manages the TCP connections but does not hande the SIP traffic over
+ them. It is very important not do do any time consuming operations
+ inside the event routes. Also, many resources might not be available in
+ the TCP main process (e.g., database connections), consider using async
+ module with async_task_data(...) or async_task_group_data() functions
+ for delegating task execution to async workers.
+
4.1. tcp:closed
Called for each "normal" TCP socket closure by the other side
Module: kamailio
Branch: master
Commit: 29910ecc8f27cf70aa4490f8ed5188199ad8e612
URL: https://github.com/kamailio/kamailio/commit/29910ecc8f27cf70aa4490f8ed51881…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2024-05-07T19:46:10+02:00
modules: readme files regenerated - tcpops ... [skip ci]
---
Modified: src/modules/tcpops/README
---
Diff: https://github.com/kamailio/kamailio/commit/29910ecc8f27cf70aa4490f8ed51881…
Patch: https://github.com/kamailio/kamailio/commit/29910ecc8f27cf70aa4490f8ed51881…
---
diff --git a/src/modules/tcpops/README b/src/modules/tcpops/README
index bbebe20ffb3..1897be96e1b 100644
--- a/src/modules/tcpops/README
+++ b/src/modules/tcpops/README
@@ -437,6 +437,14 @@ event_route[tcp:closed] {
Whether these routes are always called, never, or on a per socket basis
is controlled by the closed_event parameter.
+ Note that the event routes can be executed by TCP main process, which
+ manages the TCP connections but does not hande the SIP traffic over
+ them. It is very important not do do any time consuming operations
+ inside the event routes. Also, many resources might not be available in
+ the TCP main process (e.g., database connections), consider using async
+ module with async_task_data(...) or async_task_group_data() functions
+ for delegating task execution to async workers.
+
4.1. tcp:closed
Called for each "normal" TCP socket closure by the other side
Module: kamailio
Branch: 5.8
Commit: 383a81bb9d81e06ab9da99cdaa3def3b63028040
URL: https://github.com/kamailio/kamailio/commit/383a81bb9d81e06ab9da99cdaa3def3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T19:34:35+02:00
tcpops: note about execution of event routes by TCP main process
(cherry picked from commit be9af338e3afdab1045cdd7c30a72a9ecddcb680)
---
Modified: src/modules/tcpops/doc/eventroutes.xml
---
Diff: https://github.com/kamailio/kamailio/commit/383a81bb9d81e06ab9da99cdaa3def3…
Patch: https://github.com/kamailio/kamailio/commit/383a81bb9d81e06ab9da99cdaa3def3…
---
diff --git a/src/modules/tcpops/doc/eventroutes.xml b/src/modules/tcpops/doc/eventroutes.xml
index ff05df24cdc..1166d366f0c 100644
--- a/src/modules/tcpops/doc/eventroutes.xml
+++ b/src/modules/tcpops/doc/eventroutes.xml
@@ -31,6 +31,16 @@
<emphasis>closed_event</emphasis>
parameter.
</para>
+ <para>
+ Note that the event routes can be executed by TCP main process,
+ which manages the TCP connections but does not hande the SIP traffic
+ over them. It is very important not do do any time consuming
+ operations inside the event routes. Also, many resources might not
+ be available in the TCP main process (e.g., database connections),
+ consider using async module with async_task_data(...) or
+ async_task_group_data() functions for delegating task execution
+ to async workers.
+ </para>
<section>
<title>
<function moreinfo="none">tcp:closed</function>
@@ -77,4 +87,4 @@ event_route[tcp:reset] {
</programlisting>
</para>
</section>
-</section>
\ No newline at end of file
+</section>
Module: kamailio
Branch: master
Commit: be9af338e3afdab1045cdd7c30a72a9ecddcb680
URL: https://github.com/kamailio/kamailio/commit/be9af338e3afdab1045cdd7c30a72a9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T19:32:39+02:00
tcpops: note about execution of event routes by TCP main process
---
Modified: src/modules/tcpops/doc/eventroutes.xml
---
Diff: https://github.com/kamailio/kamailio/commit/be9af338e3afdab1045cdd7c30a72a9…
Patch: https://github.com/kamailio/kamailio/commit/be9af338e3afdab1045cdd7c30a72a9…
---
diff --git a/src/modules/tcpops/doc/eventroutes.xml b/src/modules/tcpops/doc/eventroutes.xml
index ff05df24cdc..1166d366f0c 100644
--- a/src/modules/tcpops/doc/eventroutes.xml
+++ b/src/modules/tcpops/doc/eventroutes.xml
@@ -31,6 +31,16 @@
<emphasis>closed_event</emphasis>
parameter.
</para>
+ <para>
+ Note that the event routes can be executed by TCP main process,
+ which manages the TCP connections but does not hande the SIP traffic
+ over them. It is very important not do do any time consuming
+ operations inside the event routes. Also, many resources might not
+ be available in the TCP main process (e.g., database connections),
+ consider using async module with async_task_data(...) or
+ async_task_group_data() functions for delegating task execution
+ to async workers.
+ </para>
<section>
<title>
<function moreinfo="none">tcp:closed</function>
@@ -77,4 +87,4 @@ event_route[tcp:reset] {
</programlisting>
</para>
</section>
-</section>
\ No newline at end of file
+</section>
### Description
I noticed that sql_query does not work (using latest 5.8 on Debian 12) when called from `tcp:closed` event_route:
```
event_route [tcp:closed] { # Handle TCP connection close
# Delete possible leftover registration
if ($conid)
sql_query("sip_proxy_cache", "DELETE FROM location WHERE server_id=0 AND connection_id=$conid", "result");
}
```
The query produces errors:
```
2024-05-07T11:30:14.785915+03:00 siika /usr/bin/sip-proxy[2848078]: CRITICAL: sqlops
[sqlops.c:213]: sql_check_connection(): no database handle with reconnect disabled
2024-05-07T11:30:14.785978+03:00 siika /usr/bin/sip-proxy[2848078]: ERROR: sqlops
[sqlops.c:232]: sql_query(): invalid connection to database
2024-05-07T11:30:14.786013+03:00 siika /usr/bin/sip-proxy[2848078]: ERROR: sqlops
[sqlops.c:237]: sql_query(): with query [DELETE FROM location WHERE server_id=0 AND
connection_id=7]
```
I added the last debug message in order to find out where the error comes from.
The same query works fine when executed from regular route and earlier (but don't remember when), the same query worked fine also from `tcp:closed` event_route.
This may be related to https://github.com/kamailio/kamailio/issues/3768.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3843
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3843(a)github.com>
Module: kamailio
Branch: 5.7
Commit: ac56db7fab9d1157e89a6daf81915e3058f7178c
URL: https://github.com/kamailio/kamailio/commit/ac56db7fab9d1157e89a6daf81915e3…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:30:16+02:00
uid_auth_db: spelling fix in documentation
(cherry picked from commit 9f28450312749dfbc021a8cbc23472c8a39d3fef)
(cherry picked from commit b2352bc1c6f3eff3aba85a087107f4ca29cedc22)
---
Modified: src/modules/uid_auth_db/auth_db.xml
---
Diff: https://github.com/kamailio/kamailio/commit/ac56db7fab9d1157e89a6daf81915e3…
Patch: https://github.com/kamailio/kamailio/commit/ac56db7fab9d1157e89a6daf81915e3…
---
diff --git a/src/modules/uid_auth_db/auth_db.xml b/src/modules/uid_auth_db/auth_db.xml
index 25849663c54..99e5eb7c594 100644
--- a/src/modules/uid_auth_db/auth_db.xml
+++ b/src/modules/uid_auth_db/auth_db.xml
@@ -66,7 +66,7 @@
the <serdoc:module>textops</serdoc:module> module.
</para>
<para>
- The reason for the failure can be determined from the interger
+ The reason for the failure can be determined from the integer
return value stored in the <varname>$?</varname> attribute.
A value of <literal>-3</literal> indicates that it was impossible
to retrieve credentials from the request. A 400 (Bad Request)
- URL: https://github.com/kamailio/kamailio/commit/0bf03aa1987b9cff2fc0d776605620e…
Author: Henning Westerholt <hw(a)gilawa.com>
Date: 2024-05-07T17:05:58+02:00
core: spelling fix in comment and log message
(cherry picked from commit db176a4918c0b500f5f051cad16fd8d442450ab7)
- URL: https://github.com/kamailio/kamailio/commit/b2352bc1c6f3eff3aba85a087107f4c…
Author: Henning Westerholt <hw(a)gilawa.com>
Date: 2024-05-07T17:06:04+02:00
uid_auth_db: spelling fix in documentation
(cherry picked from commit 9f28450312749dfbc021a8cbc23472c8a39d3fef)
- URL: https://github.com/kamailio/kamailio/commit/1dd7c4038eb9a0c7eec506994a58a56…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:06:14+02:00
ims_usrloc_scscf: reformat exported structures
(cherry picked from commit 15d859e1e96552fca2708cf56047021beae29711)
- URL: https://github.com/kamailio/kamailio/commit/620aa3f2a0faf3a4d54908bac0aa3ff…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:06:20+02:00
ims_usrloc_scscf: enclose examples in dotted lines for better visibility
(cherry picked from commit 8506a6fe781e6e0b0b1418f4087db50480db6b57)
- URL: https://github.com/kamailio/kamailio/commit/89343b6031f186c59ecd6707109bd02…
Author: Ostap <ostap_mal(a)hotmail.com>
Date: 2024-05-07T17:06:39+02:00
modules/statsd: ensure statsd failures do not stop execution (#3819)
* modules/statsd: avoid stopping flow when sending statsd metric fails
Currently statsd functions return bool: `true` or `false` depending when
the function succeeds or fails respectively.
This value gets implicitly converted to `int`: `true` -> `1`, `false` ->
`0`.
For Kamailio `1` means succesfull execution, but `0` means to stop
processing messages, which is not what we want as statsd should not impact
flow execution. Instead we want to return `-1` which signifies error,
but the flow continues.
* modules/statsd: do not fail module initilization when statsd init fails
statsd_init executes `statsd_connect` which tries to connect to statd
server.
If connection fails then kamailio fails to start.
This is not the desired behaviour as:
1. Kamailio should continue working even if statsd server is down,
metrics should not impact runtime.
2. `statsd_connect` is also re-executed each time we try to send the metric https://github.com/salemove/kamailio/blame/master/src/modules/statsd/lib_st…,
so it's initial result is not essential.
Note, that before 5.8 the result of init was already ignored due to
implicit conversion of `false` to `0`
until after
https://github.com/kamailio/kamailio/commit/0186246fce8f0e4bb46b30c05174983…
was introduced (which could be considered a breaking change even if it
seemingly fixes a bug in conversion).
(cherry picked from commit 5e66ba23851f115bcb88d7e3f71f78ab33fc1e30)
- URL: https://github.com/kamailio/kamailio/commit/8af0605ade36566597ff691a2adc1e5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:06:49+02:00
ims_registrar_scscf: init variable to fix analyzer warning
(cherry picked from commit 8558947034f16b162c15eda39d18f5f5df4ef562)
- URL: https://github.com/kamailio/kamailio/commit/1387c32dfa601496c38f9c10d554c49…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:07:01+02:00
ims_ipsec_pcscf: decouple IPSEC_FORWARD_USEVIA and IPSEC_TCPPORT_UEC for requests
- both flags should be avaible for use at the same time in
ipsec_forward()
- for request IPSEC_FORWARD_USEVIA gets the protocol from the next hop
address
(cherry picked from commit ab261540d656ed456bac8876f77f940457a9baf6)
- URL: https://github.com/kamailio/kamailio/commit/7e202ec38593462559e81db7b0f97e4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:07:11+02:00
ims_ipsec_pcscf: docs updated for ipsec_forward() flags
(cherry picked from commit 575b17d23cd5fa060f775bc56b42c735048bc849)
- URL: https://github.com/kamailio/kamailio/commit/9493dc0c895d1dde50239c903fd976c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:07:18+02:00
ims_ipsec_pcscf: updated comments for ipsec_forward() flags
(cherry picked from commit f7f93828993b5975dfe5f26ad63ba6c489aa69f7)
- URL: https://github.com/kamailio/kamailio/commit/00f51e28875c209cbf25a47c96e60c9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:07:24+02:00
ims_ipsec_pcscf: handle tls for replies
(cherry picked from commit 48dab490965fa7f2f7200d95edd7dbb1407b2536)
- URL: https://github.com/kamailio/kamailio/commit/4aa0920b2e573661959d5c9149ee041…
Author: Alexander Couzens <lynxis(a)fe80.eu>
Date: 2024-05-07T17:07:38+02:00
ims_registrar_scscf: fix uninitialized arguments in save()
The script "save" command can be used with different arguments:
2, 3 and 4.
But internally for all save() calls the exact same function is use, w_save().
When calling save("PRE_REG_SAR_REPLY","location"); as given by the examples,
kamailio will call w_save().
Because the command code will cast the function pointer, the w_save() function
is called with 2 uninitialized arguments *mode, *c_flags.
mode is unused, seems a legacy argument. c_flags is referenced resulting in a crash
if not null.
Use separate wrapper functions to handle different argument number.
Fixes: a627c9a04a74 ("ims_registrar_scscf: Extend save() with optional flag")
(cherry picked from commit 20a75004d53a06da0f22b11804a4d83496ad8919)
- URL: https://github.com/kamailio/kamailio/commit/8bb9f0601eb94597f3bfab4ede97971…
Author: Alexander Couzens <lynxis(a)fe80.eu>
Date: 2024-05-07T17:08:03+02:00
ims_registrar_scscf: refactor save_fixup4
Rename function to match argument number.
Use assign_save_fixup3_async instead of the code copy
(cherry picked from commit 82a6d7ea6edbaca60879a38c5e74e40920e89342)
- URL: https://github.com/kamailio/kamailio/commit/569662043b656063be97d0ea0e22dd8…
Author: Alexander Couzens <lynxis(a)fe80.eu>
Date: 2024-05-07T17:08:11+02:00
ims_registrar_scscf: fix typo in function name uint_fixup
(cherry picked from commit 6f908f05d4691abcb1b3a745048d3cc2a9996676)
- URL: https://github.com/kamailio/kamailio/commit/4b3620d0f0d7d636bf1d9e4c2b19bf5…
Author: Alexander Couzens <lynxis(a)fe80.eu>
Date: 2024-05-07T17:08:22+02:00
ims_registrar_scscf: free_uint_fixup: fix memleak/freeing the wrong parameter
The free_uint_fixup() freed the wrong parameter in the past.
(cherry picked from commit c3e6c1edc7531406208efe2965243e6e81506127)
- URL: https://github.com/kamailio/kamailio/commit/4e98a4ae06ec0bbff408af211680c97…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:08:32+02:00
ims_ipsec_pcscf: cascade on options to get the uri for fill_contact()
(cherry picked from commit 60d2ab6464657abf38136a771c297c6f5536e27a)
- URL: https://github.com/kamailio/kamailio/commit/3aac0c7379577480fb09902bfb31b9a…
Author: Jannik <40364587+volkland(a)users.noreply.github.com>
Date: 2024-05-07T17:08:41+02:00
sipcapture: docs - fix default value for parameter
(cherry picked from commit 265c948286f2df5136179c95fbb1d7f1255e4c71)
- URL: https://github.com/kamailio/kamailio/commit/fc54fdcd67e244ad075c54b5f24bb64…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:08:52+02:00
tm: free new buffer on drop for local requests
- GH #3403
(cherry picked from commit ee06666c43d96029315dae7618e10d381265a85a)
- URL: https://github.com/kamailio/kamailio/commit/f9ca6854d88e4fcc161e1083a953f47…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:08:58+02:00
tm: cb flag to mark local uac on request drop
(cherry picked from commit f5da773c5fa29edbf9d0e65a83a62f495928ddec)
- URL: https://github.com/kamailio/kamailio/commit/a86d7d2bad119fc4cccf5c19719b445…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:09:06+02:00
tm: cb_flags made unsigned for uac_req
(cherry picked from commit ebd1c6c75a1b832ce85d576aad134b99d47b5738)
- URL: https://github.com/kamailio/kamailio/commit/e54b03fc41bc55486430b09d9a4839b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:09:15+02:00
pv_headers: print also the new TMCB_LOCAL_REQUEST_DROP in debug function
(cherry picked from commit 68624c2da093ab789d4e8d35df65ef1bce024bca)
- URL: https://github.com/kamailio/kamailio/commit/965a02ba4aca9283e4f43f8153ebeb8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:09:25+02:00
presence: check if the local notify was dropped in event route
- free tm cb parameter on drop
- related to GH #3403
(cherry picked from commit d12fc31056cb37aac347ec05f9ada7bafa5f52de)
- URL: https://github.com/kamailio/kamailio/commit/46c8e1a5b0e11162eee2c0b201bb535…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:09:39+02:00
uac: check if local requests are dropped and free the param
(cherry picked from commit 00aac8d48370fac356eecff535835d918c631cc5)
- URL: https://github.com/kamailio/kamailio/commit/244319c67a191cf1f093b2220fa1a85…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:09:49+02:00
pua: check if local requests are dropped and free the param
(cherry picked from commit 53e1a29c265df1489c9bd91deddc0719f8ca2092)
- URL: https://github.com/kamailio/kamailio/commit/5b97d29f1bbac2656eba506c7fd94b4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:10:17+02:00
core: parser/contact - add limit for max number of contacts
- defined to 256
(cherry picked from commit d6b0beb5a219ae57a62e9e7201a6ec1fe66e5a96)
- URL: https://github.com/kamailio/kamailio/commit/d75dba611808322356fc8d1ebc9f8c3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:10:25+02:00
core: parser/contact - basic validation tests for contact uri
(cherry picked from commit fc52a54370c085d6fa951da876eee99580677922)
- URL: https://github.com/kamailio/kamailio/commit/11f0cfec4d2fc6043d282cdb2258520…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:11:19+02:00
core: parse/contact: jump to error on too many contacts
(cherry picked from commit f69b22d44cb5abc803c2b58790dd33f2310c1c59)
- URL: https://github.com/kamailio/kamailio/commit/24e43d27544bdfa1acfce7ebb8b6e3b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:11:35+02:00
ctl: removed level and function names from log messages
(cherry picked from commit 65bafaffd6bcfebc508b774cfbb78120e68bb3f0)
- URL: https://github.com/kamailio/kamailio/commit/b5eb4f5ca037239f2ec1d99a16a71af…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:11:46+02:00
ctl: info log on ECONNRESET (connection reset by peer)
- not a type of error that can be controlled by kamailio
(cherry picked from commit 446c75e0e2194b6e42d768d2e3c79b5f0222905f)
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
Hello. I use uac_req_send to send registration to the asterisk pool. If some asterisk did not authorize and re-sent the 401 code, the module causes a kamailio crash
### Troubleshooting
ds_select("BACKENDS","0");
while(ds_set_dst()) {
xlog("L_DBG",">>> BACKEND du=$du\n");
$uac_req(ruri)="sip:" + $(du{uri.host});
$uac_req(furi)="sip:" + $avp(username) + "@" + $(du{uri.host});
$uac_req(turi)=$uac_req(furi);
uac_req_send();
ds_next_dst();
}
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/kamailio.cfg'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005557272803b9 in timer_list_expire (t=1180105352, h=0x7f73b30a3bb8, slow_l=0x7f73b30a73a0, slow_mark=2907) at core/timer.c:846
846 core/timer.c: No such file or directory.
(gdb) bt full
#0 0x00005557272803b9 in timer_list_expire (t=1180105352, h=0x7f73b30a3bb8, slow_l=0x7f73b30a73a0, slow_mark=2907) at core/timer.c:846
tl = 0x7f73b3a49a88
ret = 0
#1 0x00005557272809cf in timer_handler () at core/timer.c:922
saved_ticks = 1180105352
run_slow_timer = 0
i = 859
__func__ = "timer_handler"
#2 0x0000555727280f53 in timer_main () at core/timer.c:961
No locals.
#3 0x0000555726f77736 in main_loop () at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:1831
i = 6
pid = 0
si = 0x0
si_desc = "udp receiver child=5 sock=10.153.5.40:5060\000\000\020\000\000\000\003\000\000\000!\000\000\000\000\262\270\224RE&\035(\247K'WU\000\000WqA'WU\000\000\000\000\000\000\000\000\000\000c\367@'WU\000\000!\000\000\000\000\000\000\000\260\325\022\371s\177\000\000 \236.\220\375\177\000\000ݕ\024'WU\000"
nrprocs = 6
woneinit = 1
__func__ = "main_loop"
#4 0x0000555726f83d11 in main (argc=12, argv=0x7ffd902ea398) at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:3078
cfg_stream = 0x555727e12380
c = -1
r = 0
tmp = 0x7ffd902ebe36 ""
tmp_len = 0
port = 0
proto = 0
ahost = 0x0
aport = 0
options = 0x55572744e898 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 4270110361
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x7ffd902ea398
p = 0x7ffd902ea310 ""
st = {st_dev = 25, st_ino = 5514, st_nlink = 2, st_mode = 16888, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1690276408, tv_nsec = 971865637}, st_mtim = {tv_sec = 1690276408,
tv_nsec = 971865637}, st_ctim = {tv_sec = 1690276408, tv_nsec = 971865637}, __glibc_reserved = {0, 0, 0}}
tbuf = '\000' <repeats 80 times>, "\377\000\000\000\377\000\000\000\000\377\000\000\000\000\000\000", '/' <repeats 16 times>, "\230\r", '\000' <repeats 14 times>, "`", '\000' <repeats 15 times>, "\001", '\000' <repeats 144 times>...
option_index = 12
long_options = {{name = 0x55572740a2e9 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55572740b84a "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55572740f6e4 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x55572740a2ee "subst",
has_arg = 1, flag = 0x0, val = 1025}, {name = 0x55572740a2f4 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x55572740a2fd "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {name = 0x55572740a307 "server-id", has_arg = 1, flag = 0x0, val = 1028},
{name = 0x55572740a311 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x55572740a31c "modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x55572740a325 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x55572740b967 "debug",
has_arg = 1, flag = 0x0, val = 1032}, {name = 0x55572740a330 "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, {name = 0x55572740a33a "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
__func__ = "main"
(gdb) info locals
tl = 0x7f73b3a49a88
ret = 0
(gdb) list
841 in core/timer.c
(gdb)
```
```
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/kamailio.cfg'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f73f575d4d0 in free_hash_table () at /build/kamailio-5.6.4+ubuntu22.04/src/modules/tm/h_table.c:464
464 /build/kamailio-5.6.4+ubuntu22.04/src/modules/tm/h_table.c: No such file or directory.
(gdb) bt full
#0 0x00007f73f575d4d0 in free_hash_table () at /build/kamailio-5.6.4+ubuntu22.04/src/modules/tm/h_table.c:464
p_cell = 0x0
tmp_cell = 0x0
i = 64459
__func__ = "free_hash_table"
#1 0x00007f73f5793e46 in tm_shutdown () at /build/kamailio-5.6.4+ubuntu22.04/src/modules/tm/t_funcs.c:88
__func__ = "tm_shutdown"
#2 0x00005557271db17b in destroy_modules () at core/sr_module.c:842
t = 0x7f73f68a65a0
foo = 0x7f73f68a59e0
__func__ = "destroy_modules"
#3 0x0000555726f64029 in cleanup (show_status=1) at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:561
memlog = 0
__func__ = "cleanup"
#4 0x0000555726f66044 in shutdown_children (sig=15, show_status=1) at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:704
__func__ = "shutdown_children"
#5 0x0000555726f697dc in handle_sigs () at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:802
chld = 0
chld_status = 139
any_chld_stopped = 1
memlog = 0
__func__ = "handle_sigs"
#6 0x0000555726f78f42 in main_loop () at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:1900
i = 6
pid = 37846
si = 0x0
si_desc = "udp receiver child=5 sock=10.153.5.40:5060\000\000\020\000\000\000\003\000\000\000!\000\000\000\000\262\270\224RE&\035(\247K'WU\000\000WqA'WU\000\000\000\000\000\000\000\000\000\000c\367@'WU\000\000!\000\000\000\000\000\000\000\260\325\022\371s\177\000\000 \236.\220\375\177\000\000ݕ\024'WU\000"
nrprocs = 6
woneinit = 1
__func__ = "main_loop"
#7 0x0000555726f83d11 in main (argc=12, argv=0x7ffd902ea398) at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:3078
cfg_stream = 0x555727e12380
c = -1
r = 0
tmp = 0x7ffd902ebe36 ""
tmp_len = 0
port = 0
proto = 0
ahost = 0x0
aport = 0
options = 0x55572744e898 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 4270110361
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x7ffd902ea398
p = 0x7ffd902ea310 ""
st = {st_dev = 25, st_ino = 5514, st_nlink = 2, st_mode = 16888, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1690276408, tv_nsec = 971865637}, st_mtim = {tv_sec = 1690276408,
tv_nsec = 971865637}, st_ctim = {tv_sec = 1690276408, tv_nsec = 971865637}, __glibc_reserved = {0, 0, 0}}
tbuf = '\000' <repeats 80 times>, "\377\000\000\000\377\000\000\000\000\377\000\000\000\000\000\000", '/' <repeats 16 times>, "\230\r", '\000' <repeats 14 times>, "`", '\000' <repeats 15 times>, "\001", '\000' <repeats 144 times>...
option_index = 12
long_options = {{name = 0x55572740a2e9 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55572740b84a "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55572740f6e4 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x55572740a2ee "subst",
has_arg = 1, flag = 0x0, val = 1025}, {name = 0x55572740a2f4 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x55572740a2fd "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {name = 0x55572740a307 "server-id", has_arg = 1, flag = 0x0, val = 1028},
{name = 0x55572740a311 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x55572740a31c "modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x55572740a325 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x55572740b967 "debug",
has_arg = 1, flag = 0x0, val = 1032}, {name = 0x55572740a330 "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, {name = 0x55572740a33a "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
__func__ = "main"
(gdb) info locals
p_cell = 0x0
tmp_cell = 0x0
i = 64459
__func__ = "free_hash_table"
(gdb) list
459 in /build/kamailio-5.6.4+ubuntu22.04/src/modules/tm/h_table.c
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f8a6c440050), called from uac: uac_send.c: uac_send_tm_callback(860), first free uac: uac_send.c: uac_send_info_clone(110) - ignoring
CRITICAL: <core> [core/mem/q_malloc.c:123]: qm_debug_check_frag(): BUG: qm: fragm. 0x7f74379f46b0 (address 0x7f74379f46e8) beginning overwritten (0)! Memory allocator was called from uac: uac_send.c:860. Fragment marked by (null):0. Exec from core/mem/q_malloc.c:511.
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
proto:UDP 2023-07-25T10:00:44.452898Z 10.153.5.40:5060 ---> 192.168.50.107:5060
REGISTER sip:192.168.50.107 SIP/2.0
Via: SIP/2.0/UDP 10.153.5.40;branch=z9hG4bK6a0b.834627a6000000000000000000000000.0
To: <sip:3408@192.168.50.107>
From: <sip:3408@192.168.50.107>;tag=b2f228866a24b161d346cfb256d45132-a0527658
CSeq: 10 REGISTER
Call-ID: 2332840947916a3e-39417(a)10.153.5.40
Max-Forwards: 70
Content-Length: 0
Contact: <sip:3408@10.153.5.40:5060>
Expires: 150
User-Agent: PortSIP UC Client Android - v11.8.1
proto:UDP 2023-07-25T10:00:44.464436Z 192.168.50.107:5060 ---> 10.153.5.40:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.153.5.40;rport=5060;received=10.153.5.40;branch=z9hG4bK6a0b.834627a6000000000000000000000000.0
Call-ID: 2332840947916a3e-39417(a)10.153.5.40
From: <sip:3408@192.168.50.107>;tag=b2f228866a24b161d346cfb256d45132-a0527658
To: <sip:3408@192.168.50.107>;tag=z9hG4bK6a0b.834627a6000000000000000000000000.0
CSeq: 10 REGISTER
WWW-Authenticate: Digest realm="vpp",nonce="1690279244/67fc12dbaf6a76fa34181a4bd504de00",opaque="1680d45809efac86",algorithm=md5,qop="auth"
Server: Asterisk
Content-Length: 0
proto:UDP 2023-07-25T10:00:44.466447Z 10.153.5.40:5060 ---> 192.168.50.107:5060
REGISTER sip:192.168.50.107 SIP/2.0
Via: SIP/2.0/UDP 10.153.5.40;branch=z9hG4bK7a0b.5673b4d4000000000000000000000000.0
To: <sip:3408@192.168.50.107>
From: <sip:3408@192.168.50.107>;tag=b2f228866a24b161d346cfb256d45132-a0527658
CSeq: 11 REGISTER
Call-ID: 2332840947916a3e-39417(a)10.153.5.40
Max-Forwards: 70
Content-Length: 0
Contact: <sip:3408@10.153.5.40:5060>
Expires: 150
Authorization: Digest username="3408", realm="vpp", nonce="1690279244/67fc12dbaf6a76fa34181a4bd504de00", uri="sip:192.168.50.107", opaque="1680d45809efac86", qop=auth, nc=00000001, cnonce="1935694403", response="38bc75e831e1267ce943bcc50f76390a", algorithm=MD5
User-Agent: PortSIP UC Client Android - v11.8.1
proto:UDP 2023-07-25T10:00:44.477675Z 192.168.50.107:5060 ---> 10.153.5.40:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.153.5.40;rport=5060;received=10.153.5.40;branch=z9hG4bK7a0b.5673b4d4000000000000000000000000.0
Call-ID: 2332840947916a3e-39417(a)10.153.5.40
From: <sip:3408@192.168.50.107>;tag=b2f228866a24b161d346cfb256d45132-a0527658
To: <sip:3408@192.168.50.107>;tag=z9hG4bK7a0b.5673b4d4000000000000000000000000.0
CSeq: 11 REGISTER
WWW-Authenticate: Digest realm="vpp",nonce="1690279244/67fc12dbaf6a76fa34181a4bd504de00",opaque="5adc30b867f02d18",algorithm=md5,qop="auth"
Server: Asterisk
Content-Length: 0
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.6.4 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 11.3.0
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3522
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3522(a)github.com>
Now there is a call scenario where freeswitch ->kamailio ->rtpengine ->webrtc (jsSIP) voice and video cannot be displayed. Is there a problem with my handling and how can I solve it?
1、Freeswitch INVITE to kamailio without video code
2、kamailio request to rtpengine(rtpengine_offer("record-call=off force trust-address replace-origin replace-session-connection UDP/TLS/RTP/SAVPF"))and call to jsSIP
3、jsSIP response with "SIP/2.0 200 OK" to kamailio without video code
4、kamailio request to(rtpengine_answer("record-call=off replace-origin replace-session-connection DTLS=passive ICE=remove RTP/SAVPF"))and response to Freeswitch
5、jsSIP send re-INVITE to kamailio with video code
6、kamailio request to(rtpengine_offer("record-call=off replace-origin replace-session-connection DTLS=passive ICE=remove SDES-off UDP/TLS/RTP/SAVPF"))and response to Freeswitch
7、Freeswitch response with "SIP/2.0 200 OK" to kamailio with video code
8、kamailio request to(rtpengine_answer("record-call=off replace-origin replace-session-connection rtcp-mux-accept rtcp-mux-offer DTLS=passive SDES-off UDP/TLS/RTP/SAVPF"))and response to jsSIP
9、Freeswitch send re-INVITE to kamailio with video code
10、kamailio request to(rtpengine_offer("record-call=off replace-origin replace-session-connection rtcp-mux-accept rtcp-mux-offer DTLS=passive SDES-off UDP/TLS/RTP/SAVPF"))and response to jsSIP
11、jsSIP response with "SIP/2.0 200 OK" to kamailio with video code
12、kamailio request to(rtpengine_answer("record-call=off replace-origin replace-session-connection rtcp-mux-accept rtcp-mux-offer DTLS=passive SDES-off UDP/TLS/RTP/SAVPF"))and response to Freeswitch
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3840
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3840(a)github.com>