After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 615346 - Unable to create new files(via save as,nautilus copy or move) on reiser4 partition
Unable to create new files(via save as,nautilus copy or move) on reiser4 part...
Status: RESOLVED NOTGNOME
Product: glib
Classification: Platform
Component: gio
2.24.x
Other Linux
: High critical
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-04-10 08:37 UTC by Serkan Kaba
Modified: 2017-11-20 15:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
a simple copy example to demonstrate problem (765 bytes, text/plain)
2010-09-06 18:23 UTC, Serkan Kaba
  Details
Patch to avoide splice usage for reiser4 targets. (1.17 KB, patch)
2011-01-21 20:44 UTC, Serkan Kaba
none Details | Review
Patch to avoide splice usage for reiser4 targets. (1.54 KB, patch)
2011-01-21 21:00 UTC, Serkan Kaba
none Details | Review
Patch to avoide splice usage for reiser4 targets. (1.55 KB, patch)
2011-04-06 20:05 UTC, Serkan Kaba
none Details | Review
Patch to avoide splice usage for reiser4 targets. (1.25 KB, patch)
2011-04-23 09:17 UTC, Serkan Kaba
none Details | Review

Description Serkan Kaba 2010-04-10 08:37:30 UTC
When I copy paste files into reiser4 partitions in gnome 2.30 the file is created empty (0 bytes) it works on 2.28, I suspect gio-2.30/reiser4 to be responsible (other filesystems do work), is there anything I can provide to debug the issue besides pasting my emerge --info

Portage 2.2_rc67 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.10.1-r1, 2.6.32-hh1 x86_64)
=================================================================
System uname: Linux-2.6.32-hh1-x86_64-Intel-R-_Core-TM-2_CPU_6700_@_2.66GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 08 Apr 2010 18:15:01 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1
dev-python/pycrypto: 2.1.0_beta1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r3, 1.10.3
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2 -mtune=core2 -msse -msse2 -msse3 -mmmx -mfpmath=sse"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=core2 -mtune=core2 -msse -msse2 -msse3 -mmmx -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.linux.org.tr/gentoo   http://distro.ibiblio.org/pub/linux/distributions/gentoo/ "
LANG="tr_TR.utf8"
LC_ALL="tr_TR.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="tr"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/berkano /usr/local/portage/layman/gnome /home/firari/overlays/java-overlay /home/firari/overlays/java-experimental /home/firari/overlays/serkan-overlay /home/firari/overlays/overlay"
SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi aim alsa amd64 asf ass audacious bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdinstall cdr cli cracklib css cxx dbus dri dts dvd encode exif faac faad fam ffmpeg firefox ftp gcj geoip gif gimp gnome gnome-keyring gnutls gpm gps gstreamer gtk gzip hal iconv icq idn java java6 javascript jbig jingle joystick jpeg jpeg2k lame lcms libnotify lm_sensors lzo mad matroska mmx mmxext modules mp3 mp4 mpeg mplayer msn mtp mudflap multilib musicbrainz nautilus ncurses nls nptl nptlonly offensive ogg opengl openmp oscar pam pcre pdf png pppd quicktime readline reflection seamonkey session smp spell spl sse sse2 sse3 ssl startup-notification subversion svg symlink sysfs syslog system-sqlıte systemsqlite taglib tcpd theora threads tiff truetype unicode usb v4l v4l2 vcd videos vorbis wmf x264 xattr xcb xine xmp xorg xulrunner xv xvid xvmc yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="tr" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia fbdev vesa v4l" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Andrew Cowie 2010-04-15 04:50:25 UTC
So you've got reiser4 there care of the hitchhiker -hh patch set, which is a -gentoo fork, right? Do you have another kernel you can check against? If you can find a -vanila+reiser4 kernel or similar then we can remove the -gentoo vendor patchset as a variable and isolate the reiser4 <-> GLib interaction

AfC
Comment 2 Serkan Kaba 2010-04-17 11:53:56 UTC
I just upgraded only glib and reproduced the issue so we found the exact package causing it.
Comment 3 Serkan Kaba 2010-04-18 07:54:08 UTC
By the way Gedit works but, EOG, Nautilus doesn't how do they differ in file creation?

