Problem about "Messages not removed from POP3 server" almost solved?!

 
From: "Frans Gouverne" <f.gouverne@PROTECTED>
Date: August 27th 2005

There is a very annoying problem "Messages not removed from POP3 server" when using dada_bridge

I have noticed this problem once before, but could not reproduce it at that time But last Friday, it showed up again and this time I could reproduce the problem for 100% So this was my chance to find out what is really going on

The strange thing is that the problem only shows up when 2 or more messages are in the POP3 box And only the first 2 messages are sent and archived, the rest is ignored

I spend many hours debugging and find out that the $pop object inside dada_bridge was destroyed just after calling sub archive( ) Strange, isn't it?

So I decided to make $pop a global variable and export it to the other modules Now I could find out exactly where $pop really became corrupted After many more hours debugging I discovered that the $pop object became invalid just after the following line from sub "lockdb" from module "GenericDBFile":

sysopen(DB_SAFETYLOCK, $self->lockfilename, O_RDWR|O_CREAT, $FILE_CHMOD)

which reminded me immediately about bug item #1263035 " archivesdb lock file not removed" When I looked at "$self->lockfilename" it was referring to this archivesdb lock file indeed! Also, when I removed the lock file manually, the problem disappeared!

So I did the following test: I removed the call to archive( ) inside dada_bridge and replaced it by the following lines copied from "lockdb":

use Fcntl qw( O_WRONLY O_TRUNC O_CREAT O_CREAT O_RDWR O_RDONLY LOCK_EX LOCK_SH LOCK_NB);

my $fname='[cut]/test_archivesdb lock';

sysopen(DB_SAFETYLOCK, $fname, O_RDWR|O_CREAT, $FILE_CHMOD); chmod($FILE_CHMOD, $fname); { my $sleep_count = 0; { flock (DB_SAFETYLOCK, LOCK_EX | LOCK_NB) and last; sleep 1; redo if ++$sleep_count < 11; die "$PROGRAM_NAME $VER Warning: Server is way too busy to open list db file," $fname " - $!\n"; } }

And, as expected, the problem showed up right away: when 2 or more messages were sent to the POP3 box, the messages are not removed from the server That means, the $pop variable is destroyed when the above lines are executed twice

Although I still do not know what the relation is between $pop and system calls, I am pretty sure now that when the archivesdb lock file problem is solved, the undeleted POP3 messages problem will not show up anymore also

Justin, maybe you can shed a bit more light on this?

Frans

  • This mailing list is a public mailing list - anyone may join or leave, at any time.
  • This mailing list is a group discussion list (unmoderated)
  • Start a new thread, email: dadadev@dadamailproject.com

This is the developer discussion mailing list for Dada Mail.

If you are just looking for support Dada Mail, consult the message boards at:

https://forum.dadamailproject.com

Documentation for Dada Mail:

https://dadamailproject.com/d

Specifically, see the Error FAQ:

https://dadamailproject.com/d/FAQ-errors.pod.html

To post to this list, send a message to:

mailto:dadadev@dadamailproject.com

All subscribers of this list may post to the list itself.

Topics that are welcome:

  • Constructive critiques on the program (I like, "x", but, "y" needs some work - here's an idea on how to make this better...)
  • Bug/Error reports
  • Bug fixes
  • Request For Comments on any changes to the program
  • Help customizing Dada Mail for your own needs
  • Patches
  • Language Translations
  • Support Documentation/Doc editing, FAQ's, etc.
  • Discussion of any changes that you would like to be committed to the next version of Dada Mail -

Dada Mail is on Github:

https://github.com/justingit/dada-mail/

If you would like to fork, branch, send over PRs, open up issues, etc.

Privacy Policy:

This Privacy Policy is for this mailing list, and this mailing list only.

Email addresses collection through this mailing list are used explicitly to work within this email discussion list.

We only collect email addresses through our Closed-Loop Opt-In system.

We don't use your email address for any other purpose.

We won't be sharing your email address with any other entity.

Unsubscription can be done at any time. Please contact us at: justin@dadamailproject.com for any help regarding your subscription, including removal from the mailing list.

All mailing list messages sent from us will include a subscription removal link, which will allow you to remove yourself from this mailing list automatically, and permanently.

All consent to use your email address for any other purpose stated at the time of the mailing list subscription will also be revoked upon mailing list removal.