"INSIST(oldsize == size);" assertion fails (down the call stack) for tls_write_cb()
This is a new crash which was first observed on FreeBSD VMs in pipeline #66473:
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/1575006
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/1575007
However, it looks like something that was introduced earlier than in commit 24c79694:
I:doth:ns1 died before a SIGTERM was sent
I:doth:stopping servers failed
I:doth:Core dump(s) found: doth/ns1/core.46383
D:doth:backtrace from doth/ns1/core.46383:
D:doth:--------------------------------------------------------------------------------
D:doth:Core was generated by `/builds/isc-projects/bind9/bin/named/.libs/named -D doth-ns1 -X named.lock -m re'.
D:doth:Program terminated with signal SIGABRT, Aborted.
D:doth:#0 0x000000080100cc2a in thr_kill () from /lib/libc.so.7
D:doth:[Current thread is 1 (LWP 100126)]
D:doth:#0 0x000000080100cc2a in thr_kill () from /lib/libc.so.7
D:doth:#1 0x000000080100b084 in raise () from /lib/libc.so.7
D:doth:#2 0x0000000800f81279 in abort () from /lib/libc.so.7
D:doth:#3 0x000000000023b122 in assertion_failed (file=<optimized out>, line=<optimized out>, type=isc_assertiontype_insist, cond=<optimized out>) at main.c:259
D:doth:#4 0x000000080032e6ca in isc_assertion_failed (file=0x1871e <error: Cannot access memory at address 0x1871e>, line=6, type=isc_assertiontype_require, cond=0x80100cc4a <thr_self+10> "\017\202\264G") at assertions.c:46
D:doth:#5 0x000000080033ca98 in isc__mem_put (ctx=0x801a05000, ptr=0x804c60010, size=6453, file=<optimized out>, line=0) at mem.c:775
D:doth:#6 0x00000008003179c6 in free_senddata (sock=<optimized out>) at netmgr/tlsdns.c:1295
D:doth:#7 0x0000000800317a50 in tls_write_cb (req=<optimized out>, status=0) at netmgr/tlsdns.c:1307
D:doth:#8 0x0000000800c1b065 in ?? () from /usr/local/lib/libuv.so.1
D:doth:#9 0x0000000800c1a92a in ?? () from /usr/local/lib/libuv.so.1
D:doth:#10 0x0000000800c2112b in uv.io_poll () from /usr/local/lib/libuv.so.1
D:doth:#11 0x0000000800c10551 in uv_run () from /usr/local/lib/libuv.so.1
D:doth:#12 0x000000080030771b in nm_thread (worker0=0x8013b0010) at netmgr/netmgr.c:553
D:doth:#13 0x000000080034dde5 in isc__trampoline_run (arg=0x8013f4d60) at trampoline.c:184
D:doth:#14 0x0000000800e37fac in ?? () from /lib/libthr.so.3
D:doth:#15 0x0000000000000000 in ?? ()
D:doth:Backtrace stopped: Cannot access memory at address 0x7fffdfffe000
D:doth:--------------------------------------------------------------------------------
D:doth:full backtrace from doth/ns1/core.46383 saved in doth/ns1/core.46383-backtrace.txt
D:doth:core dump doth/ns1/core.46383 archived as doth/ns1/core.46383.gz
R:doth:FAIL
The INSIST
that fails is: INSIST(oldsize == size);
@artem, any ideas?