Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7480

[PATCH] Cannot initialize or use raw device as InnoDB File (also on MySQL 5.6.22)

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.0.15
    • Fix Version/s: 10.0
    • Component/s: None
    • Labels:
    • Environment:
      FreeBSD 10.1 amd64

      Description

      I am getting the same error as https://mariadb.atlassian.net/browse/MDEV-6057 but on version 10.0.15. I also tested this with MySQL 5.6.22 and am experiencing the same issue.
      This leads me to believe it is specific to the "os_file_get_status" function and FreeBSD.

      This works as expected on MariaDB 5.5

      My FreeBSD bug report is here.
      https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196895

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              Hi,

              Did you happen to file a bugreport for MySQL (at bugs.mysql.com) as well?

              Show
              elenst Elena Stepanova added a comment - Hi, Did you happen to file a bugreport for MySQL (at bugs.mysql.com) as well?
              Hide
              josh4trunks Joshua Ruehlig added a comment -
              Show
              josh4trunks Joshua Ruehlig added a comment - Here it is. http://bugs.mysql.com/bug.php?id=75616
              Hide
              josh4trunks Joshua Ruehlig added a comment -

              I found the cause of the issue. FreeBSD doesn't present disks as block devices but instead as character devices.
              https://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-block.html

              "case S_IFCHR:" should be added directly above or below "case S_IFBLK:" here.
              http://bazaar.launchpad.net/~mysql/mysql-server/5.6/view/head:/storage/innobase/os/os0file.cc#L3167

              ####

              What do I need to do to get this fix merged in? Thanks.

              Show
              josh4trunks Joshua Ruehlig added a comment - I found the cause of the issue. FreeBSD doesn't present disks as block devices but instead as character devices. https://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-block.html "case S_IFCHR:" should be added directly above or below "case S_IFBLK:" here. http://bazaar.launchpad.net/~mysql/mysql-server/5.6/view/head:/storage/innobase/os/os0file.cc#L3167 #### What do I need to do to get this fix merged in? Thanks.
              Hide
              josh4trunks Joshua Ruehlig added a comment -

              Is there anything I can do to get this looked at? I can try patching it and compiling on FreeBSD, it should be pretty easy to do so from ports if you need me to verify the fix I proposed works.

              Also this affects linux as well, if a char device is used.

              Show
              josh4trunks Joshua Ruehlig added a comment - Is there anything I can do to get this looked at? I can try patching it and compiling on FreeBSD, it should be pretty easy to do so from ports if you need me to verify the fix I proposed works. Also this affects linux as well, if a char device is used.
              Hide
              serg Sergei Golubchik added a comment -

              In cases like this we generally wait for an upstream bug fix to avoid complex code merges.
              Unless upstream refuses to fix the bug, of course.

              Show
              serg Sergei Golubchik added a comment - In cases like this we generally wait for an upstream bug fix to avoid complex code merges. Unless upstream refuses to fix the bug, of course.
              Hide
              josh4trunks Joshua Ruehlig added a comment -

              It looks like this was fixed in mysql 5.6.25
              https://github.com/mysql/mysql-server/commit/aee6bc8ed15e14fb2a532cd0ebffa0ec161c0e77
              I haven't had a chance to test it yet, but will as soon as the FreeBSD mysql56 port is updated to 5.6.25

              When applying this changes to mariadb I think these need to also be applied to the storage/xtradb versions of the files. Finally, I'd very happy if this can be backported to mariadb10.0

              Show
              josh4trunks Joshua Ruehlig added a comment - It looks like this was fixed in mysql 5.6.25 https://github.com/mysql/mysql-server/commit/aee6bc8ed15e14fb2a532cd0ebffa0ec161c0e77 I haven't had a chance to test it yet, but will as soon as the FreeBSD mysql56 port is updated to 5.6.25 When applying this changes to mariadb I think these need to also be applied to the storage/xtradb versions of the files. Finally, I'd very happy if this can be backported to mariadb10.0
              Hide
              josh4trunks Joshua Ruehlig added a comment -

              I made a PR for the 10.0 branch here. It might also cleanly apply to 10.1
              https://github.com/MariaDB/server/pull/85

              Show
              josh4trunks Joshua Ruehlig added a comment - I made a PR for the 10.0 branch here. It might also cleanly apply to 10.1 https://github.com/MariaDB/server/pull/85

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  josh4trunks Joshua Ruehlig
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated: