Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-2628

LP #764395: MySQL bug #60788: InnoDB crashes with an assertion failure when receiving a signal on pwrite()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      **Reported in Launchpad by Alexey Kopytov last update 19-12-2013 10:56:34

      Reporting http://bugs.mysql.com/bug.php?id=60788 on Launchpad so we can track our work on it and the status of the MySQL bug locally:

      Description:
      According to POSIX write()/pwrite() return -1 with errno set to EINTR when those calls
      are interrupted by a signal before they write any data, or return the number of bytes
      written if a signal is received after successfully writing some data.

      Neither of those cases are handled correctly by InnoDB. Here is an example of pwrite()
      returning -1 with errno set to EINTR:

      InnoDB: Error: Write to file ./test/test.ibd failed at offset 0 5308416.
      InnoDB: 983040 bytes should have been written, only -1 were written.
      InnoDB: Operating system error number 4.
      InnoDB: Check that your OS and file system support files of this size.
      InnoDB: Check also that the disk is not full or a disk quota exceeded.
      InnoDB: Error number 4 means 'Interrupted system call'.
      InnoDB: Some operating system error numbers are described at
      InnoDB: http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html
      InnoDB: Assertion failure in thread 1140169024 in file os/os0file.c line 4205
      InnoDB: Failing assertion: ret
      InnoDB: We intentionally generate a memory trap.

      MyISAM is not affected by this problem because mysys handles those cases correctly by
      restarting the write.

      I think all of the above applies to reads as well.

      How to repeat:
      Examine the os_file_pwrite()/os_file_pread() code. Compare with how EINTR is handled in
      my_pwrite()/my_pread().

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            lpjirasync lpjirasync (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Smart Checklist