πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
3 messages
3 total messages Started by Tiro Verus Wed, 09 Mar 2005 05:30
tin will not append posted articles - any advice?
#163642
Author: Tiro Verus
Date: Wed, 09 Mar 2005 05:30
21 lines
1803 bytes

  After somerecent change (I have no idea what)  I get the
  following message after posting an article in tin:

  "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"

  Therefore I do not have copies of my posts saved automatically.
  AFAICS  the permissions on the ~/Mail directory  and files
  are the same as on the ~/.tin/  directory and files.

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

  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.)  
Re: tin will not append posted articles - any advice?
#163646
Author: Peter J Ross
Date: Wed, 09 Mar 2005 07:48
39 lines
2246 bytes
On Wednesday 09 March, Tiro Verus wrote in news.software.readers:

>   After somerecent change (I have no idea what)  I get the
>   following message after posting an article in tin:

>   "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"

>   Therefore I do not have copies of my posts saved automatically.
>   AFAICS  the permissions on the ~/Mail directory  and files
>   are the same as on the ~/.tin/  directory and files.

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

>   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.)  

It looks as if another process has locked the file and not released
it.

Is there a suspicious temporary file wherever your mail client puts
its lock files?

Can you open the file with a mail client?

What happens if you configure tin to write to a different file, either
in ~/Mail or somewhere else?

PJR :-)
-- 
alt.usenet.kooks award-winners and FAQ:
http://www.insurgent.org/~kook-faq/

[To reply by email, remove "NOSPAM".]
Re: tin will not append posted articles - any advice?
#163651
Author: 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."
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads