Samba and Adobe Illustrator locking issues.
jra at samba.org
Tue Jan 5 19:33:20 UTC 2021
On Mon, Jan 04, 2021 at 11:44:34PM -0800, Yogesh Kulkarni via samba-technical wrote:
> I have a strange case of lost updates with the Adobe Illustrator .ai files
> samba server. I am writing this to validate my findings and ask if there
> known workaround to this issue.
> The samba version is 4.9.5 running on debian 10.x and clients are multiple
> The customer reports an issue with multiple users working on .ai files.
> the use case -
> User A - edits a file test.ai and saves the changes
> User B - opens the file and expects the changes to be present in the file.
> (almost immediately). So, they are not co-editing, but opening the files in
> quick succession.
> However, it turns out that User B cannot see the changes.
> Observations -
> On the client side, finder shows that one or more '.tmp' files are getting
> created when a user saves the .ai file. These .tmp files sometimes go away
> other times stay till the user disconnects the share.
> Network caps indicate that the application does **not** use oplocks/leases.
> Hypothesis -
> UserA writes to the test.ai file and the application writes the updates to
> UserB has their finder open and obtains a lock on the .tmp file. Now, when
> tries to rename the file from xyz.tmp to the test.ai file, since UserB has
> this operation does not go through. In a way this is a deadlock as UserB
> to open the file to see the updated content, but it cannot do so, since it
> the resource and that prevents UserA from updating the content.
> Experimentation and results
> In order to verify this hypothesis and cater to the customer case, we
> renaming the locking.tdb without restarting the daemon. This addresses the
> Obviously, if we take out the locking component, there is always potential
> of simultaneous users overwriting each others data.
> I experimented with the locking = No, and checked with smbstatus, but with
> enabled, I see that a .pdf file shows as locked in output of smbstatus
> So I conclude that the samba process internally acquires the advisory lock
> the file.
> Is there a more elegant way of turning off the locking than just renaming
> locking.tdb ? We do not use clustered mode and will probably never support
> the product.
> Are there any such cases seen in the field in your knowledge ?
> Is there a tried and tested solution to this issue ?
You can always set "locking = no" but that turns off only the
byte range locking not the share mode locks.
I'd recommend you log a bug and upload the wireshark traces
so this can be investigated. Might be an issue with the
MacOSX client but it's hard to tell from the description.
More information about the samba-technical