Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Desktop for Windows 2.2 breaks MariaDB #5604

Closed
2 tasks done
archon810 opened this issue Jan 27, 2020 · 12 comments
Closed
2 tasks done

Docker Desktop for Windows 2.2 breaks MariaDB #5604

archon810 opened this issue Jan 27, 2020 · 12 comments

Comments

@archon810
Copy link

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: 7C8C3F09-7D2D-475B-84F2-5A3B8D16FC75/20200127053153

Expected behavior

Docker for MariaDB boots.

Actual behavior

MariaDB fails to boot.

Information

  • Is it reproducible? Yes
  • Is the problem new? Yes
  • Did the problem appear with an update? Yes
  • A reproducible case if this is a bug, Dockerfiles with reproduction inside is best.
  • Windows Version: Version 10.0.18363 Build 18363
  • Docker Desktop Version: 2.2.0.0 (42247)
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: no

Steps to reproduce the behavior

This has worked with the previous version of Docker Desktop. Now it doesn't, with the following error.

db1:
    image: mariadb:10.2
    ports:
      - "55050:3306"
    volumes:
      - ./database-${computername}:/var/lib/mysql
    command: mysqld --innodb-flush-method=fsync --sql_mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
    environment:
      MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
      MYSQL_USER: 'test_user'
      MYSQL_PASSWORD: 'TEST'
      MYSQL_DATABASE: 'TEST'
      TZ: America/Los_Angeles
    networks:
      - apnetwork 
docker logs db1_1
2020-01-26 21:30:00-08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.2.30+maria~bionic started.
2020-01-26 21:30:01-08:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-01-26 21:30:01-08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.2.30+maria~bionic started.
2020-01-26 21:30:01-08:00 [Note] [Entrypoint]: Initializing database files
ERROR: 1017  Can't find file: './mysql/proc.MYI' (errno: 2 "No such file or directory")
2020-01-26 21:30:16 139865940030784 [ERROR] Aborting


Installation of system tables failed!  Examine the logs in
/var/lib/mysql/ for more information.

The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:

    shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf

You can also try to start the mysqld daemon with:

    shell> /usr/sbin/mysqld --skip-grant-tables --general-log &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables;

Try 'mysqld --help' if you have problems with paths.  Using
--general-log gives you a log in /var/lib/mysql/ that may be helpful.

The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss

Please check all of the above before submitting a bug report
at http://mariadb.org/jira

If I remove the volume mounting, it starts working.

So what's going wrong here and what did 2.2 break?

@alexoueb
Copy link

alexoueb commented Feb 8, 2020

I have the same error.

mariadb:
    image: mariadb:10.3.22
    command: 'mysqld --innodb-flush-method=fsync --innodb-use-native-aio=0'
    restart: always
    container_name: mariadb
    environment:
      - MYSQL_DATABASE=thetest
      - MYSQL_USER=thetest
      - MYSQL_PASSWORD=thetest
      - MYSQL_ROOT_PASSWORD=thetest
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes
    ports:
      - 3306:3306
    volumes:
      - ./docker/mariadb:/var/lib/mysql

mariadb    | ERROR: 1017  Can't find file: './mysql/proc.MYI' (errno: 2 "No such file or directory")
mariadb    | 2020-02-08 14:55:31 0 [ERROR] Aborting
mariadb    |
mariadb    |
mariadb    | Installation of system tables failed!  Examine the logs in
mariadb    | /var/lib/mysql/ for more information.
mariadb    |
mariadb    | The problem could be conflicting information in an external
mariadb    | my.cnf files. You can ignore these by doing:
mariadb    |
mariadb    |     shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
mariadb    |
mariadb    | You can also try to start the mysqld daemon with:
mariadb    |
mariadb    |     shell> /usr/sbin/mysqld --skip-grant-tables --general-log &
mariadb    |
mariadb    | and use the command line tool /usr/bin/mysql
mariadb    | to connect to the mysql database and look at the grant tables:
mariadb    |
mariadb    |     shell> /usr/bin/mysql -u root mysql
mariadb    |     mysql> show tables;
mariadb    |
mariadb    | Try 'mysqld --help' if you have problems with paths.  Using
mariadb    | --general-log gives you a log in /var/lib/mysql/ that may be helpful.
mariadb    |
mariadb    | The latest information about mysql_install_db is available at
mariadb    | https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
mariadb    | You can find the latest source at https://downloads.mariadb.org and
mariadb    | the maria-discuss email list at https://launchpad.net/~maria-discuss
mariadb    |
mariadb    | Please check all of the above before submitting a bug report
mariadb    | at http://mariadb.org/jira

