Open lglhust opened 1 month ago
You can use the below diff
diff --git a/ims_base/kamailio_init.sh b/ims_base/kamailio_init.sh
index d48ad37..5618fe6 100755
--- a/ims_base/kamailio_init.sh
+++ b/ims_base/kamailio_init.sh
@@ -42,10 +42,11 @@ elif [[ "$COMPONENT_NAME" =~ ^(scscf-[[:digit:]]+$) ]]; then
kamailio -f /etc/kamailio_scscf/kamailio_scscf.cfg -P /kamailio_scscf.pid -DD -E -e
elif [[ "$COMPONENT_NAME" =~ ^(pcscf-[[:digit:]]+$) ]]; then
echo "Deploying component: '$COMPONENT_NAME'"
+ apt-get install -y gdb && \
/mnt/pcscf/pcscf_init.sh && \
mkdir -p /var/run/kamailio_pcscf && \
rm -f /kamailio_pcscf.pid && \
- kamailio -f /etc/kamailio_pcscf/kamailio_pcscf.cfg -P /kamailio_pcscf.pid -DD -E -e
+ gdb --args kamailio -f /etc/kamailio_pcscf/kamailio_pcscf.cfg -P /kamailio_pcscf.pid -DD -E -e
elif [[ "$COMPONENT_NAME" =~ ^(smsc-[[:digit:]]+$) ]]; then
echo "Deploying component: '$COMPONENT_NAME'"
/mnt/smsc/smsc_init.sh && \
Hi @lglhust,
If your plan is to open a Ticket in Kamailio repo, then you need to do this in the Container terminal :
docker exec -it kamailio_container /bin/bash
ulimit -c unlimited sysctl -w kernel.core_pattern=core
the coredump will be in the root /
make sure that gdb tool is installed
after that you need to read teh coredump on the conainer, sending teh coredump to someone will not help, it must be done on the same machine with the same problematic code that need to be debugged: like that
gdb
Best regards
Thanks a lot.
Hi herlesupreeth: I use "kamailio -f /etc/kamailio_pcscf/kamailio_pcscf.cfg -P /kamailio_pcscf.pid -DD -E -e" to load kamailio_pcscf . I don't how to debug kamailio_pcscf with gdb.