Bug 4592 - Input/output error when copying files from server to client using 64bit unfsd
Summary: Input/output error when copying files from server to client using 64bit unfsd
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Local drive redirection (show other bugs)
Version: 4.0.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.1.1
Assignee: Karl Mikaelsson
URL:
Keywords: hean01_tester, relnotes
Depends on:
Blocks:
 
Reported: 2013-04-11 12:42 CEST by Henrik Andersson
Modified: 2013-10-24 10:52 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Henrik Andersson cendio 2013-04-11 12:42:54 CEST
We have a rather annoying issue here, involving the 64bit unfsd shipped with the ThinLinc client 4.0.0: when copying files to an exported volume on the client machine, we get 'Input/output error'. Sometimes it takes a while until copying files fails, other times it fails right away on the first file to copy.

Tracing cp(1) using strace(1) revealed, that the open(2) syscall fails, when the O_EXCL flag is used in combination with O_CREAT, in order to create the destination file initially on the client machine, leaving an empty file behind. In case the destination already exists, cp(1) simply opens it using O_WRONLY|O_TRUNC which does not fail.

So we basically end up with having to issue the copy command twice in order to copy a file to a volume: once in order to create the empty file and tricking the second attempt into passing O_WRONLY|O_TRUNC to open(2).

This behavior is not limited to cp(1), Thunar (XFCE), Caja (MATE), and Nautilus also complain about Input/output error when files are initially created on the exported volume.

We replaced the 64bit ThinLinc client by the 32bit version and the issue was gone. So, we strongly suspect the 64bit unfsd being the culprit.
Comment 2 Henrik Andersson cendio 2013-04-11 13:47:47 CEST
I just verified the issue and it is easily reproducible, problem appeared on my first try just copying a file.

This is what i found in tlclient.log debug log:

2013-04-11T13:46:16: unfsd command: /opt/thinlinc/lib/tlclient/unfsd -d -e /tmp/unfsd4cTK1X -n 51345 -m 51345 -l 127.0.0.1 -t -p -s
2013-04-11T13:46:16: unfsd pid is 2656
2013-04-11T13:46:16: unfsd: UNFS3 unfsd 0.9.23 (C) 2009, Pascal Schmidt <unfs3-server@ewetel.net>
2013-04-11T13:46:16: unfsd: /media/cdrom: ip 127.0.0.1 mask 255.255.255.255 options 24
2013-04-11T13:46:16: unfsd: /tmp: ip 127.0.0.1 mask 255.255.255.255 options 28
2013-04-11T13:47:19: unfsd: unable to send RPC reply
Comment 4 Karl Mikaelsson cendio 2013-10-01 15:11:53 CEST
Hopefully fixed by vendor drop made in r27984. Will test with nightly client builds tomorrow.
Comment 6 Karl Mikaelsson cendio 2013-10-02 11:28:23 CEST
Test progress:

- [X] 64-bit Linux
- [X] 32-bit Linux
- [ ] 32-bit Solaris

Waiting for bug4693:

- [ ] Windows
Comment 7 Karl Mikaelsson cendio 2013-10-03 11:29:17 CEST
Test progress:
 
 - [X] 64-bit Linux
 - [X] 32-bit Linux
 - [X] 32-bit Solaris

Waiting for bug4693:
 
 - [ ] 32-bit Windows
Comment 9 Karl Mikaelsson cendio 2013-10-04 10:06:03 CEST
Test progress:

 - [X] 64-bit Linux
 - [X] 32-bit Linux
 - [X] 32-bit Solaris
 - [X] 32-bit Windows
Comment 10 Henrik Andersson cendio 2013-10-10 14:43:37 CEST
Tested using ThinLinc clien/server build 4109.

While testing this bug i stumbled upon bug #4838, when disabling the firewall i could not reproduce the main issue.

Going to test 32bit client for regressions before closing this bug.
Comment 11 Henrik Andersson cendio 2013-10-11 09:05:31 CEST
I have now tested build 4109 client on Windows 8 and it works as expected.

Note You need to log in before you can comment on or make changes to this bug.