@stephen-turner
Copy link
Contributor

Could you try again with the new version 2.2.0.3? We have fixed several bugs related to file sharing. Thank you.

@djereg
Copy link

djereg commented Feb 12, 2020

Updated to latest version 2.2.0.3 and the problem is still here.

version: '3.3'
services:

  mariadb:
    image: mariadb:10.4
    restart: 'no'
    environment:
      MYSQL_DATABASE: random
      MYSQL_USER: test
      MYSQL_PASSWORD: test
      MYSQL_ROOT_PASSWORD: test
    ports:
      - '13333:3306'
    volumes:
      - './data:/var/lib/mysql'
    command:
      'mysqld --innodb-flush-method=fsync --innodb-use-native-aio=0'

First time starting the container I get this output:

mariadb_1  | 2020-02-12 16:09:27+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.11+maria~bionic started.
mariadb_1  | 2020-02-12 16:09:28+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mariadb_1  | 2020-02-12 16:09:28+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.11+maria~bionic started.
mariadb_1  | 2020-02-12 16:09:28+00:00 [Note] [Entrypoint]: Initializing database files
mariadb_1  |
mariadb_1  |
mariadb_1  | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
mariadb_1  | To do so, start the server, then issue the following commands:
mariadb_1  |
mariadb_1  | '/usr/bin/mysqladmin' -u root password 'new-password'
mariadb_1  | '/usr/bin/mysqladmin' -u root -h  password 'new-password'
mariadb_1  |
mariadb_1  | Alternatively you can run:
mariadb_1  | '/usr/bin/mysql_secure_installation'
mariadb_1  |
mariadb_1  | which will also give you the option of removing the test
mariadb_1  | databases and anonymous user created by default.  This is
mariadb_1  | strongly recommended for production servers.
mariadb_1  |
mariadb_1  | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
mariadb_1  | MySQL manual for more instructions.
mariadb_1  |
mariadb_1  | Please report any problems at http://mariadb.org/jira
mariadb_1  |
mariadb_1  | The latest information about MariaDB is available at http://mariadb.org/.
mariadb_1  | You can find additional information about the MySQL part at:
mariadb_1  | http://dev.mysql.com
mariadb_1  | Consider joining MariaDB's strong and vibrant community:
mariadb_1  | https://mariadb.org/get-involved/
mariadb_1  |
mariadb_1  | 2020-02-12 16:09:42+00:00 [Note] [Entrypoint]: Database files initialized
mariadb_1  | 2020-02-12 16:09:42+00:00 [Note] [Entrypoint]: Starting temporary server
mariadb_1  | 2020-02-12 16:09:42+00:00 [Note] [Entrypoint]: Waiting for server startup
mariadb_1  | 2020-02-12 16:09:42 0 [Note] mysqld (mysqld 10.4.11-MariaDB-1:10.4.11+maria~bionic) starting as process 122 ...
mariadb_1  | 2020-02-12 16:09:42 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mariadb_1  | 2020-02-12 16:09:42 0 [Note] InnoDB: Uses event mutexes
mariadb_1  | 2020-02-12 16:09:42 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb_1  | 2020-02-12 16:09:42 0 [Note] InnoDB: Number of pools: 1
mariadb_1  | 2020-02-12 16:09:42 0 [Note] InnoDB: Using SSE2 crc32 instructions
mariadb_1  | 2020-02-12 16:09:42 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
mariadb_1  | 2020-02-12 16:09:42 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
mariadb_1  | 2020-02-12 16:09:42 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb_1  | 2020-02-12 16:09:42 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mariadb_1  | 2020-02-12 16:09:42 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
mariadb_1  | 2020-02-12 16:09:42 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mariadb_1  | 2020-02-12 16:09:42 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mariadb_1  | 2020-02-12 16:09:43 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mariadb_1  | 2020-02-12 16:09:43 0 [Note] InnoDB: 10.4.11 started; log sequence number 60972; transaction id 21
mariadb_1  | 2020-02-12 16:09:43 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb_1  | 2020-02-12 16:09:43 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mariadb_1  | 2020-02-12 16:09:43 0 [Note] InnoDB: Buffer pool(s) load completed at 200212 16:09:43
mariadb_1  | 2020-02-12 16:09:43 0 [Warning] 'user' entry 'root@c8fb33335b95' ignored in --skip-name-resolve mode.
mariadb_1  | 2020-02-12 16:09:43 0 [Warning] 'user' entry '@c8fb33335b95' ignored in --skip-name-resolve mode.
mariadb_1  | 2020-02-12 16:09:43 0 [Warning] 'proxies_priv' entry '@% root@c8fb33335b95' ignored in --skip-name-resolve mode.
mariadb_1  | 2020-02-12 16:09:44 0 [Note] Reading of all Master_info entries succeeded
mariadb_1  | 2020-02-12 16:09:44 0 [Note] Added new Master_info '' to hash table
mariadb_1  | 2020-02-12 16:09:44 0 [Note] mysqld: ready for connections.
mariadb_1  | Version: '10.4.11-MariaDB-1:10.4.11+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
mariadb_1  | 2020-02-12 16:09:44+00:00 [Note] [Entrypoint]: Temporary server started.
mariadb_1  | 2020-02-12 16:09:46 9 [ERROR] InnoDB: Operating system error number 16 in a file operation.
mariadb_1  | 2020-02-12 16:09:46 9 [ERROR] InnoDB: Error number 16 means 'Device or resource busy'
mariadb_1  | 2020-02-12 16:09:46 9 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
mariadb_1  | 2020-02-12 16:09:46 9 [ERROR] InnoDB: Cannot rename file './mysql/#sql-7a_9.ibd' to './mysql/time_zone.ibd'
mariadb_1  | ERROR 1025 (HY000) at line 2: Error on rename of './mysql/#sql-7a_9' to './mysql/time_zone' (errno: 168 "Unknown (generic) error from engine")
db-test_mariadb_1 exited with code 1

