🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #163651

Re: tin will not append posted articles - any advice?

#163651
From: Urs Janßen
Date: Wed, 09 Mar 2005 11:06
83 lines
4409 bytes
Tiro Verus wrote:
>   "trying to lock /home/my_user_name/Mail/posted"
>   then a countdown (of attempts I think) and then:
>    "could not lock /home/my_user_name/Mail/posted -- 
>                 article not appended"

tin tries to lock "mailboxes" (and the posted file is a "mailbox") to
avoid trouble if they are accessed by different programms or
incarnations. the locking scheme tin uses depends of the OS and what
kind of locks it offers (flock(2), lockf(3), fcntl(2)). fcntl() is
prefered over lockf() which is prefered over flock(). besides these
locking attempts it also does dotfile locking (but if that fails it
would lead to another error message).

>   AFAICS  the permissions on the ~/Mail directory  and files
>   are the same as on the ~/.tin/  directory and files.

the porblem may not be permission related but looks like a stall
lock.

>   Of couse I can save the articles manually but that is laborious.

you could also use the "fcc" feature from attributes (which once
might replace the posted_articles_file feature). but if you do not
solve the real problem (or change the filename) you might end up with
the same error mesage.

>   Any advice appreciated.  (I am not a diehard tin fan, that is
>   simply the newsreader given to me first long ago.  I will ask
>   for another if that is indicated.)  

As Peter already said: try top open the file with a mailreader (e.g.
mutt) and see if you get an error message about a stale lock. if you
do, then you know that the file is still locked (IIRC mutt allows you
to force unlock files).

if you do not get an error this might indicate that tin uses the
wrong locking scheme for the OS. this can only be solved by
recompilation (that's the hard way, see later on).

you might also try to:

mv ~/Mail/posted ~/Mail/posted.old

now start tin and post a few test messages and see if they get added
to the posted file, if they do you can merge back the old messages to
the file (after quitting tin) via:

cat ~/Mail/posted.old ~/Mail/posted > ~/Mail/posted.new && \
mv ~/Mail/posted.new  ~/Mail/posted && rm ~/Mail/posted.old

[hard way starts here]
if they don't get added and you still get the same error message
then you have to recompile tin with the right locking scheme (AFAIK
FreeBSD/5.3 has fcntl() and flock() and lockf(), as fcntl() is the
prefered way try the different configure variants:
 1) no extra configure arguments, fcntl() is used (if found)

if that doesn't help try

 2) "configure --disable-fcntl --enable-lockf", this forces lockf()

if that doesn't help try

 3) "configure --disable-fcntl --enable-flock", this forces flock()

if that doesn't help, you have to disable all locking mechanisms
(except dotfile locking). I have no idea if this can be done via
configure, so I would do this after a normal configure in
include/autoconf.h - look for the lines 

#       define HAVE_FCNTL 1
#       define HAVE_FLOCK 1
#       define HAVE_LOCKF 1

remove them and recompile.

HTH,
urs
-- 
Jef Poskanzer:
"When people aren't stupid Usenet is even more useful. Too bad this happens
 so rarely."
Technical Details
Message-ID: <d0mlbo$rjb$1@news2.rz.uni-karlsruhe.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx02.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!news.belwue.de!rz.uni-karlsruhe.de!news.rz.uni-karlsruhe.de!not-for-mail
References: <xRvXd.51398$NC6.16109@newsread1.mlpsca01.us.to.verio.net>

Show Full Headers
Complete Article Headers
Message-ID: <d0mlbo$rjb$1@news2.rz.uni-karlsruhe.de>
Subject: Re: tin will not append posted articles - any advice?
Date: Wed, 09 Mar 2005 11:06:32 +0000
From: Urs Janßen <urs@buil.tin.org>
References: <xRvXd.51398$NC6.16109@newsread1.mlpsca01.us.to.verio.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx02.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!news.belwue.de!rz.uni-karlsruhe.de!news.rz.uni-karlsruhe.de!not-for-mail
Newsgroups: news.software.readers
Organization: tin.org
Lines: 83
Sender: Urs Janßen <urs@akk10-int.akk.uni-karlsruhe.de>
NNTP-Posting-Host: akkuser-dmz.akk.uni-karlsruhe.de
X-Trace: news2.rz.uni-karlsruhe.de 1110366392 28267 172.22.9.237 (9 Mar 2005
X-Complaints-To: usenet@rz.uni-karlsruhe.de
NNTP-Posting-Date: Wed, 9 Mar 2005 11:06:32 +0000 (UTC)
X-No-Archive: yes
User-Agent: tin/1.7.8-20050308 ("Scalpay") (UNIX) (Linux/2.4.27-2-686 (i686))