My Oracle Support Banner

Using O_DIRECT on Linux Results in Errors (Doc ID 945539.1)

Last updated on OCTOBER 18, 2017

Applies to:

Berkeley DB - Version 4.2 to 4.7
UnitedLinux (32-bit)
Linux x86
IBM: Linux on System z
Generic Linux
Miracle Linux x86
Haansoft Linux Itanium
Embedded Linux SH4
Obsolete Linux Intel (64-bit)
Red Hat Enterprise Linux Advanced Server x86-64 (AMD Opteron Architecture)
Oracle Enterprise Linux 4.0
IBM: Linux on POWER Systems
IBM S/390 Based Linux (31-bit)
Red Hat Enterprise Linux Advanced Server Itanium
x86 64 bit (for Enterprise Linux only)
Miracle Linux x86-64
SUSE \ UnitedLinux x86-64
Linux x86-64
Haansoft Linux x86
z*OBSOLETE: IBM Linux on POWER Systems - alternate
x86 32 bit (for Enterprise Linux only)
UnitedLinux Itanium
Miracle Linux Itanium
Red Hat Enterprise Linux Workstation
Haansoft Linux x86-64
Embedded Linux xScale
Linux Itanium

Symptoms

To avoid double buffering on platforms that allow it, and use direct I/O, Berkeley DB needs to be built with --enable-o_direct configuration option and the DB_DIRECT_DB and DB_DIRECT_LOG flags should be used in the application.

When Berkeley DB is built with that configuration on Linux 2.4/2.6 calls to read and write fail with an "Invalid argument" error message as illustrated below:

read: 0xae00c674, 4096: Invalid argument
write: 0x967c6c0, 8192: Invalid argument
write: 0xbfbda940, 4096: Invalid argument
write: 0xadf471cc, 91: Invalid argument

 

This issue applies to all versions of Berkeley DB, including the current release, 4.8.24.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.