Skip to Content
author's profile photo Former Member
Former Member

SA CR 728597 / Linux Kernel direct i/o bug & huge pages

Last year, April -> October, I asked the question about IQ supporting Huge Pages on Linux. It was mentioned that under SA CR 728597 and Red Hat Bug 891857 that there was a bug in the Linux kernel handling of direct I/O while using transparent huge memory pages (a variant of Linux Huge memory pages).

CR 728597:

This problem is related to a possible bug in the transparent huge pages (THP) feature introduced in these operating system versions. Red Hat bug 891857 has been created to track this issue.

The problem can be triggered by calling an external environment, xp_cmdshell, or other procedure that causes a fork while other I/O is occurring. A known limitation with the Linux kernel limits the use of fork while doing O_DIRECT I/O operations. Essentially what can happen is that the data can come from or go to the wrong process’ memory after the fork. SQL Anywhere performs O_DIRECT I/O operations according to the documented safe usage. However, THP appears to cause further problems and the O_DIRECT I/O data comprising database page reads/writes appears to get lost.

http://scn.sap.com/thread/3338917 and http://froebe.net/blog/2013/06/17/does-anyone-have-any-details-on-redhat-linux-bug-891857/

Does anyone know the status of this ongoing FIVE year old issue?

jason

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2014 at 04:23 PM

    bump

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 07, 2014 at 04:36 PM

    SAP, what's the status on this bug?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 07, 2014 at 08:06 PM

    The bug was closed with this comment: SQL Anywhere now disables direct I/O if transparent huge pages are enabled. A warning will be printed as the database file is being opened to indicate that direct I/O is disabled due to this bug. This is similar to how SQL Anywhere handles file systems that do not support direct I/O.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Mark Mumy

      #1 : RedHat is NOT the Linux community. RedHat is simply a vendor with a distribution. Has anyone contacted the Linux kernel team or other Linux distributions? (e.g. SuSE)

      #2 : THP is just one possible option. The other is huge memory pages.

      #3 : SAP *is* ignoring the problem by not spending a little bit of time on it and proposing a patch. Other DBMS vendors do so, why not SAP? Even Microsoft and Apple submit patches.

      If you go back to the original discussion, I brought up huge memory pages. Oracle and IBM both heavily promote the use of huge memory pages. From Oracle: Very Large Memory and HugePages When you're dealing with a lot of memory, huge pages can make a big difference in performance.

      Perhaps it is a matter of still thinking Sybase has being independent and not utilizing the resources of SAP? (SAP to direct i/o Linux team: We'll sponsor X hours at Y per hour to fix this problem. Any one up for it?)

      Then again, it might be possible that SAP itself may not know how to approach the actual developers of the Linux kernel (open source developers I mean)? It is very different than approaching another vendor.

      jason

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.