[jaunty] openoffice cannot write to samba shares (some kind of gvfs timeout?)

Bug #279789 reported by Christian Paratschek
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Low
Chris Cheney
Nominated for Intrepid by Christian Paratschek

Bug Description

Enable gio in OOo 3.0.0 to see if it helps resolve this issue.

===

Intrepid Ibex, Updates through today, 07.10.2008.

Setting:
To share my files across my computers, I set up a small Debian server. I use Samba to serve my files. The server is working correctly (Windows XP, and my Hardy install and a Fedora install use it without any problems. I can see the share and open files from it. I can also move, delete and rename files on the sharewith Nautilus.

What should happen:
When I hit "save" in an application, I should be able to save a file directly to the network share.

What actually happens:

When I try to save a file that I opened to the network share again, things fall apart:

- OpenOffice (2.4.1 on one machine, 3.0rc2 from ppa on another) replies (in German): "Fehler beim Speichern des Dokumentes [filename]: Allgemeiner Fehler. Allgemeiner Ein-/Ausgabefehler"
That translates roughly to: "Error saving file: common error. Common Input/Outputerror"
If I save a file under a new name, OpenOffice will create the file on the share with the name, but give me the error and the filesize is 0 Bytes.

- GEdit does this: (Open file, change something, save as (new name)): create the file under the new name with 0 Bytes, give me error "File /path/to/filename could not be saved. unexpected error: not a directory". When I start Gedit from terminal, I get to see "WARNING **: Hit unhandled case 4 (Not a directory) in parse_error.

- Bluefish: this one is interesting because a little different: it manages to write the file without errors - but only to a new file. I cannot open a file, change something and save it under the same name.

Additional info:
- I can save to local shares without any problem. This happens specifically with networked Samba shares.
- This problem is the same on 3 computers. They are all pretty much naked, new installs.
- My /etc/fstab line for the samba share:
//192.168.x.x/Daten /home/christian/Server cifs auto,user,username=xxx,password=xxx,uid=xxx,gid=xxx,iocharset=utf8,codepage=cp850 0 0

Best regards,
Christian

Revision history for this message
Christian Paratschek (christian-paratschek) wrote :

I just found an important additional piece of information:

I unmounted the share and mounted it again, but not with the fstab-entry, but instead via "Places" - "Network" - "Windows Network" - "Workgroup" - "Servername" (and rightklick there the share)

In this scenario GEDit and Bluefis work. I am able to edit files directly on the network share and save them (under the same and under new names)

The problem persists in the described manner when using OpenOffice.

Is this some kind of gvfs issue? (I totally don't have a clue, I justed searched the internet for quite some time yesterday and today in the morning for some issue like this)

Revision history for this message
Christian Paratschek (christian-paratschek) wrote :

Ok, parts of this is solved:

You get errors and problems nowadays if you mount network shares with anfstab-entry like the above.
The recommended way to use a network share is clearly to use places - connect to share and set a bookmark.
Then you use the bookmark at first_access, when you need it. No more static fstab entry for a network share.

If you work this way, Gedit and Bluefish will work now, like I said in the last comment

What remains is a problem with OOo:

Steps to reproduce (assuming you have created a bookmark for your network share before):

1. Start Intrepid (Updates as of 17.10.)
2. Log into Gnome
3. Start OO-Writer
4. Type something and save
5. Select the network share from the bookmarks left. It will show up.
6. Enter a name and hit save
7. Now we get a strange password dialogue. If I put my password in and hit "OK" i get the following error: "Fehler beim Speichern des Dokuments Unbenannt1: Ein allgemeiner Fehler im Internetbereich trat auf." Hit "OK" and I get the error from above: Fehler beim Speichern des Dokumentes Unbenannt1: Allgemeiner Fehler. Allgemeiner Ein-/Ausgabefehler. (Hit Ok)
(Translation: Error saving document unnamed1: a common error in the internet zone occured." and "Common error. Common Input/Output error"
8. The document is no not saved on the share

However, if I try it IMMEDIATELY again now:
9. Close OOO writer
10. Start OOO writer
11.Type something and save
12. Now I use the created entry for my network share (the bookmark is gone because I already mounted it before)
13. Enter a name and hit save

It works!

If I wait for some minutes and repeat steps 10-13 it will fail again.

I guess there is some kind of timeout? It has clearly (for me) to do with openoffice not getting information from gvfs.

Chris Cheney (ccheney)
Changed in openoffice.org:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Christian Paratschek (christian-paratschek) wrote : Re: openoffice cannot write to samba shares (some kind of gvfs timeout?)

I have done some more testing:

1. I started Windows XP on one of the clients and set up a shared folder there. I could access this folder from Intrepid OpenOffice and I could save without any problems. Also it didn't ask for an extra password like described in Step 7 above. It just did what it should do.

2. Then I set up a share on my main workstation (running a pretty fresh Ubuntu 8.04) with the Nautilus tools (sudo nautilus, because it wont' work as normal user, rightklick folder, select "Sharing Options"). It even had to install the necessary packages, there was no sambaserver running on this machine before.

2a. I started Win XP, connected to the new share and created a file - no problem.
2b. I switched to my Intrepid machine, opened the file, changed it, saved it, no problem.
2c. I rebooted the Intrepid machine, started OOo writer, typed, tried saving to the share and it failed again.
2d. I closed OOo Writer, reopened it, typed, saved to share and worked again. I opened a second doc and it worked too.
2e. Then I closed OOo and waited for >30 minutes. Started OOo, created file, saved, still no problem.
2f. Then I logged out (but did not restart), logged back in, started OOo, and the problem is there again. And if I close OOo and reopen it, it works again.

To sum up:

1. Windows share - all clients work, XP, Hardy and current Intrepid
2. Debian Etch share + Hardy share - Windows client works, Hardy client works, Intrepid fails (on first access, subsequently OOo succeeds).

So, interestingly, I could use Windows as server and Linux as client (ugh...). The problem only shows up when I try to use OOo on an Intrepid machine connecting to a Linux SMB server (Etch or Hardy).

The problem only shows up the first time I try to save to a share. Closing OOo, reopening it solves the problem, from then I can save files without problems. Also I don't get asked for a password again.

I am not a programmer but could it be that OOo somehow
a. does not accept GVFS permissions,
b. asks for a password itself
c. fails anyway, but
d. keeps the authorization for the share alive so that subsequent writes to the shares succeed?

Most importantly: Is this thing reproducible for others? I will help with whatever resourced I have.

Regards,
Christian

Revision history for this message
Christian Paratschek (christian-paratschek) wrote :

Some more research:

I am pretty sure that this bug is twofold:

1. The password dialog in OpenOffice, indicating that OOo does not get information from Nautilus/GVFS
2. The write-error itself-

Regarding 1: this bug seems to be connected to these two, possibly all three duplicates:

https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/247485
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/229839

Regarding 2: an interesting source I found of someone who experienced the »general input/output error«, but only with doc-files:

http://user.services.openoffice.org/en/forum/viewtopic.php?f=16&t=7352&start=0&st=0&sk=t&sd=a

He installed sun-java, then it worked.

I just installed package openoffice-org (the complete metapackage), because I thought it might be that the authentication works with some modul that I had not installed. Alas, no success.

Then installed default-jre (which is openjdk), no success.

Finally I removed openjdk and installed sun-java6, but also no success.

Best Regards,
Christian

Revision history for this message
Christian Paratschek (christian-paratschek) wrote :

Something has changed here:

Sometime between the RC and the final release of Intrepid, this issue has transformed.

Current status: if I open a file on an SMB share (with Nautilus/GVFS), Openoffice asks for a password right away, I fill it in, then the file pops open. Then I can edit and save without any problems. If I open another file later, it will work flawlessly, even without the password dialog. Seems that Openoffice at least keeps the password as soon as we entered it once for a session.

What is still completely broken: opening a file on a share that is mounted via fstab, as described in the first post. Here I get the following:

- File opens (here without pw dialog)
- Edit, Save - "Error saving file: common error. Common Input/Outputerror". I can just click "OK" now, the file is not saved

This issue is connected with bugs 261148, 247485, 229839, maybe even 36424.

Best regards,
Christian

Chris Cheney (ccheney)
Changed in openoffice.org:
assignee: nobody → ccheney
milestone: none → jaunty-alpha-1
description: updated
Revision history for this message
Stefano Rossi (stefano-rossi) wrote :

I have the same problem.
Since I used Ubuntu 8.06 client on a 7.10 Samba server it was all Ok. The problem with "Error saving file: common error. Common Input/Outputerror" was just workaround with a "veto oplock files = /*.odb/*.ott/*.ods/*.odt/" in smb.conf of the server.

But now, after upgrading to Ubuntu 8.10 in client, OO doesn't save in server, neither Gedit, saying "... not a directory". But Gimp does and also other applications.

Stefano

Revision history for this message
Stefano Rossi (stefano-rossi) wrote :

I add just another try I did last night: working with the "old" kernel 2.6.24-21-generic and the same Ubuntu 8.10 all works...

Stefano

Revision history for this message
Christian Paratschek (christian-paratschek) wrote :

Confirmed: with Intrepid + current Hardy kernel 2.6.24-21, I have no problem writing to the share, even if it mounted via fstab!
Gnome Apps work as does OpenOffice, no password dialog, nothing. It just works.
Rebooting to 2.6.27-7, Gedit gives me "Not a directory", OpenOffice will do "Input/Outputerror" again.

So this is most certainly a kernel bug, probably in the CIFS module.

Revision history for this message
Christian Paratschek (christian-paratschek) wrote :

Please reassign to kernel, if you think this is appropriate. I couldn't find the according package...

Revision history for this message
Stefano Rossi (stefano-rossi) wrote :

I was able to made all work with kernel 2.6.27.7 adding the parameter "nounix" (I'm using a Samba server with Feisty, but my Intrepid client "thinks" it's a win one...) in my fstab. Beware: you must restart all to take effect, if you just try "mount -a" it doesn't work.

Now the "mount" command says:
//192.168.1.1/DocumentiRete on /home/steve/Scrivania/Rete type cifs (rw)

and not:

//192.168.1.1/DocumentiRete on /home/steve/Scrivania/Rete type cifs (rw, mand)

as it was before.

And all works, both with OO and Gedit

Stefano

Revision history for this message
Christian Paratschek (christian-paratschek) wrote :

Finally found something in launchpad:

Please close this, as it is a dupe of

https://bugs.launchpad.net/ubuntu/+source/samba/+bug/286828

Revision history for this message
Wolf Rogner (war-rsb) wrote :

I think this is a bug in OOo 3.0

my params:

uname -a
Linux wb 2.6.27-10-generic #1 SMP Fri Nov 21 19:19:18 UTC 2008 x86_64 GNU/Linux

OOO300m9 (Build: 9358) openoffice.org 1:2.0.0.6ubuntu0intrepid1

1. GEdit (as any other apps) works fine on my machines with gfvs.
2. OOo 2.4.1 works fine

=> There is nothing wrong with the kernel or gvfs

3. OOo 3.0 does not save files on smb shares. Produces well known error message (see above)
4. Saving same file as text or MS Office format works fine.

=> This must have something to do with the new ODF1.2 format filter

5. There is no ODF 1.1 filter !!!
6. There is no docx filter either ??? (Its supposed to be somewhere)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.