Created attachment 7091 [details]
- SLES11SP1 Server with SAMBA 3.5.12 (from Sernet). Samba is configured with just one writable share (see attached config)
- Windows 7 (Enterprise) PC connects to this share and makes is "always available" using offline files (now sync center). With MSOffice 2010 (2007 not tested), we create a new .docx file on the share, make some changes and save it a couple of times to this share.
Lots of XXXXXXX.TMP files created by Office. The docx file is still "seen" by the client, but most likely only due to its offline version, it is not actually on the server.
a) Disable offline files on the client. Then everything is back to normal, but no offline files available :-)
b) Disable oplocks on the server using
oplocks = no
level2 oplocks = no
in smb.conf and restart Samba.
Using a Windows 2008R2 share, the same scenario works fine.
I will provide a level 10 debug log from Samba soon.
Created attachment 7092 [details]
Debug log level 10
Scenario: The Windows 7 client is connected to the share and has it "always available offline".
The debug log starts after the new file "New Microsoft Word Document.docx" has been successfully opened by MS Word. I put some text and hit save (CTRL-S).
The original docx disappears on the server and a file named "1038F1DB.TMP" remains.
Created attachment 7093 [details]
Debug log level 10 with oplocks disabled
Same procedure as before, but with oplocks disabled on the SAMBA side. Now file saving works normally!
Do you get the same problem if you set "kernel oplocks = no" ?
(In reply to comment #3)
> Do you get the same problem if you set "kernel oplocks = no" ?
so I just tested (smb.conf)
kernel oplocks = no
# oplocks = no
# level2 oplocks = no
and I still have the problem. Is that what you meant?
It seems that this issue also exists in 3.6.3.
Is there any workaround?
This is something we have been able to reproduce accurately in two completely different environments, with both samba-4.3.13 and samba-4.4.8 in FreeBSD. The steps to reproduce are:
1. Online, make sure to sync, without conflicts.
2. Go offline (Wait for Sync Center to go opaque and and the folder in explorer to reach status "Offline Status: Offline (not connected)").
3. Create a new MS Word document in the "Always available offline" enabled share and open the document in Word.
4. Type in some data and _with_the_document_still_open_, save.
5. Go online again (Wait for the "Sync All" button to reappear and the folder in explorer to reach status "Offline Status: Online").
6. Type in some more data, then _save_and_close_the_document_.
7. Watch how folder status temporarily goes to offline status for a while before going online again, then the document disappears and gets renamed to "([A-Z0-9]+).tmp"
100% reproducible. How can we help to get this resolved?
Can you get a wireshark trace of this problem happening please ?
Created attachment 13129 [details]
Absolutely! I have uploaded a wireshark trace of the procedure from mapping the share, up to when the file gets renamed in the file called "offline-files.pcapng"