Linux direct I/O mystery

Recently there was some problem with one of the quite old Dell RHEL box. Application was not working. Someone installed some old binary application. At some point application was crashing under Red Hat enterprise Linux 2.1.

After exchanging tons of email with application vendor and RedHat, problem was solved by installing latest version of Red hat enterprise Linux.

open() sys call was a problem….

The problem was the open() sys call in application. The open() system call is used to convert a pathname into a file descriptor (a small, non-negative integer for use in subsequent I/O as with read, write, etc.). When the call is successful, the file descriptor returned will be the lowest file descriptor not currently open for the process. This call creates a new open file, not shared with any other process. But shared open files may arise via the fork() system call. The new file descriptor is set to remain open across exec functions . The file offset is set to the beginning of the file. If you are a developer read man page of open for more info (man 2 open).

This kind of problems is hard to trace and debug 🙁

Later RedHat tech support told us that direct I/O is supported in only in Red Hat Enterprise Linux version 3 over above. Interestingly application was working fine on old version of Debian Linux.

Bottom line if application is not working just try it on latest version and it may save your a$$.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Zendog Mar 6, 2008 @ 18:48

    Good point. In fact it’s quite useful to maintain several VM’s of both old and new Linux releases. Sometimes you’ll find an old tool or application is needed but won’t run or compile on a *newer* OS. I was only able to compile Tripwire using an older compiler (conveniently present on an older RedHat OS.) VM’s are cheap and having access to a variety of different OS versions can really save the day when troubleshooting app problems.

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @