From: Landry Breuil Subject: don't drop /tmp/*.sem files in daily To: tech@openbsd.org Date: Thu, 30 May 2024 16:12:13 +0200 Hi, i have a backup script using slapcat to dump an openldap server content, my backups started failing a while after upgrading to 7.5. turns out slapd creates /tmp/.sem, and apparently ktrace says that slapcat checks for the presence of the file and bails out otherwise.. i had upgraded to 7.5 on the 8, had restarted slapd on the 9 and backups started failing on the 18. running slapcat consistently failed, until i restarted slapd, which recreated two /tmp/.sem files, and from that point slapcat is happy. afaict the sem files are created in /tmp by sem_open() in src/lib/librthread/rthread_sem.c - so the question is, should they be short-lived or should we preserve them ? (thanks tb@ & sthen@ for the find cluebat) Landry Index: etc/daily =================================================================== RCS file: /cvs/src/etc/daily,v diff -u -r1.98 daily --- etc/daily 16 May 2024 11:33:59 -0000 1.98 +++ etc/daily 30 May 2024 14:00:39 -0000 @@ -50,7 +50,7 @@ find -x . \ \( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \ -o -path './tmux-*' \) -prune -o \ - -type f -and ! -path './*.shm' -atime +7 -delete 2>/dev/null + -type f -and ! -path './*.s[eh]m' -atime +7 -delete 2>/dev/null find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ ! -path ./.ICE-unix ! -name . \ -delete >/dev/null 2>&1; }