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

Document portal: Writing causes error #570

Closed
Unrud opened this issue Feb 16, 2017 · 4 comments
Closed

Document portal: Writing causes error #570

Unrud opened this issue Feb 16, 2017 · 4 comments

Comments

@Unrud
Copy link

Unrud commented Feb 16, 2017

Exporting a document and writing to it from within the sandbox causes xdg-document-portal to stop working.

Test:

APP="..."

tmp="$(mktemp)"
sandbox_tmp="$(flatpak document-export --app="$APP" --unique --transient --allow-write "$tmp")"
flatpak run --command=dd "$APP" if=/dev/zero of="$sandbox_tmp" ibs=1M count=100 obs=1
flatpak document-unexport "$sandbox_tmp"
rm "$tmp"

Output:

dd: writing to ‘/run/user/1000/doc/7a021286/tmp.xxP9AopWEd’: Software caused connection abort
1+0 records in
16097+0 records out
16097 bytes (16 kB) copied, 0,202229 s, 79,6 kB/s
Error: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code1: No such file or directory
...
XDP: xdp_fuse_lookup 5/7a021286 -> 
XDP: xdp_fuse_lookup <- inode 4
XDP: xdp_fuse_lookup 4/tmp.xxP9AopWEd -> 
XDP: xdp_fuse_lookup <- inode 6
XDP: xdp_fuse_open 6 flags 100001
XDP: Created temp file .xdp_tmp.xxP9AopWEd.X66SVY
XDP: xdp_fuse_setattr 6 8 (nil)
XDP: xdp_fuse_write_buf 6 0
XDP: xdp_fuse_write_buf 6 1
...
XDP: xdp_fuse_write_buf 6 16095
XDP: xdp_fuse_write_buf 6 16096
fuse: copy from pipe: short read
@Unrud
Copy link
Author

Unrud commented Feb 21, 2017

Workaround: Removing the fuse argument splice_read seems to fix the problem.

@alexlarsson
Copy link
Member

Yeah, i can reproduce this too. I wonder if its a fuse issue. Lemme dig into it.

@alexlarsson
Copy link
Member

This seems related to buffer sizes. I can't seem to reproduce with:

while true; do flatpak run --command=dd org.gnome.gedit if=/dev/zero of="$sandbox_tmp" ibs=100k count=1 obs=4096; done

But with:

while true; do flatpak run --command=dd org.gnome.gedit if=/dev/zero of="$sandbox_tmp" ibs=100k count=1 obs=4095; done

It reproduces pretty quickly.

@alexlarsson
Copy link
Member

I was able to reproduce it with a 4096 size too. This seems completely busted, i think we'll just disable spice_read.

alexlarsson added a commit that referenced this issue Feb 23, 2017
We're getting "fuse: copy from pipe: short read" from
libfuse and a broken filesystem with this. See
#570

I've tried to look into if this is fixable, but I can't
really find any way we could do things differently that
may help, so the fix is to disable spice_read.
alexlarsson added a commit that referenced this issue Feb 28, 2017
We're getting "fuse: copy from pipe: short read" from
libfuse and a broken filesystem with this. See
#570

I've tried to look into if this is fixable, but I can't
really find any way we could do things differently that
may help, so the fix is to disable spice_read.

(cherry picked from commit 4fdac9e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants