Pegasus Mail & Mercury

Welcome to the Community for Pegasus Mail and
The Mercury Mail Transport System, the Internet's longest-serving PC e-mail system!
Welcome to Pegasus Mail & Mercury Sign in | Join | Help
in
Home Blogs Forums Downloads Pegasus Mail Overview Mercury Overview Wiki

1s delay bug still present

Last post 09-17-2008, 23:50 by PaulW. 9 replies.
Sort Posts: Previous Next
  •  09-17-2008, 11:42

    • obetz is not online. Last active: 2019-02-19, 16:15 obetz
    • Top 500 Contributor
    • Joined on 05-10-2007
    • Member
    • Points 445

    1s delay bug still present

    in 4.5, the old bug causing several operations executed only once per second when accessing the mailbox over a network share is still present.

    Oliver

  •  09-17-2008, 16:48

    Re: 1s delay bug still present

    obetz:

    in 4.5, the old bug causing several operations executed only once per second when accessing the mailbox over a network share is still present.

    Not a bug but a system problem with opportunistic locking.Here's something you might try using RegEdit.  It's actually very easy to do and for me it fixed the one second pause when working with the mail store on a Win2K type server.  You need to create a new DWORD OplocksDisabled and then set it to one. You can do this on the Windows server as well to turn off OPLOCKS for all.  

    Configuring opportunistic locking in Windows http://support.microsoft.com/default.aspx?scid=kb;EN-US;296264

    1.     Use REGEDIT and find the following registry entry.  HKEY_LOCAL_MACHINE | System | CurrentControlSet | Services | MRXSmb | Parameters

    2.    Select Edit | New | DWORD value

    3.    Enter OplocksDisabled for the value name and 1 (Disabled) for the value data.  The default is zero (not disabled)

    4.    Exit REGEDIT and reboot your system.  

    You can also deny the granting of opportunistic locks on the server by setting the DWORD "EnableOplocks" registry entry to value of zero (Disabled) in

    HKEY_LOCAL_MACHINE | SYSTEM | CurrentControlSet | Services | LanmanServer | Parameters

    Note  The EnableOplocks value configures Windows-based servers (including Workstations sharing files) to allow or deny opportunistic locks on local files. The default for EnableOplocks is 1 (Enabled).

    Oliver


    Thomas R. Stephenson
    San Jose, California
    Member of Pegasus Mail Support Team

    I do not answer private messages from the forum. If you want to contact me use email to techsupp@tstephenson.com.
  •  09-17-2008, 17:38

    • obetz is not online. Last active: 2019-02-19, 16:15 obetz
    • Top 500 Contributor
    • Joined on 05-10-2007
    • Member
    • Points 445

    Re: 1s delay bug still present

    Hello Thomas,

    it doesn't depend on the server (happens also with a Samba server) and I already disabled opportunistic locking when you suggested this years ago, without any success.

    As I described 2004, it's a client problem likely introduced with Windows NT. It happens if I execute a certain sequence of file commands like this:

    • fopen
    • fseek to near the end
    • fputc
    • fseek to near the beginning
    • fgetc
    • fclose -> serviced only once per second

    BTW: You can use Win32 API calls instead of ANSI calls, it doesn't matter.

    A slight delay between the calls avoids the error, therefore I'm pretty sure it's a race condition in Windows.

    If someone is interested, I can provide a test program (Win32API and ANSI) demonstrating the error.

    Pmail is affected if messages are deleted (manually or by a filtering rule) or moved/copied by a filtering rule _and_ the target folder of the operation is closed (traditional view, not 3-pane). Only in this case, Pmail opens and closes the target file repeatedly (I still wonder why!).

    Moving and copying manually is always fast, even if moving to the "deleted messages" folder (that's a partial workaround). Deleting mails finally from the "deleted messages" folder is also fast.

    Oliver

  •  09-17-2008, 17:58

    Re: 1s delay bug still present

    I'm not at all sure i understand all that you are talking about but the oplocks fixes the 1 second delay with any windows system used as the server.  Since I do a lot of filtering to folders and deleting messages in closed folders, using both Netware and Windows servers as the mail store, without seeing this one second delay at all I can only assume that this is related to the specific environment. It's certainly not a bug in WinPMail, it's working as designed.  There might be some changes in the way that the files and folders are processed but that's comeing with the new folders in v5.0.

    Thomas R. Stephenson
    San Jose, California
    Member of Pegasus Mail Support Team

    I do not answer private messages from the forum. If you want to contact me use email to techsupp@tstephenson.com.
  •  09-17-2008, 18:49

    • obetz is not online. Last active: 2019-02-19, 16:15 obetz
    • Top 500 Contributor
    • Joined on 05-10-2007
    • Member
    • Points 445

    Re: 1s delay bug still present

    as I wrote, it's not a real bug in Pmail but apparently in the Windows client (NT family).

    Pmail only triggers the bug by opening and closing the mail folder file repeatedly in a special manner under certain conditions.

    Since the bug depends on very tight timing, it's not reproducible on every system. In my test program, I could avoid the deadlock by adding delays of much less than 1ms. Another example: It went also away when I installed Kerio Firewall on my old W2K machine.

    I tracked down this bug several years ago and reported the details to David Harris in the hope he would change the sequence of file operations some day.

    Oliver

  •  09-17-2008, 19:14

    • PaulW is not online. Last active: 10 Nov 2019, 14:35 PaulW
    • Top 10 Contributor
    • Joined on 05-08-2007
    • UK
    • SuperStar
    • Points 18,410

    Re: 1s delay bug still present

    I've noticed this, but it isn't consistent.  About a third of the time, windows seems to be OK, and the messages get moved/deleted at normal pace.

    But it is awkward enough for me to do most of my big moves & deletes over IMAP these days, where the actions are much quicker.


  •  09-17-2008, 20:27

    • obetz is not online. Last active: 2019-02-19, 16:15 obetz
    • Top 500 Contributor
    • Joined on 05-10-2007
    • Member
    • Points 445

    Re: 1s delay bug still present

    if it's really a race condition (and I bet it is), "not consistent" is normal.

    Regarding "big moves and deletes":

    • Manual move shouldn't be affected.
    • Try to open the target folder (not possible in the "new" three pane view, so use the old multi window view) before you start the filtering rule. This should avoid the delay.
    • Instead of delete, move the mails to the "deleted mail" folder

    Oliver

  •  09-17-2008, 21:51

    • PaulW is not online. Last active: 10 Nov 2019, 14:35 PaulW
    • Top 10 Contributor
    • Joined on 05-08-2007
    • UK
    • SuperStar
    • Points 18,410

    Re: 1s delay bug still present

    obetz:
    if it's really a race condition (and I bet it is), "not consistent" is normal.

    Agreed, and that was my interpretation of the symptoms.

    As I only experienced it on one network and no others, I put it down to the specifics of that configuration, but didn't investigate it.

     

    Regarding "big moves and deletes":

    • Manual move shouldn't be affected.
    • Try to open the target folder (not possible in the "new" three pane view, so use the old multi window view) before you start the filtering rule. This should avoid the delay.
    • Instead of delete, move the mails to the "deleted mail" folder

    I'll try to do that next time.

     

  •  09-17-2008, 22:32

    Re: 1s delay bug still present

    As I only experienced it on one network and no others, I put it down to the specifics of that configuration, but didn't investigate it.

    What was the network and server and do you have oplocks turned off on your system?

     


    Thomas R. Stephenson
    San Jose, California
    Member of Pegasus Mail Support Team

    I do not answer private messages from the forum. If you want to contact me use email to techsupp@tstephenson.com.
  •  09-17-2008, 23:50

    • PaulW is not online. Last active: 10 Nov 2019, 14:35 PaulW
    • Top 10 Contributor
    • Joined on 05-08-2007
    • UK
    • SuperStar
    • Points 18,410

    Re: 1s delay bug still present

    Windows tcp/ip & netbui with NT4 server and default oplocks - the same as two other installations where the symptoms were not present.

     I'll try again with oplocks off.

View as RSS news feed in XML

Contact | Advertise | Host provider: PraktIT | Terms of Use | Privacy Statement
Copyright © 2007-2011 David Harris / Peter Strömblad. | Pegasus Mail Home Page