A race condition in the rc.d script makes swtpm fail to restart more often than not. In `stop_instance()`: ``` kill $pid rm -f ${pidpath}/${config}.pid echo "done" ``` This should wait for the PIDs to exit before reporting "done" and exiting. Otherwise the sockets are still opened and the new instances fail to start.
Maintainer informed via mail
Using pwait(1) solved it for me. The update is in 298251
Fixed in https://cgit.FreeBSD.org/ports/commit/?id=d369f423848506f7bff5d8b3cfe43f14886c965b.