Bug 298067 - sysutils/swtpm: swtpm fail to restart more often than not
Summary: sysutils/swtpm: swtpm fail to restart more often than not
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on: 298251
Blocks:
  Show dependency treegraph
 
Reported: 2026-08-31 02:40 UTC by Quentin Thébault
Modified: 2026-09-06 23:22 UTC (History)
2 users (show)

See Also:
vvd: maintainer-feedback+
vvd: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Quentin Thébault 2026-08-31 02:40:02 UTC
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.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2026-08-31 02:40:02 UTC
Maintainer informed via mail
Comment 2 Goran Mekić 2026-09-06 22:20:30 UTC
Using pwait(1) solved it for me. The update is in 298251