On Wed, Dec 01, 2021 at 07:03:35AM +0100, Anton Lindqvist wrote: > On Fri, Nov 19, 2021 at 10:14:38AM -0700, Vitaliy Makkoveev wrote: > > CVSROOT: /cvs > > Module name: src > > Changes by: m...@cvs.openbsd.org 2021/11/19 10:14:38 > > > > Modified files: > > regress/sys/kern: Makefile > > Added files: > > regress/sys/kern/undgram_conclose: Makefile undgram_conclose.c > > > > Log message: > > Add and enable the new 'undgram_conclose' test which tries to kill the > > datagram socket connected to the dying socket while it cleaning it's > > list of connected sockets. Incorrect handling of this case could produce > > kernel crash. > > > > ok bluhm@ > > This one failed today, looks like some kind of race as it passed before. > Should bind errors really be fatal in the closer thread? > > + . /usr/local/libexec/robsd/util.sh > + . /usr/local/libexec/robsd/util-ports.sh > + . /usr/local/libexec/robsd/util-regress.sh > + regress_root sys/kern/undgram_conclose > + unpriv anton exec make -C /home/src/regress/sys/kern/undgram_conclose > cc -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes > -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -MD -MP -c > /home/src/regress/sys/kern/undgram_conclose/undgram_conclose.c > cc -o undgram_conclose undgram_conclose.o -lpthread > ==== run-regress-undgram_conclose ==== > ./undgram_conclose > undgram_conclose: bind: Address family not supported by protocol family > *** Error 1 in . (<bsd.regress.mk>:36 'run-regress-undgram_conclose') > FAILED
Yes, `sun' is the local variable of main() so memory is corrupted when main() finished. Fixed this and the same issue in 'unconacc' test. Thanks for pointing. We should be sure the closer thread successfully creates ans binds sockets. Otherwise this test could perform drain run and report it was successful.