Only the errors:

mariadb_1  | 2020-02-12 16:09:46 9 [ERROR] InnoDB: Operating system error number 16 in a file operation.
mariadb_1  | 2020-02-12 16:09:46 9 [ERROR] InnoDB: Error number 16 means 'Device or resource busy'
mariadb_1  | 2020-02-12 16:09:46 9 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
mariadb_1  | 2020-02-12 16:09:46 9 [ERROR] InnoDB: Cannot rename file './mysql/#sql-7a_9.ibd' to './mysql/time_zone.ibd'
mariadb_1  | ERROR 1025 (HY000) at line 2: Error on rename of './mysql/#sql-7a_9' to './mysql/time_zone' (errno: 168 "Unknown (generic) error from engine")

@djereg
Copy link

djereg commented Feb 13, 2020

Tried it on my home PC too. Both are Windows 10 18363.

Just start the container (docker-compose file above).

Create a table, fill it with some data. Duplicate the table and truncate the copy. Or rename the table.

mariadb_1  | 2020-02-13  9:28:14 9 [ERROR] InnoDB: Operating system error number 16 in a file operation.
mariadb_1  | 2020-02-13  9:28:14 9 [ERROR] InnoDB: Error number 16 means 'Device or resource busy'
mariadb_1  | 2020-02-13  9:28:14 9 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
mariadb_1  | 2020-02-13  9:28:14 9 [ERROR] InnoDB: Cannot rename file './random/user_copy1.ibd' to './random/user_copy2.ibd'
Full log
mariadb_1  | 2020-02-13 09:25:36+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.12+maria~bionic started.
mariadb_1  | 2020-02-13 09:25:37+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mariadb_1  | 2020-02-13 09:25:37+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.12+maria~bionic started.
mariadb_1  | 2020-02-13 09:25:37+00:00 [Note] [Entrypoint]: Initializing database files
mariadb_1  |
mariadb_1  |
mariadb_1  | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
mariadb_1  | To do so, start the server, then issue the following commands:
mariadb_1  |
mariadb_1  | '/usr/bin/mysqladmin' -u root password 'new-password'
mariadb_1  | '/usr/bin/mysqladmin' -u root -h  password 'new-password'
mariadb_1  |
mariadb_1  | Alternatively you can run:
mariadb_1  | '/usr/bin/mysql_secure_installation'
mariadb_1  |
mariadb_1  | which will also give you the option of removing the test
mariadb_1  | databases and anonymous user created by default.  This is
mariadb_1  | strongly recommended for production servers.
mariadb_1  |
mariadb_1  | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
mariadb_1  | MySQL manual for more instructions.
mariadb_1  |
mariadb_1  | Please report any problems at http://mariadb.org/jira
mariadb_1  |
mariadb_1  | The latest information about MariaDB is available at http://mariadb.org/.
mariadb_1  | You can find additional information about the MySQL part at:
mariadb_1  | http://dev.mysql.com
mariadb_1  | Consider joining MariaDB's strong and vibrant community:
mariadb_1  | https://mariadb.org/get-involved/
mariadb_1  |
mariadb_1  | 2020-02-13 09:25:53+00:00 [Note] [Entrypoint]: Database files initialized
mariadb_1  | 2020-02-13 09:25:53+00:00 [Note] [Entrypoint]: Starting temporary server
mariadb_1  | 2020-02-13 09:25:53+00:00 [Note] [Entrypoint]: Waiting for server startup
mariadb_1  | 2020-02-13  9:25:53 0 [Note] mysqld (mysqld 10.4.12-MariaDB-1:10.4.12+maria~bionic) starting as process 122 ...
mariadb_1  | 2020-02-13  9:25:53 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mariadb_1  | 2020-02-13  9:25:53 0 [Note] InnoDB: Uses event mutexes
mariadb_1  | 2020-02-13  9:25:53 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb_1  | 2020-02-13  9:25:53 0 [Note] InnoDB: Number of pools: 1
mariadb_1  | 2020-02-13  9:25:53 0 [Note] InnoDB: Using SSE2 crc32 instructions
mariadb_1  | 2020-02-13  9:25:53 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
mariadb_1  | 2020-02-13  9:25:53 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
mariadb_1  | 2020-02-13  9:25:53 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb_1  | 2020-02-13  9:25:53 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mariadb_1  | 2020-02-13  9:25:53 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
mariadb_1  | 2020-02-13  9:25:53 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mariadb_1  | 2020-02-13  9:25:53 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mariadb_1  | 2020-02-13  9:25:54 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mariadb_1  | 2020-02-13  9:25:54 0 [Note] InnoDB: Waiting for purge to start
mariadb_1  | 2020-02-13  9:25:54 0 [Note] InnoDB: 10.4.12 started; log sequence number 60972; transaction id 21
mariadb_1  | 2020-02-13  9:25:54 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb_1  | 2020-02-13  9:25:54 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mariadb_1  | 2020-02-13  9:25:54 0 [Note] InnoDB: Buffer pool(s) load completed at 200213  9:25:54
mariadb_1  | 2020-02-13  9:25:54 0 [Warning] 'user' entry 'root@7f3712672a71' ignored in --skip-name-resolve mode.
mariadb_1  | 2020-02-13  9:25:54 0 [Warning] 'user' entry '@7f3712672a71' ignored in --skip-name-resolve mode.
mariadb_1  | 2020-02-13  9:25:54 0 [Warning] 'proxies_priv' entry '@% root@7f3712672a71' ignored in --skip-name-resolve mode.
mariadb_1  | 2020-02-13  9:25:54 0 [Note] Reading of all Master_info entries succeeded
mariadb_1  | 2020-02-13  9:25:54 0 [Note] Added new Master_info '' to hash table
mariadb_1  | 2020-02-13  9:25:54 0 [Note] mysqld: ready for connections.
mariadb_1  | Version: '10.4.12-MariaDB-1:10.4.12+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
mariadb_1  | 2020-02-13 09:25:55+00:00 [Note] [Entrypoint]: Temporary server started.
mariadb_1  | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
mariadb_1  | 2020-02-13  9:26:04 10 [Warning] 'proxies_priv' entry '@% root@7f3712672a71' ignored in --skip-name-resolve mode.
mariadb_1  | 2020-02-13 09:26:04+00:00 [Note] [Entrypoint]: Creating database random
mariadb_1  | 2020-02-13 09:26:04+00:00 [Note] [Entrypoint]: Creating user test
mariadb_1  | 2020-02-13 09:26:04+00:00 [Note] [Entrypoint]: Giving user test access to schema random
mariadb_1  | 2020-02-13  9:26:04 14 [Warning] 'proxies_priv' entry '@% root@7f3712672a71' ignored in --skip-name-resolve mode.
mariadb_1  |
mariadb_1  | 2020-02-13 09:26:04+00:00 [Note] [Entrypoint]: Stopping temporary server
mariadb_1  | 2020-02-13  9:26:04 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
mariadb_1  | 2020-02-13  9:26:04 0 [Note] Event Scheduler: Purging the queue. 0 events
mariadb_1  | 2020-02-13  9:26:04 0 [Note] InnoDB: FTS optimize thread exiting.
mariadb_1  | 2020-02-13  9:26:05 0 [Note] InnoDB: Starting shutdown...
mariadb_1  | 2020-02-13  9:26:05 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
mariadb_1  | 2020-02-13  9:26:05 0 [Note] InnoDB: Buffer pool(s) dump completed at 200213  9:26:05
mariadb_1  | 2020-02-13  9:26:06 0 [Note] InnoDB: Shutdown completed; log sequence number 60981; transaction id 24
mariadb_1  | 2020-02-13  9:26:06 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
mariadb_1  | 2020-02-13  9:26:06 0 [Note] mysqld: Shutdown complete
mariadb_1  |
mariadb_1  | 2020-02-13 09:26:06+00:00 [Note] [Entrypoint]: Temporary server stopped
mariadb_1  |
mariadb_1  | 2020-02-13 09:26:06+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
mariadb_1  |
mariadb_1  | 2020-02-13  9:26:07 0 [Note] mysqld (mysqld 10.4.12-MariaDB-1:10.4.12+maria~bionic) starting as process 1 ...
mariadb_1  | 2020-02-13  9:26:07 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mariadb_1  | 2020-02-13  9:26:07 0 [Note] InnoDB: Uses event mutexes
mariadb_1  | 2020-02-13  9:26:07 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb_1  | 2020-02-13  9:26:07 0 [Note] InnoDB: Number of pools: 1
mariadb_1  | 2020-02-13  9:26:07 0 [Note] InnoDB: Using SSE2 crc32 instructions
mariadb_1  | 2020-02-13  9:26:07 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
mariadb_1  | 2020-02-13  9:26:07 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
mariadb_1  | 2020-02-13  9:26:07 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb_1  | 2020-02-13  9:26:07 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mariadb_1  | 2020-02-13  9:26:07 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
mariadb_1  | 2020-02-13  9:26:07 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mariadb_1  | 2020-02-13  9:26:07 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mariadb_1  | 2020-02-13  9:26:08 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mariadb_1  | 2020-02-13  9:26:08 0 [Note] InnoDB: Waiting for purge to start
mariadb_1  | 2020-02-13  9:26:08 0 [Note] InnoDB: 10.4.12 started; log sequence number 60981; transaction id 21
mariadb_1  | 2020-02-13  9:26:08 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb_1  | 2020-02-13  9:26:08 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mariadb_1  | 2020-02-13  9:26:08 0 [Note] InnoDB: Buffer pool(s) load completed at 200213  9:26:08
mariadb_1  | 2020-02-13  9:26:08 0 [Note] Server socket created on IP: '::'.
mariadb_1  | 2020-02-13  9:26:08 0 [Warning] 'proxies_priv' entry '@% root@7f3712672a71' ignored in --skip-name-resolve mode.
mariadb_1  | 2020-02-13  9:26:08 0 [Note] Reading of all Master_info entries succeeded
mariadb_1  | 2020-02-13  9:26:08 0 [Note] Added new Master_info '' to hash table
mariadb_1  | 2020-02-13  9:26:08 0 [Note] mysqld: ready for connections.
mariadb_1  | Version: '10.4.12-MariaDB-1:10.4.12+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
mariadb_1  | 2020-02-13  9:28:14 9 [ERROR] InnoDB: Operating system error number 16 in a file operation.
mariadb_1  | 2020-02-13  9:28:14 9 [ERROR] InnoDB: Error number 16 means 'Device or resource busy'
mariadb_1  | 2020-02-13  9:28:14 9 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
mariadb_1  | 2020-02-13  9:28:14 9 [ERROR] InnoDB: Cannot rename file './random/user_copy1.ibd' to './random/user_copy2.ibd'

