Date: Mon, 28 Jun 2010 09:57:37 -0700 From: Garrett Cooper <yanefbsd@gmail.com> To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= <des@des.no> Cc: freebsd-current@freebsd.org, pjd@freebsd.org, "M. Warner Losh" <imp@bsdimp.com>, hselasky@c2i.net Subject: Re: Patch for rc.d/devd on FreeBSD 9-current Message-ID: <AANLkTikM78DA0t50N2irDOvOqXaBY_Gjx9uB-Eej6gN8@mail.gmail.com> In-Reply-To: <86pqzb5io7.fsf@ds4.des.no> References: <AANLkTikI223vbyBdEqLuA6FjcBBeQcqFujOimP5horsv@mail.gmail.com> <20100627.201716.1108826596298620201.imp@bsdimp.com> <86iq537egy.fsf@ds4.des.no> <20100628.081810.502133560696912792.imp@bsdimp.com> <86pqzb5io7.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
2010/6/28 Dag-Erling Sm=F8rgrav <des@des.no>: > "M. Warner Losh" <imp@bsdimp.com> writes: >> Dag-Erling Sm=F8rgrav <des@des.no> writes: >> > "M. Warner Losh" <imp@bsdimp.com> writes: >> > > Maybe the real problem is that devd locks the file, then dies. =A0Th= e >> > > file remains locked, so the flopen is failing with EWOULDBLOCK. >> > The lock is released when the process that holds it terminates. >> So which process is that? =A0devd took it out, and is subsequently >> killed. =A0When it restarts, it can't take out the lock. > > What does fstat say about the pid file? > >> The same code works perfectly in 8.0-stable from April. >> >> The conclusion, I believe, is that somebody broke locking in >> current... > > Before I wrote one of my earlier replies, I traced through the code > paths that lead to a lock being released, and everything looks fine and > dandy. =A0Besides, if someone had, as you suggest, broken locking in > current, there would be a lot more noise about it on the lists. Hi DES, When I do the following: /etc/rc.d/devd start /etc/rc.d/devd stop It leaves stray unused lockfiles in the directory: $ sudo /etc/rc.d/devd start Starting devd. $ ls -l /var/run/devd.pi* -rw------- 1 root wheel 5 Jun 28 09:53 /var/run/devd.pid srw-rw-rw- 1 root wheel 0 Jun 28 09:53 /var/run/devd.pipe $ fstat /var/run/devd.pi* USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME root devd 29791 6 /var 447511 -rw------- 5 w /var/run/devd.pid $ sudo /etc/rc.d/devd stop Stopping devd. $ ls -l /var/run/devd.pi* -rw------- 1 root wheel 5 Jun 28 09:52 /var/run/devd.pid srw-rw-rw- 1 root wheel 0 Jun 28 09:52 /var/run/devd.pipe $ fstat /var/run/devd.pi* USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME Thanks, -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikM78DA0t50N2irDOvOqXaBY_Gjx9uB-Eej6gN8>