I also wrote a sample gio file copy program which works as well.
Comment 4 Tomas Bzatek 2010-04-19 14:49:06 UTC
Reiser4 patchset had known problems with syncing data to disk, resulting in oops. Try some 2.6.33 patchset, at least 2.6.33-zen1 works fine here.
Comment 5 Serkan Kaba 2010-05-25 21:10:48 UTC
Sorry for the late answer I missed the mail from bugzie. Anyway I tried 2.6.33-zen2 and that doesn't work either :(

Any other stuff to investigate?
Comment 6 luciano 2010-09-04 16:00:36 UTC
Hi just want to add my five cents: I also have a kernel 2.6.34.4 with gentoo patches and reiser 4 patches, and this is still happening.
Comment 7 luciano 2010-09-05 16:52:49 UTC
Until this gets fixed, is there a workaround? e.g. using earlier version of nautilus? It's really causing me problems as none of my files are being saved!
Comment 8 Serkan Kaba 2010-09-05 19:16:49 UTC
Seems like glib 2.24 is the error and we're stuck on GNOME 2.28 :(
Comment 9 Tomas Bzatek 2010-09-06 10:03:41 UTC
(In reply to comment #8)
> Seems like glib 2.24 is the error and we're stuck on GNOME 2.28 :(

Can you specify what is the error exactly? Glib does nothing more than using POSIX calls, there should not be any difference when using other non-glib based apps.
Comment 10 Serkan Kaba 2010-09-06 10:51:15 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Seems like glib 2.24 is the error and we're stuck on GNOME 2.28 :(
> 
> Can you specify what is the error exactly? Glib does nothing more than using
> POSIX calls, there should not be any difference when using other non-glib based
> apps.

Not all glib applications fail either, I happen to hit it with Nautilus and Eye of GNOME, but not with a simple gio copy call. It doesn't give an error either you just blindly end up with a null file. How can I simulate nautilus file copy programatically?

I'll try to add some test cases to debug.
Comment 11 luciano 2010-09-06 17:21:39 UTC
As describe above, there is no error. Copying a file or doing 'save as' from several gnome apps (e.g. evince) creates a new file, which is empty i.e. 0 bytes. Don't think it's a problem at the disk level, as you can still use 'cp' from the shell without any probs. However, it's a real pain as I keep on forgetting this happens and fail to save files.
Comment 12 Serkan Kaba 2010-09-06 18:23:34 UTC
Created attachment 169599 [details]
a simple copy example to demonstrate problem

The target and the source being my home directory which resides in a reiser4 partition, this file copy just works.
Comment 13 luciano 2010-09-06 18:56:00 UTC
(In reply to comment #12)
> Created an attachment (id=169599) [details]
> a working copy example
> 
> The target and the source being my home directory which resides in a reiser4
> partition, this file copy just works.

I'm afraid I still have a problem in this case. copying a file f from ~/ to ~/d/ doesn't work. It is created empty.
Comment 14 Tomas Bzatek 2010-09-06 20:09:33 UTC
Confirming, just tested on my gentoo box running 2.6.35-zen2, dev-libs/glib-2.24.1. Tested copying about 700MB in 4000 files produced all zero sized files, using GIO functions, including nautilus and gvfs-copy. POSIX cp and also mc copied all files just fine. 

Saving files in gedit works fine. No messages in dmesg. Strange that 'du' shows correct sizes.

Will test in Fedora tomorrow.
Comment 15 Serkan Kaba 2010-09-07 04:13:52 UTC
(In reply to comment #13)
> I'm afraid I still have a problem in this case. copying a file f from ~/ to
> ~/d/ doesn't work. It is created empty.
I was tricked by the display of the leftout thumbnail, yes it doesn't work for me either.
Comment 16 Tomas Bzatek 2010-09-07 14:34:17 UTC
Reproducible on Fedora as well. I suspect our splice change causing pain. Going to look at this in the coming weeks.
Comment 17 Serkan Kaba 2010-09-12 18:00:19 UTC
As per reiser4 upstream comment[1] can we disable splice use on reiser4 targets. We may need to get bug #617245 fixed.
 
1: http://marc.info/?l=reiserfs-devel&m=128431393307748&w=2

Thanks,
Serkan
Comment 18 Serkan Kaba 2010-10-23 17:03:17 UTC
Any chance that this is fixed/worked-around for GNOME 3?
Comment 19 luciano 2010-10-23 17:42:36 UTC
Could somebody confirm whether this is a bug in gvfs or the reiser4 kernel driver? I saw you made a post on the r4 mailing list, but couldn't quite understand whether the problem is in their drivers.
Comment 20 Serkan Kaba 2010-10-24 05:42:01 UTC
(In reply to comment #19)
> Could somebody confirm whether this is a bug in gvfs or the reiser4 kernel
> driver? I saw you made a post on the r4 mailing list, but couldn't quite
> understand whether the problem is in their drivers.

It's because glib started using splice for file copying and reiser4 doesn't support it.
Comment 21 Serkan Kaba 2011-01-06 20:31:25 UTC
Can comment #17 be done as the referred bug is fixed. The situation improved a tiny bit since my last comment. In 2.6.36 the filesize attribute is correctly copied but file contents are still not.

Regards,
Serkan
Comment 22 Serkan Kaba 2011-01-21 20:44:47 UTC
Created attachment 179001 [details] [review]
Patch to avoide splice usage for reiser4 targets.

I'm adding a patch to do what I said in comment #17.
Comment 23 Colin Walters 2011-01-21 20:54:59 UTC
I really, really think the reiser4 implementation needs to be patched to at a minumum, return -EINVAL if they can't be bothered to implement the better interfaces.
Comment 24 Serkan Kaba 2011-01-21 21:00:29 UTC
Created attachment 179003 [details] [review]
Patch to avoide splice usage for reiser4 targets.

Here's a patch against master.
Comment 25 Colin Walters 2011-01-21 21:21:55 UTC
It should be explicitly noted that glib actually has already been doing the right thing and handling -EINVAL from the kernel on a splice() call.
Comment 26 Serkan Kaba 2011-01-22 04:53:42 UTC
(In reply to comment #23)
> I really, really think the reiser4 implementation needs to be patched to at a
> minumum, return -EINVAL if they can't be bothered to implement the better
> interfaces.

Yes, indeed. This is only a workaround.
Comment 27 Tomas Bzatek 2011-01-24 14:08:36 UTC
I'm little afraid of this additional sync I/O operation, potentially affecting performance, causing delays before the operation starts. Though my fears may be false due to negligible impact.
Comment 28 Serkan Kaba 2011-04-06 20:05:27 UTC
Created attachment 185354 [details] [review]
Patch to avoide splice usage for reiser4 targets.
Comment 29 Serkan Kaba 2011-04-23 09:17:16 UTC
Created attachment 186515 [details] [review]
Patch to avoide splice usage for reiser4 targets.
Comment 30 Philip Withnall 2017-11-03 13:44:00 UTC
Is this still a problem with the latest kernel? I don’t want to add a workaround in GLib if the problem in reiserfs has been fixed in the last 6 years.

The upstream kernel sources seem to have a generic splice implementation for it, which I assume should work (or return EINVAL correctly):

https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/fs/reiserfs/file.c#n256

The kernel git logs are unsurprisingly quite unhelpful at indicating whether splice support has been fixed or changed in the last 6 years.

---

On the assumption that this *has* been fixed since anybody last complained about it (or everyone’s stopped using reiserfs), I’m going to close this bug. Please re-open it if there’s still an issue. Thanks.
Comment 31 Tomas Bzatek 2017-11-20 15:13:22 UTC
Please note reiserfs != reiser4, it's a separate implementation. Also reiser4 still hasn't been mainlined, being distributed as an external patch.
Comment 32 Philip Withnall 2017-11-20 15:28:49 UTC
(In reply to Tomas Bzatek from comment #31)
> Please note reiserfs != reiser4, it's a separate implementation. Also
> reiser4 still hasn't been mainlined, being distributed as an external patch.

Ah, I see. Thanks for the information. In that case, upstream GLib is definitely not going to start working around problems in reiser4. If any distros are carrying the reiser4 patch in their kernel, they can carry their own GLib patch too.