@janjas92
Copy link

janjas92 commented Feb 14, 2020

I had the same error like @djereg . My version of Docker was 2.2.0.3. I downgrade to 19.03.5 and everything work good.

@djs55
Copy link

djs55 commented Feb 14, 2020

Thanks for your report. I think the current Windows volume sharing code does not handle reliably the case where an open file is being renamed. This bug is on our backlog.

Having said that, performance will be much better if you use a persistent Docker volume for the database, rather than remote the database to the host. For example:

version: '3.3'
services:

  mariadb:
    image: mariadb:10.4
    restart: 'no'
    environment:
      MYSQL_DATABASE: random
      MYSQL_USER: test
      MYSQL_PASSWORD: test
      MYSQL_ROOT_PASSWORD: test
    ports:
      - '13333:3306'
    volumes:
      - '/var/lib/mysql'
    command:
      'mysqld --innodb-flush-method=fsync --innodb-use-native-aio=0'

The volume - /var/lib/mysql will store the database inside the Linux VM where access to it will be really fast. Alternatively you could create a named volume with docker volume create databasevolume and then write - 'databasevolume:/var/lib/mysql' in the docker-compose.yml.

@mat007
Copy link
Member

mat007 commented Feb 14, 2020

As @djs55 mentioned we’re thinking the underlying cause might be the same as #5565

