From owner-freebsd-current Fri Nov 5 14: 1:56 1999 Delivered-To: freebsd-current@freebsd.org Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (Postfix) with ESMTP id 1D1B314EB2 for ; Fri, 5 Nov 1999 14:01:25 -0800 (PST) (envelope-from roberto@keltia.freenix.fr) Received: (from uucp@localhost) by frmug.org (8.9.3/frmug-2.5/nospam) with UUCP id XAA12055 for freebsd-current@FreeBSD.ORG; Fri, 5 Nov 1999 23:01:08 +0100 (CET) (envelope-from roberto@keltia.freenix.fr) Received: by keltia.freenix.fr (Postfix, from userid 101) id 65E198711; Fri, 5 Nov 1999 22:59:16 +0100 (CET) Date: Fri, 5 Nov 1999 22:59:16 +0100 From: Ollivier Robert To: "FreeBSD Current Users' list" Subject: Serious locking problem in CURRENT Message-ID: <19991105225916.A14961@keltia.freenix.fr> Mail-Followup-To: FreeBSD Current Users' list Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0pre2i X-Operating-System: FreeBSD 4.0-CURRENT/ELF AMD-K6/200 & 2x PPro/200 SMP Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG While changing my Postfix configuration, I stumbled on something weird. One of Postfix's processes (master) runs all the time and keep a exclusive write lock on $spool/pid/master.pid. When one does a reload, postfix-script runs master with the ``-t'' argument which makes master try to get a lock on the pid file. Under 3.3-RELEASE, everything is fine, the lock can't be obtained and Postfix knows it is already running. Under -CURRENT (two days old), the lock IS OBTAINED, meaning Postfix thinks it is not running. 3.3-RELEASE: OK -=-=-=- 402 [22:56] root@sidhe:/etc/postfix# make postfix reload postfix-script: refreshing the Postfix mail system 404 [22:56] root@sidhe:spool/postfix# kdump|tail -20 8359 master RET getrlimit 0 8359 master CALL chdir(0x8057b28) 8359 master NAMI "/var/spool/postfix" 8359 master RET chdir 0 8359 master CALL access(0x805c3e8,0) 8359 master NAMI "pid/master.pid" 8359 master RET access 0 8359 master CALL open(0x805c3e8,0x2,0) 8359 master NAMI "pid/master.pid" 8359 master RET open 7 8359 master CALL fstat(0x7,0xbfbfd300) 8359 master RET fstat 0 8359 master CALL lstat(0x805c3e8,0xbfbfd2a0) 8359 master NAMI "pid/master.pid" 8359 master RET lstat 0 8359 master CALL flock(0x7,0x6) 8359 master RET flock -1 errno 35 Resource temporarily unavailable 8359 master CALL close(0x7) 8359 master RET close 0 8359 master CALL exit(0x1) -=-=-=- 4.0-CURRENT: NOT OK -=-=-=- 331 [22:55] root@keltia:spool/postfix# postfix reload postfix-script: fatal: the Postfix mail system is not running 332 [22:56] root@keltia:spool/postfix# kdump|tail -20 14942 master RET gettimeofday 0 14942 master CALL getrlimit(0x1,0xbfbfd3d0) 14942 master RET getrlimit 0 14942 master CALL chdir(0x80589e8) 14942 master NAMI "/var/spool/postfix" 14942 master RET chdir 0 14942 master CALL access(0x805e248,0) 14942 master NAMI "pid/master.pid" 14942 master RET access 0 14942 master CALL open(0x805e248,0x2,0) 14942 master NAMI "pid/master.pid" 14942 master RET open 7 14942 master CALL fstat(0x7,0xbfbfd324) 14942 master RET fstat 0 14942 master CALL lstat(0x805e248,0xbfbfd2c4) 14942 master NAMI "pid/master.pid" 14942 master RET lstat 0 14942 master CALL flock(0x7,0x6) <<<<<<<< ????? 14942 master RET flock 0 <<<<<<<< ????? 14942 master CALL exit(0) -=-=-=- I've verified that it has a lock on 3.3-RELEASE but can't on CURRENT since lsof is broken (sigh). 3.3-RELEASE: 405 [22:56] root@sidhe:spool/postfix# lsof pid/master.pid COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME master 7155 root 7uW VREG 0,131079 17 18615 pid/master.pid ^^^ Same Postfix versions on both. I even recompiled it on CURRENT. 406 [22:58] root@sidhe:spool/postfix# postconf mail_version mail_version = Snapshot-19990912 333 [22:56] root@keltia:spool/postfix# postconf mail_version mail_version = Snapshot-19990912 -- Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 4.0-CURRENT #75: Tue Nov 2 21:03:12 CET 1999 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message