mwild1 / luadbi

Multi-backend SQL database library for Lua
MIT License
41 stars 15 forks source link

Segfault dbdpostgresql.so #38

Closed ppascher closed 7 years ago

ppascher commented 7 years ago

Hello, I just recently started with xmpp and prosody (0.9.12 on CentOS 7.3) which uses luadbi ( lua-dbi.x86_64 0.5-11.el7). I use postgresql (9.6.1) for all storage. Every now and then I get the following error after which I have to restart prosody:

kernel: lua[2581]: segfault at 0 ip 00007f276a7790b8 sp 00007fff01e2adb0 error 4 in dbdpostgresql.so[7f276a776000+4000]
systemd: prosody.service: main process exited, code=killed, status=11/SEGV
prosodyctl: Prosody is not running
systemd: prosody.service: control process exited, code=exited status=1
systemd: Unit prosody.service entered failed state.
systemd: prosody.service failed.

I substracted the base address from the ip to find out where the error occurs:

$ addr2line -e /usr/lib64/lua/5.1/dbdpostgresql.so -fCi 0x30b8
dbd_postgresql_statement_create
??:?

postgres log:

LOG:  08006: could not receive data from client: Connection reset by peer
LOCATION:  pq_recvbuf, pqcomm.c:936
LOG:  08006: unexpected EOF on client connection with an open transaction
LOCATION:  SocketBackend, postgres.c:341
LOG:  00000: disconnection: session time: 0:46:30.877 user=<username> database=<databasename> host=<hostname> port=33388
LOCATION:  log_disconnections, postgres.c:4507
Zash commented 7 years ago

Could you try building the latest version from source and testing? This commit looks like like it could have fixed this issue.

sparked435 commented 7 years ago

Please try version 0.6 and reopen if the problem still occurs.