### Description
I am doing some experiments with NGHTTP2 Module to make use of it in some scenarios, where Kamailio receives HTTP2 requests and has t react on them, unfortunately the module is causing Kamailio to crash upon receiving a request and need to be restarted.
Also the Docs for the module need some correction :
https://www.kamailio.org/docs/modules/5.9.x/modules/nghttp2.html
Missing required Parameters :
modparam("nghttp2", "tls_private_key", "key_in_PEM_Format")
modparam("nghttp2", "tls_public_key", "certificate_in_PEM_Format")
also $nghttp2(url) is wrong, $nghttp2(path) or $nghttp2(pathfull) is the correct ones.
its also annoying to have it only working in TLS, would it possible to make it also works without TLS ?
#### Reproduction
the fastest way it to connect to NGHTTP2 server with curl :
curl --http2-prior-knowledge -v -k https://server_ip:port/
#### Debugging Data
```
92(132) DEBUG: nghttp2 [nghttp2_server.c:717]: eventcb(): 172.22.0.1 connected
92(132) DEBUG: nghttp2 [nghttp2_server.c:507]: on_request_recv(): 172.22.0.1 GET /
92(132) DEBUG: nghttp2 [nghttp2_mod.c:522]: ksr_event_route(): executing event_route[nghttp2:request] (1)
free(): invalid pointer
102(142) CRITICAL: <core> [core/pass_fd.c:281]: receive_fd(): EOF on 7
102(142) DEBUG: <core> [core/tcp_main.c:3984]: handle_ser_child(): dead child 92, pid 132 (shutting down?)
102(142) DEBUG: <core> [core/io_wait.h:599]: io_watch_del(): DBG: io_watch_del (0x5b85ddc10ae0, 7, -1, 0x0) fd_no=130 called
0(40) ALERT: <core> [main.c:806]: handle_sigs(): child process 132 exited by a signal 6
0(40) ALERT: <core> [main.c:810]: handle_sigs(): core was generated
```
#### 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).
-->
```
https://pastebin.com/MQe4F5sv
```
### Additional Information
* **Kamailio Version** 5.8
* **Operating System**:
Ubuntu 24.04
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3917
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3917(a)github.com>
### Description
Calling functions from the `dialplan` module in 5.8 (`dp_translate()`, `dp_match()`) results in the following line being logged:
```
WARNING: <core> [core/mem/q_malloc.c:520]: qm_free(): WARNING: free(0) called from dialplan: dp_db.c: pcre2_free(206)
```
Is this a functional problem, or just a case of overly aggressive logging?
### Troubleshooting
#### Reproduction
Reproducible with the following kamailio config:
```
#!KAMAILIO
loadmodule "pv"
loadmodule "db_sqlite"
loadmodule "xlog"
loadmodule "dialplan"
disable_tcp = true
force_rport = true
!!define DBFILE /etc/kamailio/kamailio.sqlite
modparamx("db_sqlite","db_set_readonly", "$def(DBFILE)")
modparamx("dialplan","db_url", "sqlite:///$def(DBFILE)")
modparam("dialplan", "attrs_pvar", "$avp(dp_attrs)")
request_route {
if ( $rm == "ACK" ) {
exit;
}
xinfo("$ci New request\n");
dp_match("1", "$rU");
exit;
}
```
The warning log is issued in 5.8 but not 5.7. Reproduced by sending a request with SIPp:
```
sipp -sn uac -m 1 -s 15554445555 localhost
```
### Possible Solutions
Not sure if this is just a case of logging being overly aggressive, or an issue with the module's memory management.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.8.1 (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, MEM_JOIN_FREE, 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_SEND_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 12.2.0
```
Tested using docker `debian:12-slim` using the official packages from `http://deb.kamailio.org/kamailio58`
* **Operating System**:
Docker debian:12-slim, but also observed in Alpine Linux/
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3851
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3851(a)github.com>