[MDEV-29015] InnoDB: Assertion failure in file /home/buildbot/buildbot/build/mariadb-10.3.35/storage/innobase/fil/fil0fil.cc line 968 Created: 2022-07-03  Updated: 2022-09-04  Resolved: 2022-09-04

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.3.35
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Shenyu Zheng Assignee: Daniel Black
Resolution: Incomplete Votes: 0
Labels: None
Environment:

Docker


Attachments: Text File new 5.txt    
Issue Links:
Relates
relates to MDEV-28580 Server crash when creating an index a... Closed
relates to MDEV-29260 Server crashes when running migration... Open

 Description   

Try to do laravel migrate, and it crashes every time on this spot. Was fine with MySQL server.



 Comments   
Comment by Thirunarayanan Balathandayuthapani [ 2022-07-10 ]

Please mention the docker build version and please provide information about OS too. It looks like issue is related to MDEV-28580.

Comment by Daniel Black [ 2022-07-11 ]

It looks like WSL related probably exactly issue 8443.

Reproducing this should be creating the table organizations, and then alter table `organizations` add index `organizations_stripe_id_index`(`stripe_id`).

If you are able to follow the same recording of strace/procmon, and report the version information we can confirm this and add more information to the WSL issue.

thiru, on the difference to MySQL, MySQL's os_file_set_size takes an existing current_size, rather than MariaDB's fstat (the failing WSL), to determine the existing size. MYSQL also uses my_seek (lseek wrapper) to SEEK_END (in my_fallocator) to determine the current size, so this might a way to avoid it.

Comment by Daniel Black [ 2022-07-11 ]

thiru, I did a proof of concept in bb-10.3-danielblack-MDEV-29015-my_seek-avoid-wsl8443. Can you double check that the current file position isn't used in relation to the files on which os_file_set_size is called.

shenyu, I'll prepare a container later for testing assuming it passes the test suite ok.

Comment by Daniel Black [ 2022-07-11 ]

The container image is available as quay.io/mariadb-foundation/mariadb-devel:10.3-mdev-29015-avoid-wsl8443. If you are able to test in your test environment this to see if it crashes in a Windows WSL environment that would be appreciated.

If it fails for some reason, can you perform a strace on the test case like the instructions in MDEV-28580.

Comment by Shenyu Zheng [ 2022-07-12 ]

$ docker version
Client:
Cloud integration: v1.0.24
Version: 20.10.14
API version: 1.41
Go version: go1.16.15
Git commit: a224086
Built: Thu Mar 24 01:53:11 2022
OS/Arch: windows/amd64
Context: default
Experimental: true

Server: Docker Desktop 4.8.2 (79419)
Engine:
Version: 20.10.14
API version: 1.41 (minimum version 1.12)
Go version: go1.16.15
Git commit: 87a90dc
Built: Thu Mar 24 01:46:14 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.5.11
GitCommit: 3df54a852345ae127d1fa3092b95168e4a88e2f8
runc:
Version: 1.0.3
GitCommit: v1.0.3-0-gf46b6ba
docker-init:
Version: 0.19.0
GitCommit: de40ad0

Comment by Shenyu Zheng [ 2022-07-12 ]

Daniel, I will try, I don't do this DB debug much so may take some time. Thanks.

Comment by Daniel Black [ 2022-07-12 ]

$ docker run -d --env MARIADB_ROOT_PASSWORD=bob --env MARIADB_USER=u --env MARIADB_PASSWORD=pass --env MARIADB_DATABASE=test --name m103test --rm --cap-add=SYS_PTRACE  quay.io/mariadb-foundation/mariadb-devel:10.3-mdev-29015-avoid-wsl8443
 
# in separate terminal
$ docker exec m103test sh -c 'apt-get update && apt-get install -y strace && strace -f -s 99 -p 1'
 
# in original terminal
$ docker exec -ti m103test mysql -u u -ppass test
MariaDB [test]> create table organizations (id int not null primary key, stripe_id int); /* use your table definition */
Query OK, 0 rows affected (0.016 sec)
 
MariaDB [test]> alter table `organizations` add index `organizations_stripe_id_index`(`stripe_id`), force;
Query OK, 0 rows affected (0.015 sec)
Records: 0  Duplicates: 0  Warnings: 0

Comment by Daniel Black [ 2022-07-25 ]

I retested on Windows 10 - 19044.1826 and was unable to reproduce this.

I also tested on Windows 11 22000.795 and couldn't reproduce it there either.

Can you please retest if your Windows updates resolve this.

Generated at Thu Feb 08 10:05:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.