History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-107
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Arjohn Kampman
Reporter: Joseph Walton
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Sesame

NativeRdf SAIL runs into bug in JDK 1.4 under Linux 2.6

Created: 02/Dec/04 11:27 PM   Updated: 02/Mar/05 04:15 PM
Component/s: Native Sail
Affects Version/s: 1.1
Fix Version/s: 1.1.1

File Attachments: 1. File transfer-workaround-2.diff (2 kb)
2. File transfer-workaround.diff (2 kb)

Environment: Sun JDK 1.4.2_05, Linux 2.6.8.1, libc 2.3.2


 Description   
As reported in <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5056395&gt;, FileChannel.transferTo is broken under 2.6 Linux kernels.

This causes the NativeRdf SAIL to fail (the IOException should probably bubble to the top, rather than being reduced to a diagnostic). Although fixed in JDK 5.0, the fix has not yet been backported.


 All   Comments   Change History      Sort Order:
Comment by Joseph Walton [02/Dec/04 11:32 PM]
Patch to implement transfer using read and write, avoiding transferTo.

Comment by Arjohn Kampman [03/Dec/04 11:14 AM]
Thanks for the report. Guess we should at least document the problem. I'm not sure yet whether creating a work-around is a good idea, as this will slow down the native Sail on other platforms that do support direct channel-to-channel copying.

Comment by Joseph Walton [03/Dec/04 02:06 PM]
Same fix, with check for bad arguments.

Comment by Joseph Walton [03/Dec/04 02:26 PM]
I'm reticent to argue for inclusion, as it's unquestionably a Sun bug. However, I've attached another version of the patch, to detect and flag (rather than fail) when the 'length' argument goes past the end of the file (looks like file length, rather than transfer length, is being passed in).

Is there any chance you could benchmark it? If there is a significant performance hit, I'll just have to maintain a local patch until Sun get around to fixing it; the native store is perfect for desktop app deployment.

If you don't include it, *please* consider improving the exception handling. At the moment, imports continue after fatal errors, leaving the store in an inconsistent state. This made it harder to identify the problem, and will also cause breakage with, for example, full disks.

Comment by Arjohn Kampman [01/Mar/05 03:10 PM]
A workaround has been implemented, which is activated by checking the values of the system variables "os.name", "os.version" and "java.version". If the values of these variables indicate that the platform is running jdk 1.4.x on Linux with kernel 2.6.x, Sesame will fall back to using more conventional means.