Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.2.10
    • 10.1.31, 10.2.13
    • Tests
    • Alpine Linux: Edge - musl libc & libressl

    Description

      Hi MariaDB team,

      I am trying to package version 10.2.10 for Alpine Linux.

      As part of the build process "make test" is executed.

      Unfortunately the following test fails:
      22:mf_iocache

      I have attached the build definition file (APKBUILD) and the logs.

      Attachments

        1. APKBUILD
          7 kB
        2. build.txt
          224 kB
        3. CTestCostData.txt
          2 kB
        4. LastTest.log
          2.31 MB
        5. LastTestsFailed.log
          0.0 kB

        Activity

          DBLouis Louis Dupré Bertoni added a comment - - edited

          Ok initially this is what I got with strace:

          open("/usr/local/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
          open("/etc/ld-musl-x86_64.path", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
          open("/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
          open("/usr/local/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
          open("/usr/local/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
          open("/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
          open("/usr/local/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
          

          The missing libraries where in /usr/lib so I symlinked them in /usr/local/lib, I tried telling cmake to look into the right directory without success.
          Now I have the following:

          https://framabin.org/?6e3247917302d98b#b7zDdtOhh1xJ8/EoRid7AhuO/5JUkjtyRpJbNwlIacI=

          I don't see any errors anymore, what is the problem?

          DBLouis Louis Dupré Bertoni added a comment - - edited Ok initially this is what I got with strace: open("/usr/local/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/etc/ld-musl-x86_64.path", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/local/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) The missing libraries where in /usr/lib so I symlinked them in /usr/local/lib, I tried telling cmake to look into the right directory without success. Now I have the following: https://framabin.org/?6e3247917302d98b#b7zDdtOhh1xJ8/EoRid7AhuO/5JUkjtyRpJbNwlIacI= I don't see any errors anymore, what is the problem?

          Thanks. For the reference, I'll quote the important part here:

          writev(1, [{iov_base="ok 2 - ", iov_len=7}, {iov_base=NULL, iov_len=0}], 2) = 7
          writev(1, [{iov_base="small write, pos_in_file = 0, po"..., iov_len=46}, {iov_base=NULL, iov_len=0}], 2) = 46
          writev(1, [{iov_base="", iov_len=0}, {iov_base="\n", iov_len=1}], 2) = 1
          open("/tmp/tmp.emnCon", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
          unlink("/tmp/tmp.emnCon")               = 0
          writev(1, [{iov_base="not ok 3 - ", iov_len=11}, {iov_base=NULL, iov_len=0}], 2) = 11
          

          This is how it looks for me, when the test is working:

          write(1, "ok 2 - ", 7)                  = 7
          write(1, "small write, pos_in_file = 0, po"..., 46) = 46
          write(1, "\n", 1)                       = 1
          getpid()                                = 16421
          open("/tmp/tmp.sk3M8n", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
          unlink("/tmp/tmp.sk3M8n")               = 0
          getpid()                                = 16421
          getpid()                                = 16421
          open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 4
          fstat(4, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0
          poll([{fd=4, events=POLLIN}], 1, 10)    = 1 ([{fd=4, revents=POLLIN}])
          read(4, "\200\301\354g(\26\370C\34\235\201\272\277\203\\g\317\251\204\254'\300\207R\255\243\230\276~\f\244j", 32) = 32
          close(4)                                = 0
          getuid()                                = 1000
          write(3, "\0\0\0\0\0\0\0\0\1a\251\r\210\2\22#\236%\305\323E\36W\fX\337\21B\310D\200>"..., 16408) = 16408
          write(1, "ok 3 - ", 7)                  = 7
          write(1, "large write, pos_in_file = 16384"..., 50) = 50
          

          serg Sergei Golubchik added a comment - Thanks. For the reference, I'll quote the important part here: writev(1, [{iov_base="ok 2 - ", iov_len=7}, {iov_base=NULL, iov_len=0}], 2) = 7 writev(1, [{iov_base="small write, pos_in_file = 0, po"..., iov_len=46}, {iov_base=NULL, iov_len=0}], 2) = 46 writev(1, [{iov_base="", iov_len=0}, {iov_base="\n", iov_len=1}], 2) = 1 open("/tmp/tmp.emnCon", O_RDWR|O_CREAT|O_EXCL, 0600) = 3 unlink("/tmp/tmp.emnCon") = 0 writev(1, [{iov_base="not ok 3 - ", iov_len=11}, {iov_base=NULL, iov_len=0}], 2) = 11 This is how it looks for me, when the test is working: write(1, "ok 2 - ", 7) = 7 write(1, "small write, pos_in_file = 0, po"..., 46) = 46 write(1, "\n", 1) = 1 getpid() = 16421 open("/tmp/tmp.sk3M8n", O_RDWR|O_CREAT|O_EXCL, 0600) = 3 unlink("/tmp/tmp.sk3M8n") = 0 getpid() = 16421 getpid() = 16421 open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 4 fstat(4, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0 poll([{fd=4, events=POLLIN}], 1, 10) = 1 ([{fd=4, revents=POLLIN}]) read(4, "\200\301\354g(\26\370C\34\235\201\272\277\203\\g\317\251\204\254'\300\207R\255\243\230\276~\f\244j", 32) = 32 close(4) = 0 getuid() = 1000 write(3, "\0\0\0\0\0\0\0\0\1a\251\r\210\2\22#\236%\305\323E\36W\fX\337\21B\310D\200>"..., 16408) = 16408 write(1, "ok 3 - ", 7) = 7 write(1, "large write, pos_in_file = 16384"..., 50) = 50

          As far as I understand, this part with getpid and open("/dev/urandom") comes from this code:

            RAND_METHOD *rand = RAND_OpenSSL();
            if (rand == NULL || rand->bytes(buf, num) != 1)
              return MY_AES_OPENSSL_ERROR;
            return MY_AES_OK;
          

          I suspect that it fails for you (either because of Docker or, more probably, because of musl or something else specific to Alpine) and it makes the whole unit test to fail.

          What OpenSSL version do you have?

          This issue might be related to MDEV-14343.

          Could you try to build MariaDB with yassl? It's -DWITH_SSL=bundled option to cmake. Even if you don't want to run with yassl, it'll help to understand whether this OpenSSL code above is to blame.

          serg Sergei Golubchik added a comment - As far as I understand, this part with getpid and open("/dev/urandom") comes from this code: RAND_METHOD * rand = RAND_OpenSSL(); if ( rand == NULL || rand ->bytes(buf, num) != 1) return MY_AES_OPENSSL_ERROR; return MY_AES_OK; I suspect that it fails for you (either because of Docker or, more probably, because of musl or something else specific to Alpine) and it makes the whole unit test to fail. What OpenSSL version do you have? This issue might be related to MDEV-14343 . Could you try to build MariaDB with yassl? It's -DWITH_SSL=bundled option to cmake. Even if you don't want to run with yassl, it'll help to understand whether this OpenSSL code above is to blame.
          DBLouis Louis Dupré Bertoni added a comment - - edited

          I am compiling with LibreSSL and this is apparently the cause of the issue since I just tried with GNUTLS and the test passed.
          Now I want to now why LibreSSL is causing problems. Is there anything I can do to debug? Because strace does not provides much information or at least I don't know how to use it.

          DBLouis Louis Dupré Bertoni added a comment - - edited I am compiling with LibreSSL and this is apparently the cause of the issue since I just tried with GNUTLS and the test passed. Now I want to now why LibreSSL is causing problems. Is there anything I can do to debug? Because strace does not provides much information or at least I don't know how to use it.
          serg Sergei Golubchik added a comment - - edited

          Don't bother. The issue will probably disappear in the next release when MDEV-14343 is fixed.
          See https://jira.mariadb.org/ for the release schedule.

          But it'd be good if you confirm here whether the issue is fixed or not, after trying the next release...

          serg Sergei Golubchik added a comment - - edited Don't bother. The issue will probably disappear in the next release when MDEV-14343 is fixed. See https://jira.mariadb.org/ for the release schedule. But it'd be good if you confirm here whether the issue is fixed or not, after trying the next release...

          People

            serg Sergei Golubchik
            TBK TBK
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.