Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in writing sub-document content.xml #3457

Closed
JanHolger opened this issue Oct 21, 2021 · 3 comments
Closed

Error in writing sub-document content.xml #3457

JanHolger opened this issue Oct 21, 2021 · 3 comments
Labels
bug Something isn't working unconfirmed

Comments

@JanHolger
Copy link

JanHolger commented Oct 21, 2021

Describe the bug
Saving the document doesn't work for some sessions and instead throws an error saying "Error in writing sub-document content.xml" in the log which comes from LibreOffice itself (from what i've read online) when saving the document to the temp file.

To Reproduce
Steps to reproduce the behavior:

  1. Open up a writer document from WOPI
  2. Modify it and save it
  3. Have a bit of luck (it doesn't happen always but quite a lot of times)
  4. See the unexpected behavior described below (and an error popup in older versions)

Expected behavior
The document gets saved to the WOPI server and the save button turns blue.

Actual behavior
For some sessions (we couldn't find a real reproduction procedure in a month) the save button stays red upon clicking it, the WOPI server doesn't receive a request and multiple error messages appear in the log.

Screenshots

wsd-00001-00120 2021-10-21 09:03:59.481834 [ docbroker_007 ] INF  Saving doc [/wopi/files/test.odt] using session [57c].| wsd/DocumentBroker.cpp:1811
kit-00107-00023 2021-10-21 09:03:59.510817 [ kitbroker_007 ] ERR  CALLBACK_ERROR: {
    "code": "0x38070c23(Error Dynamic)",
    "kind": "",
    "cmd": "",
    "message": "Schreibfehler.\nError in writing sub-document content.xml."
}
| kit/ChildSession.cpp:2740
kit-00107-00023 2021-10-21 09:03:59.510876 [ kitbroker_007 ] ERR  error: cmd= kind= code=0x38070c23(Error Dynamic)| ./common/Session.hpp:130
wsd-00001-00120 2021-10-21 09:03:59.510962 [ docbroker_007 ] WRN   error failure: | wsd/ClientSession.cpp:1514
wsd-00001-00120 2021-10-21 09:03:59.511166 [ docbroker_007 ] INF  ToClient-57c: Command: unocommandresult: {
    "commandName": ".uno:Save",
    "success": "false",
    "result": {
        "type": "void"
    }
}
| wsd/ClientSession.cpp:1443
wsd-00001-00120 2021-10-21 09:03:59.511206 [ docbroker_007 ] INF  Save result from Core (failure):  (during Activity::Save)| wsd/DocumentBroker.cpp:1136

Desktop (please complete the following information)

  • OS: windows, osx, linux
  • Browser: chrome
  • Version: 94

Additional context
We've tried to fix this problem ourselves for a month now but we weren't able to find the issue. I've tried to walk through the code myself but wasn't able to trace the error back to it's root. The server is running in docker with the latest image but older images didn't work either. We've tried our production WOPI (that isn't in our hands) and i've written a pretty basic WOPI server to validate whether the WOPI causes the problem and this way we found out that the WOPI doesn't even receive a request when this error happens. I've googled the error and found out that it has something to with LibreOffice saving the document to disk.

@JanHolger JanHolger added bug Something isn't working unconfirmed labels Oct 21, 2021
@thebearon
Copy link
Contributor

This is a very broad error message. I'm afraid this is only actionable if you have an exact reproducer, very likely strongly document-dependent, and even then, the problem would be coming from the Collabora Office core backend (which is based on LibreOffice). If you have a reliable reproducer, and encounter the same error in a recent LibreOffice version, please report it at https://bugs.documentfoundation.org/

For reference, here's an amount of previous bug reports in LibreOffice on similar cases:
https://bugs.documentfoundation.org/buglist.cgi?list_id=1369813&longdesc=Error%20in%20writing%20sub-document&longdesc_type=allwordssubstr&query_format=advanced

@JanHolger
Copy link
Author

First of all thank you really much for confirming that the error message itself indeed comes from LibreOffice and not online.

It doesn't seem to be document dependent. We've tried with files generated from our lms integration, i've manually created files locally and i've downloaded sample odt files from the internet and we had the same error for all of them. And while editing the same document some views can save while others can't.

We've also sometimes seen this error but we weren't sure whether it's related:

wsd-00001-00027 2021-10-21 08:40:23.987189 [ websrv_poll ] ERR Download file [/opt/lool/child-roots/d3scNvCXG33wYVdm/tmp/user/docs/e2vtuKQ4R9j81RHh2mR425xpNIiLk09zUObu7a7Rx6m0hVCA0Xwh49t6XfRsHRLV/test.odt] not found.| wsd/LOOLWSD.cpp:3388

Is the error maybe happening because the tempfile is being deleted while it's still needed and the error appears because LibreOffice fails to write to the missing file?

@JanHolger
Copy link
Author

For those running into the same issue: The docker image uses a pretty old version of LibreOffice (6.4) which seems to have this problem. We built it ourselves with the up to date version of LibreOffice now which solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
None yet
Development

No branches or pull requests

2 participants