@xairoo
Copy link

xairoo commented Feb 15, 2020

I can reproduce this error while running this:

CREATE TABLE `assets` (
  `id` bigint(20) NOT NULL,
  `uuid` binary(16) NOT NULL,
  `parent_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `project_id` bigint(20) NOT NULL,
  `version_id` bigint(20) NOT NULL,
  `version` int(10) NOT NULL,
  `date_created` datetime NOT NULL,
  `date_updated` datetime NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `filename` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `filetype` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `data` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `filesize` varchar(200) COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `status` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci ROW_FORMAT=COMPACT;


ALTER TABLE `assets`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uuid` (`uuid`);

ALTER TABLE breaks it on latest Docker. No way to use MariaDB right now under Windows 10.

But it works fine with MariaDB (10.3.22-MariaDB - Debian 10) and with MySQL (8.0.19, latest Docker) - why not, that isn't special.

@gjukema
Copy link

gjukema commented Mar 15, 2020

The latest release (2.2.0.4) resolved my issues; I am able to restructure tables without crashing mariadb.

I was hopeful, as the release notes mentions many bug fixes around file share between docker container and windows host, specifically around Open files.

BTW, I've been struggling with this issue since I upgraded to 2.2.0.3 (I don't recall what version I had before).

@stephen-turner
Copy link
Contributor

Great, thanks for the feedback, @gjukema. I think it was a dupe of #5565 in that case. I'll close this ticket.

@strarsis
Copy link

strarsis commented Mar 22, 2020

I had a similar issue caused by some specific table name (WordPress site database with WordFence) and I was able to fix this using the extra option --lower_case_table_names=1 in command for the mysql/mariadb server container.

docker-compose.yml command used:

command: mysqld --innodb-flush-method=littlesync --innodb-use-native-aio=OFF --log_bin=ON --skip-innodb-file-per-table --server-id=1 --lower_case_table_names=1

Edit: When import of the sql dump to a mysql server on a *nix server doesn't work, use --lower_case_table_names=2 instead of --lower_case_table_names=1. But sometimes this won't fix the I/O error. You have to experiment with the option values 1 and 2.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jul 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests