"Locking Violation" error when accessing file over

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
pcoreyboyer
Posts: 2
Joined: Thu Nov 04, 2010 7:43 pm

"Locking Violation" error when accessing file over

Post by pcoreyboyer »

Hello -

We're running Textpad 5.4 under Windows 2008 R2 x64, and are getting a recurring "Locking Violation" error.

To reproduce this, we have several output files open within Textpad that are hosted on a Redhat Linux Samba share. We kick off a background process that recreates and constantly writes to these output files.

The first time these files are created, we receive the following pop-up:

"Encountered a locking violation while accessing <filename>"

It then prompts us to reload the file, even though we have auto-reload enabled in Preferences --> File. As the file is refreshed, it then constantly prompts us to reload the file.

We've verified that permissions are correct on the server side, and none of the other "Keep files locked while editing them", "Open locked files read-only", etc. Textpad options seem to make a difference.

Has anyone seen anything similar to this, or any ideas where to go next?

Thanks in advance!
- Corey
Last edited by pcoreyboyer on Wed Nov 17, 2010 1:08 am, edited 2 times in total.
tanstaafl
Posts: 3
Joined: Sat Nov 13, 2010 3:28 pm

Post by tanstaafl »

does this happen if U write to a shared folder on another/the same Windows machine? SAMBA isn't quite an exact match for SMB on Windows.
pcoreyboyer
Posts: 2
Joined: Thu Nov 04, 2010 7:43 pm

Post by pcoreyboyer »

tanstaafl wrote:does this happen if U write to a shared folder on another/the same Windows machine? SAMBA isn't quite an exact match for SMB on Windows.
Apologize, I should have updated this sooner.

The problem turned out to be an oplock issue within Samba, and was not limited to TextPad. If anyone has a similar problem, the solution is:

- Upgrade to something beyond the 3.0.28 branch that RHEL 5 is locked into (they are not necessarily backporting all functional fixes - just security patches),
- Enable the following options in smb.conf:

strict locking = no
level2 oplocks = no
oplocks = no

After restarting Samba, that seemed to resolve the issue.

Thanks,
- Corey
Post Reply