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 588391 - when copying files from a samba share, gvfs fails to complete the copy and reports "Invalid argument"
when copying files from a samba share, gvfs fails to complete the copy and re...
Status: RESOLVED NOTGNOME
Product: gvfs
Classification: Core
Component: smb backend
1.3.x
Other All
: Normal major
: ---
Assigned To: Tomas Bzatek
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2009-07-12 17:46 UTC by Oded Arbel
Modified: 2015-03-05 12:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28



Description Oded Arbel 2009-07-12 17:46:18 UTC
Please describe the problem:
Using gvfs-copy or from nautilus to copy a file from an SMB share to the local drive, the file is only partially copied and then gvfs reports an error in copying the file with the error message "Invalid argument".

Steps to reproduce:
1. use the gvfs-copy command line tool to copy a file from an SMB url to a local directory.


Actual results:
The copy does not complete successfully

Expected results:
The copy should complete successfully

Does this happen every time?
Yes

Other information:
Here is an example run:
$ gvfs-copy -p "smb://negro/documents/compete-200903-15000-sites-page-views.xls" .
progress 15872/1862144 (15.5 KB/s)
progress 31744/1862144 (31.0 KB/s)
...
progress 1671143/1862144 (816.0 KB/s)
progress 1736678/1862144 (848.0 KB/s)
progress 1802213/1862144 (880.0 KB/s)
progress 1802213/1862144 (880.0 KB/s)
Error copying file smb://negro/documents/compete-200903-15000-sites-page-views.xls: Invalid argument
oded@sepiroth:~$ ll compete-200903-15000-sites-page-views.xls 
-rw-r--r-- 1 oded oded 1802213 2009-07-12 19:46 compete-200903-15000-sites-page-views.xls

As can be seen, the file was not completely copied. If the file is small enough then no data is copied at all and the resulting file on the local filesystem is zero bytes in size.

This has worked properly in the past, and I think that the change for me was the result of some change on the server (mostly as the no updates for gvfs were installed on my machine and there was an update done on the Windows server), but I cannot tell what that change was and older version of gvfs (1.2.3) work fine with the same server.
Comment 1 Josselin Mouette 2009-07-13 11:17:40 UTC
According to http://bugs.debian.org/536757 this is caused by the upgrade to Samba 3.4. We’re investigating whether it is a bug in Samba itself, but any insight from whoever knows better this code would appreciated.
Comment 2 Oded Arbel 2009-07-15 17:33:18 UTC
On my system downgrading to libsmbclient 3.3.4 fixed the problem for me.
Comment 3 Nigel Kukard 2009-07-16 13:59:20 UTC
Same problem here.

Samba 3.4.0. 

$ gvfs-cat smb://nigel-win2k8/users/nkukard/Forex/Indicators/Nigel/FFCal.txt
http://www.forexfactory.com/showthread.php?t=19293
gvfs-cat: smb://nigel-win2k8/users/nkukard/Forex/Indicators/Nigel/FFCal.txt: error reading: Invalid argument

Here is an strace and an ltrace...


