### Description
I was testing latest nightly build to test uacreg with auth_ha1 column. I have 1 record in database: ``` id: 1 l_uuid: 50b08f96-ee5d-44bb-8539-098268ad64d1 l_username: covalschi l_domain: test113.covalschi.reraldomain.com r_username: covalschi r_domain: sip.linphone.org realm: sip.linphone.org auth_username: covalschi auth_password: auth_ha1: f0e0dc4bf176fe8f41280b7b3758150d auth_proxy: sip.linphone.org expires: 3600 flags: 0 reg_delay: 0 socket: ``` When I execute kamcmd uac.reg_reload I get: ```ERROR: read reply failed: Success (0)``` as return code for kamcmd and Kamailio crashes.
<!-- Explain what you did, what you expected to happen, and what actually happened. -->
### Troubleshooting
It repeats every time, Kamailio crashes with signal 11
#### Reproduction
Basically do the same - create a record in database with auth_ha1 instead of password and try kamcmd uac.reg_reload <!-- 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. -->
``` bt full: https://pastebin.com/by6Nxwhk info locals: https://pastebin.com/ZmEHnupn (gdb) list 1871 in main.c ``` [core.zip](https://github.com/kamailio/kamailio/files/3656555/core.zip)
#### 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). -->
``` 27(380) CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 5 0(1) ALERT: <core> [main.c:766]: handle_sigs(): child process 364 exited by a signal 11 0(1) ALERT: <core> [main.c:769]: handle_sigs(): core was generated ```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
``` version: kamailio 5.3.0-pre1 (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_BLACKLIST, HAVE_RESOLV_RES 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 6.3.0 ``` * **Operating System**:
``` Debian stretch in docker Linux dev-covalschi 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3 (2019-09-02) x86_64 GNU/Linux ```
Ok, so I'm pretty new with using gdb, but I mentioned that strlen error happens with uac_reg_db_to_reg on reg_db_set_attr(socket, 13, 1) commeting that out makes it work
Ok, I think the reg_db_set_attr define was new introduced for this functionality.
Ok, I think the reg_db_set_attr define was new introduced for this functionality.
I tried reverting it back the version before @miconda's commit, but it showed the same behaviour. I mean, I only reverted back reg_db_set_attr and uac_reg_load_db.
Ok, interesting. What kind of DB do you use, maybe it is something about the NULL support inside the DB.
Ok, interesting. What kind of DB do you use, maybe it is something about the NULL support inside the DB.
I tried mariadb and sqlite, tried both with empty socket field and with some data inside. I can try postgre as well.
Not necessary, should be easy to reproduce it. I will have a look to it.
Fixed in the referenced commit in git master. After fixing one of the URLs in the quoted DB entry, I was able to login. As this is a public tracker, you might want to change your password. ;-)
Closed #2076.