execve("/usr/bin/gvfs-cat", ["gvfs-cat", "smb://nigel-win2k8/users/nkukard"...], [/* 35 vars */]) = 0
brk(0)                                  = 0x8152000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=117908, ...}) = 0
mmap2(NULL, 117908, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb806d000
close(3)                                = 0
open("/usr/lib/libgthread-2.0.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\17\0\0004\0\0\0\300"..., 512) = 512
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb806c000
fstat64(3, {st_mode=S_IFREG|0755, st_size=44099, ...}) = 0
mmap2(NULL, 19044, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb8067000
mmap2(0xb806b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb806b000
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0PH\0\0004\0\0\0@"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=627600, ...}) = 0
mmap2(NULL, 94700, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb804f000
mmap2(0xb8063000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xb8063000
mmap2(0xb8065000, 4588, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb8065000
close(3)                                = 0
open("/lib/librt.so.1", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\30\0\0004\0\0\0L"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=159474, ...}) = 0
mmap2(NULL, 29268, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb8047000
mmap2(0xb804d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb804d000
close(3)                                = 0
open("/usr/lib/libgio-2.0.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\345\0\0004\0\0\0\\"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1845758, ...}) = 0
mmap2(NULL, 551360, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7fc0000
mmap2(0xb8045000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x85) = 0xb8045000
close(3)                                = 0
open("/usr/lib/libgobject-2.0.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360b\0\0004\0\0\0,"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=871563, ...}) = 0
mmap2(NULL, 294796, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f78000
mmap2(0xb7fbf000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x47) = 0xb7fbf000
close(3)                                = 0
open("/usr/lib/libgmodule-2.0.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\f\0\0004\0\0\0,"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=32386, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f77000
mmap2(NULL, 14200, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f73000
mmap2(0xb7f76000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7f76000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \n\0\0004\0\0\0t"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=101301, ...}) = 0
mmap2(NULL, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f6f000
mmap2(0xb7f71000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7f71000
close(3)                                = 0
open("/usr/lib/libglib-2.0.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \362\0\0004\0\0\0D"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=2470371, ...}) = 0
mmap2(NULL, 994120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e7c000
mmap2(0xb7f6e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf1) = 0xb7f6e000
close(3)                                = 0
open("/lib/libutil.so.1", O_RDONLY)     = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\n\0\0004\0\0\0\210"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=24037, ...}) = 0
mmap2(NULL, 12428, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e78000
mmap2(0xb7e7a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7e7a000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200k\1\0004\0\0\0$"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=7825923, ...}) = 0
mmap2(NULL, 1296616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d3b000
mmap2(0xb7e72000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x137) = 0xb7e72000
mmap2(0xb7e75000, 10472, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e75000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d3a000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d39000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7d396c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7e72000, 8192, PROT_READ)   = 0
mprotect(0xb7e7a000, 4096, PROT_READ)   = 0
mprotect(0xb7f71000, 4096, PROT_READ)   = 0
mprotect(0xb804d000, 4096, PROT_READ)   = 0
mprotect(0xb8063000, 4096, PROT_READ)   = 0
mprotect(0xb80a6000, 4096, PROT_READ)   = 0
munmap(0xb806d000, 117908)              = 0
set_tid_address(0xb7d39728)             = 8719
set_robust_list(0xb7d39730, 0xc)        = 0
futex(0xbf9d5000, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0xbf9d5000, 0x189 /* FUTEX_??? */, 1, NULL, bf9d5010) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0xb80532b0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb8053750, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="nigel-x60", ...}) = 0
brk(0)                                  = 0x8152000
brk(0x8173000)                          = 0x8173000
gettimeofday({1247751493, 456765}, NULL) = 0
open("/usr/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
getdents64(3, /* 6 entries */, 32768)   = 216
stat64("/usr/lib/gio/modules/libgiogconf.so", {st_mode=S_IFREG|0755, st_size=20215, ...}) = 0
futex(0xb7f7206c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib/gio/modules/libgiogconf.so", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\t\0\0004\0\0\0T"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=20215, ...}) = 0
mmap2(NULL, 9112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb8087000
mmap2(0xb8089000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1) = 0xb8089000
close(4)                                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=117908, ...}) = 0
mmap2(NULL, 117908, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7d1c000
close(4)                                = 0
open("/usr/lib/libgconf-2.so.4", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\270\0\0004\0\0\0\364"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=669838, ...}) = 0
mmap2(NULL, 248492, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7cdf000
mmap2(0xb7d19000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x39) = 0xb7d19000
close(4)                                = 0
open("/usr/lib/libORBit-2.so.0", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\204\1\0004\0\0\0\24"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=1270735, ...}) = 0
mmap2(NULL, 390580, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7c7f000
mmap2(0xb7cd5000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x56) = 0xb7cd5000
mmap2(0xb7cde000, 1460, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7cde000
close(4)                                = 0
open("/usr/lib/libdbus-glib-1.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@k\0\0004\0\0\0,"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=378869, ...}) = 0
mmap2(NULL, 137728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7c5d000
mmap2(0xb7c7e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x21) = 0xb7c7e000
close(4)                                = 0
open("/lib/libnsl.so.1", O_RDONLY)      = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p1\0\0004\0\0\0\220"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=437521, ...}) = 0
mmap2(NULL, 83944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb8072000
mmap2(0xb8083000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x10) = 0xb8083000
mmap2(0xb8085000, 6120, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb8085000
close(4)                                = 0
open("/lib/libdbus-1.so.3", O_RDONLY)   = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320O\0\0004\0\0\0\334"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=903222, ...}) = 0
mmap2(NULL, 296092, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7c14000
mprotect(0xb7c5a000, 4096, PROT_NONE)   = 0
mmap2(0xb7c5b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x46) = 0xb7c5b000
close(4)                                = 0
mprotect(0xb7c5b000, 4096, PROT_READ)   = 0
mprotect(0xb8083000, 4096, PROT_READ)   = 0
munmap(0xb7d1c000, 117908)              = 0
stat64("/usr/lib/gio/modules/libgvfsdbus.so", {st_mode=S_IFREG|0755, st_size=414662, ...}) = 0
open("/usr/lib/gio/modules/libgvfsdbus.so", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240X\0\0004\0\0\0\334"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=414662, ...}) = 0
mmap2(NULL, 133296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7bf3000
mmap2(0xb7c13000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x20) = 0xb7c13000
close(4)                                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=117908, ...}) = 0
mmap2(NULL, 117908, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7d1c000
close(4)                                = 0
open("/usr/lib/libgvfscommon.so.0", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340k\0\0004\0\0\0\314"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=241328, ...}) = 0
mmap2(NULL, 87916, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7bdd000
mmap2(0xb7bf2000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x15) = 0xb7bf2000
close(4)                                = 0
munmap(0xb7d1c000, 117908)              = 0
stat64("/usr/lib/gio/modules/libgioremote-volume-monitor.so", {st_mode=S_IFREG|0755, st_size=209356, ...}) = 0
open("/usr/lib/gio/modules/libgioremote-volume-monitor.so", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340-\0\0004\0\0\0\\"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=209356, ...}) = 0
mmap2(NULL, 80600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7d25000
mmap2(0xb7d38000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x12) = 0xb7d38000
close(4)                                = 0
open("/usr/share/gvfs/remote-volume-monitors", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
getdents64(4, /* 3 entries */, 32768)   = 80
open("/usr/share/locale/locale.alias", O_RDONLY|O_LARGEFILE) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb8071000
read(5, "# Locale name alias data base.\n# "..., 4096) = 2570
read(5, ""..., 4096)                    = 0
close(5)                                = 0
munmap(0xb8071000, 4096)                = 0
open("/usr/share/gvfs/remote-volume-monitors/hal.monitor", O_RDONLY|O_LARGEFILE) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=123, ...}) = 0
read(5, "[RemoteVolumeMonitor]\nName=GProxy"..., 4096) = 123
read(5, ""..., 4096)                    = 0
close(5)                                = 0
getdents64(4, /* 0 entries */, 32768)   = 0
close(4)                                = 0
stat64("/usr/lib/gio/modules/libgiofam.so", {st_mode=S_IFREG|0755, st_size=44203, ...}) = 0
open("/usr/lib/gio/modules/libgiofam.so", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\v\0\0004\0\0\0l"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=44203, ...}) = 0
mmap2(NULL, 14472, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb806e000
mmap2(0xb8071000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2) = 0xb8071000
close(4)                                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=117908, ...}) = 0
mmap2(NULL, 117908, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7bc0000
close(4)                                = 0
open("/usr/lib/libfam.so.0", O_RDONLY)  = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\21\0\0004\0\0\0\204"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=83123, ...}) = 0
mmap2(NULL, 32252, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7bb8000
mmap2(0xb7bbf000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x6) = 0xb7bbf000
close(4)                                = 0
munmap(0xb7bc0000, 117908)              = 0
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
munmap(0xb806e000, 14472)               = 0
munmap(0xb7bb8000, 32252)               = 0
munmap(0xb8087000, 9112)                = 0
munmap(0xb7cdf000, 248492)              = 0
munmap(0xb7c7f000, 390580)              = 0
munmap(0xb7c5d000, 137728)              = 0
munmap(0xb8072000, 83944)               = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
connect(3, {sa_family=AF_FILE, path=@"/tmp/dbus-vi0JZrHUFY"...}, 23) = 0
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
geteuid32()                             = 1000
rt_sigaction(SIGPIPE, {0x1, [PIPE], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
poll([{fd=3, events=POLLOUT}], 1, 0)    = 1 ([{fd=3, revents=POLLOUT}])
write(3, "\0"..., 1)                    = 1
write(3, "AUTH EXTERNAL 31303030\r\n"..., 24) = 24
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
read(3, "OK 729fdf6457f1cc047e32d4c04a520d"..., 2048) = 37
poll([{fd=3, events=POLLOUT}], 1, -1)   = 1 ([{fd=3, revents=POLLOUT}])
write(3, "BEGIN\r\n"..., 7)             = 7
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"l\1\0\1\0\0\0\0\1\0\0\0n\0\0\0\1\1o\0\25\0\0\0/org/free"..., 128}, {""..., 0}], 2) = 128
gettimeofday({1247751493, 472569}, NULL) = 0
poll([{fd=3, events=POLLIN}], 1, 25000) = 1 ([{fd=3, revents=POLLIN}])
read(3, "l\2\1\1\v\0\0\0\1\0\0\0=\0\0\0\6\1s\0\6\0\0\0:1.544\0\0\5"..., 2048) = 262
read(3, 0x81643a8, 2048)                = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGPIPE, {0x1, [PIPE], SA_RESTART}, {0x1, [PIPE], SA_RESTART}, 8) = 0
writev(3, [{"l\1\0\1\0\0\0\0\2\0\0\0\212\0\0\0\1\1o\0\31\0\0\0/org/gtk/"..., 160}, {""..., 0}], 2) = 160
gettimeofday({1247751493, 473163}, NULL) = 0
poll([{fd=3, events=POLLIN}], 1, 60000) = 1 ([{fd=3, revents=POLLIN}])
read(3, "l\2\1\1\4\3\0\0I\3\0\0005\0\0\0\6\1s\0\6\0\0\0:1.544\0\0\5"..., 2048) = 844
read(3, 0x81643a8, 2048)                = -1 EAGAIN (Resource temporarily unavailable)
socket(PF_FILE, 0x80801 /* SOCK_??? */, 0) = 4
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
socket(PF_FILE, 0x80801 /* SOCK_??? */, 0) = 4
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=289, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb8089000
read(4, "# /etc/nsswitch.conf\n#\n# Possible"..., 4096) = 289
read(4, ""..., 4096)                    = 0
close(4)                                = 0
munmap(0xb8089000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=117908, ...}) = 0
mmap2(NULL, 117908, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb806d000
close(4)                                = 0
open("/lib/tls/i686/sse2/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686/sse2", 0xbf9d42f8) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686", 0xbf9d42f8)     = -1 ENOENT (No such file or directory)
open("/lib/tls/sse2/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/sse2", 0xbf9d42f8)     = -1 ENOENT (No such file or directory)
open("/lib/tls/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0xbf9d42f8)          = -1 ENOENT (No such file or directory)
open("/lib/i686/sse2/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/i686/sse2", 0xbf9d42f8)    = -1 ENOENT (No such file or directory)
open("/lib/i686/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/i686", 0xbf9d42f8)         = -1 ENOENT (No such file or directory)
open("/lib/sse2/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/sse2", 0xbf9d42f8)         = -1 ENOENT (No such file or directory)
open("/lib/libnss_db.so.2", O_RDONLY)   = -1 ENOENT (No such file or directory)
stat64("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/i686/sse2/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/i686/sse2", 0xbf9d42f8) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/i686", 0xbf9d42f8) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/sse2/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/sse2", 0xbf9d42f8) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls", 0xbf9d42f8)      = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/sse2/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/i686/sse2", 0xbf9d42f8) = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/i686", 0xbf9d42f8)     = -1 ENOENT (No such file or directory)
open("/usr/lib/sse2/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/sse2", 0xbf9d42f8)     = -1 ENOENT (No such file or directory)
open("/usr/lib/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=135168, ...}) = 0
munmap(0xb806d000, 117908)              = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=117908, ...}) = 0
mmap2(NULL, 117908, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb806d000
close(4)                                = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\31\0\0004\0\0\0P"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=174155, ...}) = 0
mmap2(NULL, 41676, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7d1a000
mmap2(0xb7d23000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x8) = 0xb7d23000
close(4)                                = 0
mprotect(0xb7d23000, 4096, PROT_READ)   = 0
munmap(0xb806d000, 117908)              = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 4
fcntl64(4, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
fstat64(4, {st_mode=S_IFREG|0644, st_size=2764, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb8089000
read(4, "root:x:0:0:root:/root:/bin/bash\nb"..., 4096) = 2764
close(4)                                = 0
munmap(0xb8089000, 4096)                = 0
getuid32()                              = 1000
uname({sys="Linux", node="nigel-x60", ...}) = 0
open("/usr/lib/gvfs/modules", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/charset.alias", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/gconv/gconv-modules", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=56028, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb8089000
read(4, "# GNU libc iconv configuration.\n#"..., 4096) = 4096
read(4, "B1.002//\nalias\tJS//\t\t\tJUS_I.B1.00"..., 4096) = 4096
read(4, "59-3\t1\nmodule\tINTERNAL\t\tISO-8859-"..., 4096) = 4096
read(4, "859-14//\nalias\tISO-IR-199//\t\tISO-"..., 4096) = 4096
read(4, "CDIC-DK-NO-A//\tEBCDIC-DK-NO-A\t1\n\n"..., 4096) = 4096
read(4, "\t\tIBM281//\t\tIBM281\t\t1\n\n#\tfrom\t\t\tt"..., 4096) = 4096
read(4, "\tIBM863\t\t1\n\n#\tfrom\t\t\tto\t\t\tmodule\t"..., 4096) = 4096
read(4, "//\t\tIBM937//\nalias\tCSIBM937//\t\tIB"..., 4096) = 4096
read(4, "JAPANESE//\tEUC-JP//\nalias\tOSF0003"..., 4096) = 4096
read(4, "MACINTOSH//\t\tMACINTOSH\t1\n\n#\tfrom\t"..., 4096) = 4096
read(4, "367-BOX//\nalias\tISO_10367BOX//\t\tI"..., 4096) = 4096
read(4, "EUC-JISX0213//\t\tINTERNAL\t\tEUC-JIS"..., 4096) = 4096
brk(0x8194000)                          = 0x8194000
read(4, "/\t\tIBM1130//\nalias\tCSIBM1130//\t\tI"..., 4096) = 4096
read(4, "\t1\n\n#\tfrom\t\t\tto\t\t\tmodule\t\tcost\nal"..., 4096) = 2780
read(4, ""..., 4096)                    = 0
close(4)                                = 0
munmap(0xb8089000, 4096)                = 0
futex(0xb7e74a6c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 4
connect(4, {sa_family=AF_FILE, path=@"/tmp/dbus-vi0JZrHUFY"...}, 23) = 0
fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
geteuid32()                             = 1000
rt_sigaction(SIGPIPE, {0x1, [PIPE], SA_RESTART}, {0x1, [PIPE], SA_RESTART}, 8) = 0
poll([{fd=4, events=POLLOUT}], 1, 0)    = 1 ([{fd=4, revents=POLLOUT}])
write(4, "\0"..., 1)                    = 1
write(4, "AUTH EXTERNAL 31303030\r\n"..., 24) = 24
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])
read(4, "OK 729fdf6457f1cc047e32d4c04a520d"..., 2048) = 37
poll([{fd=4, events=POLLOUT}], 1, -1)   = 1 ([{fd=4, revents=POLLOUT}])
write(4, "BEGIN\r\n"..., 7)             = 7
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{"l\1\0\1\0\0\0\0\1\0\0\0n\0\0\0\1\1o\0\25\0\0\0/org/free"..., 128}, {""..., 0}], 2) = 128
gettimeofday({1247751493, 564348}, NULL) = 0
poll([{fd=4, events=POLLIN}], 1, 25000) = 1 ([{fd=4, revents=POLLIN}])
read(4, "l\2\1\1\v\0\0\0\1\0\0\0=\0\0\0\6\1s\0\6\0\0\0:1.545\0\0\5"..., 2048) = 262
read(4, 0x8179e88, 2048)                = -1 EAGAIN (Resource temporarily unavailable)
writev(4, [{"l\1\0\1\211\0\0\0\2\0\0\0\230\0\0\0\1\1o\0\31\0\0\0/org/gtk/"..., 168}, {")\0\0\0/nkukard/Forex/Indicators/Nig"..., 137}], 2) = 305
gettimeofday({1247751493, 566375}, NULL) = 0
poll([{fd=4, events=POLLIN}], 1, 25000) = 1 ([{fd=4, revents=POLLIN}])
read(4, "l\2\1\1\1\1\0\0J\3\0\0E\0\0\0\6\1s\0\6\0\0\0:1.545\0\0\5"..., 2048) = 345
read(4, 0x8179e88, 2048)                = -1 EAGAIN (Resource temporarily unavailable)
writev(4, [{"l\1\0\1\0\0\0\0\3\0\0\0f\0\0\0\1\1o\0\23\0\0\0/org/gtk/"..., 120}, {""..., 0}], 2) = 120
gettimeofday({1247751493, 572410}, NULL) = 0
poll([{fd=4, events=POLLIN}], 1, 25000) = 1 ([{fd=4, revents=POLLIN}])
read(4, "l\2\1\1g\0\0\0\33\0\0\0/\0\0\0\6\1s\0\6\0\0\0:1.545\0\0\5"..., 2048) = 167
read(4, 0x8179e88, 2048)                = -1 EAGAIN (Resource temporarily unavailable)
socket(PF_FILE, SOCK_STREAM, 0)         = 5
connect(5, {sa_family=AF_FILE, path=@"/dbus-vfs-daemon/socket-XwjKeOYD"...}, 35) = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 6
connect(6, {sa_family=AF_FILE, path=@"/dbus-vfs-daemon/socket-ZozOz6AZ"...}, 35) = 0
fcntl64(6, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
fcntl64(6, F_GETFD)                     = 0
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
geteuid32()                             = 1000
rt_sigaction(SIGPIPE, {0x1, [PIPE], SA_RESTART}, {0x1, [PIPE], SA_RESTART}, 8) = 0
poll([{fd=6, events=POLLOUT}], 1, 0)    = 1 ([{fd=6, revents=POLLOUT}])
write(6, "\0"..., 1)                    = 1
write(6, "AUTH EXTERNAL 31303030\r\n"..., 24) = 24
poll([{fd=6, events=POLLIN}], 1, -1)    = 1 ([{fd=6, revents=POLLIN}])
read(6, "OK d5c8d6586fc3804be9107c364a5f2d"..., 2048) = 37
poll([{fd=6, events=POLLOUT}], 1, -1)   = 1 ([{fd=6, revents=POLLOUT}])
write(6, "BEGIN\r\n"..., 7)             = 7
poll([{fd=6, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=6, revents=POLLOUT}])
writev(6, [{"l\1\0\1-\0\0\0\1\0\0\0p\0\0\0\1\1o\0\24\0\0\0/org/gtk/"..., 128}, {")\0\0\0/nkukard/Forex/Indicators/Nig"..., 45}], 2) = 173
gettimeofday({1247751493, 580190}, NULL) = 0
poll([{fd=6, events=POLLIN}], 1, 60000) = 1 ([{fd=6, revents=POLLIN}])
read(6, "l\2\1\1\10\0\0\0\1\0\0\0\20\0\0\0\5\1u\0\1\0\0\0\10\1g\0\2ub\0\0"..., 2048) = 40
read(6, 0x817c9f8, 2048)                = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(5, {msg_name(0)=NULL, msg_iov(1)=[{"x"..., 1}], msg_controllen=16, {cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {7}}, msg_flags=0}, 0) = 1
write(7, "\0\0\0\0\0\0\0\1\0\0 \0\0\0\0\0\0\0\0\0"..., 20) = 20
read(7, "\0\0\0\0\0\0\0\1\0\0\0003\0\0\0\0"..., 16) = 16
read(7, "http://www.forexfactory.com/showt"..., 51) = 51
write(1, "http://www.forexfactory.com/showt"..., 51http://www.forexfactory.com/showthread.php?t=19293
) = 51
write(7, "\0\0\0\0\0\0\0\2\0\0 \0\0\0\0\0\0\0\0\0"..., 20) = 20
read(7, "\0\0\0\1\0\0\0\0\0\0\0\r\0\0\0\""..., 16) = 16
read(7, "g-io-error-quark\0Invalid argument"..., 34) = 34
read(7, "\0\0\0\1\0\0\0\2\0\0\0\r\0\0\0\""..., 16) = 16
read(7, "g-io-error-quark\0Invalid argument"..., 34) = 34
write(2, "gvfs-cat: smb://nigel-win2k8/user"..., 109gvfs-cat: smb://nigel-win2k8/users/nkukard/Forex/Indicators/Nigel/FFCal.txt: error reading: Invalid argument
) = 109
write(7, "\0\0\0\2\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0"..., 20) = 20
read(7, "\0\0\0\4\0\0\0\3\0\0\0\0\0\0\0\0"..., 16) = 16
close(7)                                = 0
exit_group(0)                           = ?



$ ltrace gvfs-cat smb://nigel-win2k8/users/nkukard/Forex/Indicators/Nigel/FFCal.txt
__libc_start_main(0x8048ce0, 2, 0xbfbf4904, 0x8048f10, 0x8048f00 <unfinished ...>
setlocale(6, "")                                                             = "C"
bindtextdomain("gvfs", "/usr/share/locale")                                  = "/usr/share/locale"
bind_textdomain_codeset(0x804921f, 0x8049224, 0xb7e73cc0, 0xb7e72ff4, 0xb8097ff0) = 0x882b020
textdomain("gvfs")                                                           = "gvfs"
g_type_init(0x804921f, 0x882b020, 0xb7e73cc0, 0xb7e72ff4, 0xb8097ff0)        = 0
dcgettext(0, 0x8048ffc, 5, 0xb7e72ff4, 0xb8097ff0)                           = 0x8048ffc
g_option_context_new(0x8048ffc, 0x8048ffc, 5, 0xb7e72ff4, 0xb8097ff0)        = 0x882f800
dcgettext(0, 0x8049034, 5, 0xb7e72ff4, 0xb8097ff0)                           = 0x8049034
dcgettext(0, 0x8049088, 5, 0xb7e72ff4, 0xb8097ff0)                           = 0x8049088
g_strconcat(0x8049088, 0x804922a, 0x8049034, 0, 0)                           = 0x882f830
g_option_context_set_summary(0x882f800, 0x882f830, 5, 0xb7e72ff4, 0xb8097ff0) = 0x882f988
g_option_context_add_main_entries(0x882f800, 0x804a640, 0x804921f, 0xb7e72ff4, 0xb8097ff0) = 0xb7eb9280
g_option_context_parse(0x882f800, 0xbfbf4880, 0xbfbf4884, 0xbfbf4854, 0x882fae0) = 1
g_option_context_free(0x882f800, 0x804921f, 0x804921f, 0xb7e72ff4, 0xb8097ff0) = 4
g_free(0x882f830, 0x804921f, 0x804921f, 0xb7e72ff4, 0xb8097ff0)              = 688
g_file_new_for_commandline_arg(0x882e9b8, 0x804921f, 0x804921f, 0xb7e72ff4, 0xb8097ff0) = 0x8830490
g_file_read(0x8830490, 0, 0xbfbf4818, 2, 0x8846c10)                          = 0x8856810
g_input_stream_read(0x8856810, 0xbfbf2817, 8192, 0, 0xbfbf4818)              = 51
write(1, "http://www.forexfactory.com/show"..., 51http://www.forexfactory.com/showthread.php?t=19293
)                          = 51
g_input_stream_read(0x8856810, 0xbfbf2817, 8192, 0, 0xbfbf4818)              = -1
g_file_get_uri(0x8830490, 0xbfbf2817, 51, 51, 0x8846c10)                     = 0x8857218
g_get_prgname(0x8830490, 0xbfbf2817, 51, 51, 0x8846c10)                      = 0x882fb58
dcgettext(0, 0x80491d8, 5, 51, 0x8846c10)                                    = 0x80491d8
g_printerr(0x80491d8, 0x882fb58, 0x8857218, 0x8857190, 0gvfs-cat: smb://nigel-win2k8/users/nkukard/Forex/Indicators/Nigel/FFCal.txt: error reading: Invalid argument
)                    = 89272
g_error_free(0x882fd20, 0x80491d8, 5, 51, 0x8846c10)                         = 0x882c250
g_input_stream_close(0x8856810, 0, 0xbfbf4818, 0x8857218, 0x8846c10)         = 1
g_object_unref(0x8830490, 0x804921f, 0x804921f, 0xb7e72ff4, 0xb8097ff0)      = 0
+++ exited (status 0) +++

Comment 4 Johannes Rohr 2009-07-20 05:09:53 UTC
as of today, samba 3.4 has hit Debian testing, so I would expect a lot more users to be bitten by this, soon.
Comment 5 Johannes Rohr 2009-07-20 05:35:25 UTC
(In reply to comment #4)
> as of today, samba 3.4 has hit Debian testing, so I would expect a lot more
> users to be bitten by this, soon.
> 

Fortunately I was wrong here, I was just missing the squeeze package list.
Comment 6 Tomas Bzatek 2009-07-29 14:05:39 UTC
The "Invalid argument" error message might not be accurate, there's still no good way to map smbclient errors. I'm curious if the error happens with standalone smbclient. What is the samba server running on anyway? (I saw some win2k8 machine)
Comment 7 Johannes Rohr 2009-07-29 14:20:03 UTC
(In reply to comment #6)
> The "Invalid argument" error message might not be accurate, there's still no
> good way to map smbclient errors. I'm curious if the error happens with
> standalone smbclient. What is the samba server running on anyway? (I saw some
> win2k8 machine)
> 

I am the reporter of the Debian bug and I can say that 

a) smbclient works fine, also cifsmount does
b) It is a Windows small business server 2003 
Comment 8 Oded Arbel 2009-08-07 08:27:07 UTC
Tomas, do you need any more information regarding this bug ? I can reproduce this at any time - please let me know how I can help with fixing this issue.
Comment 9 Tomas Bzatek 2009-08-19 13:54:36 UTC
(In reply to comment #3)
> Here is an strace and an ltrace...
Thanks for the effort, but tracing client apps have no effect, gvfs backends are separate processes spawned by dbus.

(In reply to comment #8)
> Tomas, do you need any more information regarding this bug ? I can reproduce
> this at any time - please let me know how I can help with fixing this issue.
No, thank you, I'm able to reproduce it locally too, against WinXP.

This looks to be samba-3.4.0 issue, I can't see anything wrong in the code (which is incredibly simple itself).

I've reported the issue to our in-house samba experts: https://bugzilla.redhat.com/show_bug.cgi?id=516165
Comment 10 Jeremy Allison 2009-08-19 23:05:37 UTC
Bug has been fixed in upstream Samba. See :

https://bugzilla.samba.org/show_bug.cgi?id=6649

for details and a patch against 3.4.0 that will be in 3.4.1.

One thing I noticed when fixing this bug is that the gnome vfs code is incredibly inefficient against CIFS servers. It asks for a 65535 byte read, which against Windows servers we must translate into a 65534 byte read (Windows max) followed by a 1 byte read.

See the function do_read() in this code:

http://git.gnome.org/cgit/gvfs/tree/daemon/gvfsbackendsmb.c#n715

This code:

  /* For some reason requests of 65536 bytes broke for me (returned 0)
   * Maybe some smb protocol limit
   */
  if (bytes_requested > 65535)
    bytes_requested = 65535;

*MUST* be changed to:

  if (bytes_requested > 65534)
    bytes_requested = 65534;

This will increase the efficiency of copying from an SMB server with gnome a *lot*.

See this function in Samba:

/****************************************************************************
  Calculate the recommended read buffer size
****************************************************************************/
static size_t cli_read_max_bufsize(struct cli_state *cli)
{
        if (!client_is_signing_on(cli) && !cli_encryption_on(cli)
            && (cli->posix_capabilities & CIFS_UNIX_LARGE_READ_CAP)) {
                return CLI_SAMBA_MAX_POSIX_LARGE_READX_SIZE;
        }
        if (cli->capabilities & CAP_LARGE_READX) {
                return cli->is_samba 
                        ? CLI_SAMBA_MAX_LARGE_READX_SIZE
                        : CLI_WINDOWS_MAX_LARGE_READX_SIZE;
        }
        return (cli->max_xmit - (smb_size+32)) & ~1023;
}

where we have in include/client.h:

#define CLI_WINDOWS_MAX_LARGE_READX_SIZE ((64*1024)-2) /* Windows servers are broken.... */

Jeremy.
Comment 11 Jeremy Allison 2009-08-19 23:11:29 UTC
Actually, if the do_read() code would just pass in the requested read size, without doing any modification, then we'd be able to optimize for 127k reads against a Samba server, and 64k-2 reads against a Windows server (the max allowed).

The comment in Gnome do_read() :

/* For some reason requests of 65536 bytes broke for me (returned 0)
   * Maybe some smb protocol limit
   */

doesn't have a bugid attached - so we don't know if it was a bug in an older version of libsmbclient that is now fixed (as smbclient works fine), or something that was seen by the original author.

IMHO this whole section modifying the bytes_requested should be removed and let the original request get handled by libsmbclient, which knows how to optimize for whichever server it's talking to.

Jeremy.
Comment 12 Bastien Nocera 2009-08-20 11:21:11 UTC
Jeremy, could you please file a separate bug about it?
Comment 13 Tomas Bzatek 2009-08-20 14:50:28 UTC
Thanks Jeremy for the fix and useful hints, that unusual blocksize makes my face smile :-) I'm glad it's fixed upstream.

(In reply to comment #11)
> The comment in Gnome do_read() :
> 
>   /* For some reason requests of 65536 bytes broke for me (returned 0)
>    * Maybe some smb protocol limit
>    */
> 
> doesn't have a bugid attached - so we don't know if it was a bug in an older
> version of libsmbclient that is now fixed (as smbclient works fine), or
> something that was seen by the original author.
That was a long time ago and nobody remembers the rationale, probably old libsmbclient (3.0.x) against even older samba server (2.x) incompatibility. There may not be a reason for this anymore, we only keep this code for compatibility.

> IMHO this whole section modifying the bytes_requested should be removed and let
> the original request get handled by libsmbclient, which knows how to optimize
> for whichever server it's talking to.
Agree, backends should be ported to new GVfsJobPush/GVfsJobPull mechanism if suitable. I've opened tracker bug 592468 for smb.

(In reply to comment #10)
> *MUST* be changed to:
> 
>   if (bytes_requested > 65534)
>     bytes_requested = 65534;
Committed to master as ce19f20cbb9527131c1d58a1a9565712c4723fa7.

I'm closing this bug, users please get your samba updated.