[Kernel-packages] [Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy

2022-08-08 Thread Martin Richtarsky
@xnox: I have:

$ uname -r
5.15.0-43-generic
$ sudo zfs version
zfs-2.1.4-0ubuntu0.1
zfs-kmod-2.1.4-0ubuntu0.1

Can you confirm that the bug is not fixed there, since presumably kernel
5.15.0-43 < 5.15.0-43.46?

And is it possible to upgrade the kernel within jammy to get the fix?

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to zfs-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1969247

Title:
  fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in
  Jammy

Status in Native ZFS for Linux:
  Fix Released
Status in mysql-8.0 package in Ubuntu:
  Invalid
Status in zfs-linux package in Ubuntu:
  Fix Released
Status in zfs-linux source package in Jammy:
  Fix Released

Bug description:
  [Summary]

  When running Jammy on zfs or LXD with a zfs pool on a Jammy host,
  fallocate creates a zero-sized file.

  The issue was originally found when installing mysql on LXD, where
  fallocate would create a zero-sized ib_logfile1 file. The original
  information in this bug is based on that.

  [Steps to Reproduce]

  touch foo.img
  fallocate -z -l 10M foo.img
  ls -la foo.img

  On a non-zfs Jammy system this will show something like:
  -rw-r--r-- 1 root root 10M ...

  while on zfs it will show:
  -rw-rw-r-- 1 root root 0 ...

  [Original Description]
  I came across this error when testing various mysql setups in an LXD 
container and managed to reproduce it consistently. I'm unable to reproduce on 
Ubuntu desktop or server though since the prerequisites are probably handled 
properly there.

  ProblemType: Package
  DistroRelease: Ubuntu 20.04
  Package: mysql-server-8.0 8.0.28-0ubuntu0.20.04.3
  ProcVersionSignature: Ubuntu 5.15.0-25.25-generic 5.15.30
  Uname: Linux 5.15.0-25-generic x86_64
  ApportVersion: 2.20.11-0ubuntu27.23
  Architecture: amd64
  CasperMD5CheckResult: skip
  Date: Fri Apr 15 21:31:09 2022
  Dmesg:

  ErrorMessage: installed mysql-server-8.0 package post-installation script 
subprocess returned error exit status 1
  KernLog:

  Logs.var.log.daemon.log:

  MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
  MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
   [mysqldump]
   quick
   quote-names
   max_allowed_packet   = 16M
  MySQLConf.etc.mysql.my.cnf: Error: [Errno 40] Too many levels of symbolic 
links: '/etc/mysql/my.cnf'
  MySQLVarLibDirListing: ['ibdata1', 'ib_logfile0', '#innodb_temp', 
'debian-5.7.flag', '#ib_16384_0.dblwr', 'client-cert.pem', 'undo_001', 
'server-cert.pem', 'mysql.ibd', '#ib_16384_1.dblwr', 'client-key.pem', 
'ca-key.pem', 'sys', 'private_key.pem', 'mysql', 'undo_002', 'binlog.index', 
'performance_schema', 'ib_buffer_pool', 'auto.cnf', 'ib_logfile1', 
'public_key.pem', 'ca.pem', 'server-key.pem']
  ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.15.0-25-generic 
root=UUID=93666562-b5e4-4fb4-ba8c-7b42a3e6bf61 ro quiet splash 
mem_sleep_default=deep vt.handoff=7
  Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 
3.8.2-0ubuntu2
  PythonDetails: N/A
  RelatedPackageVersions:
   dpkg 1.19.7ubuntu3
   apt  2.0.6
  SourcePackage: mysql-8.0
  Title: package mysql-server-8.0 8.0.28-0ubuntu0.20.04.3 failed to 
install/upgrade: installed mysql-server-8.0 package post-installation script 
subprocess returned error exit status 1
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy

2022-08-07 Thread Martin Richtarsky
@lucaskanashiro: I do not have innodb_page_size set.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to zfs-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1969247

Title:
  fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in
  Jammy

Status in Native ZFS for Linux:
  Fix Released
Status in mysql-8.0 package in Ubuntu:
  Invalid
Status in zfs-linux package in Ubuntu:
  Fix Released
Status in zfs-linux source package in Jammy:
  Fix Released

Bug description:
  [Summary]

  When running Jammy on zfs or LXD with a zfs pool on a Jammy host,
  fallocate creates a zero-sized file.

  The issue was originally found when installing mysql on LXD, where
  fallocate would create a zero-sized ib_logfile1 file. The original
  information in this bug is based on that.

  [Steps to Reproduce]

  touch foo.img
  fallocate -z -l 10M foo.img
  ls -la foo.img

  On a non-zfs Jammy system this will show something like:
  -rw-r--r-- 1 root root 10M ...

  while on zfs it will show:
  -rw-rw-r-- 1 root root 0 ...

  [Original Description]
  I came across this error when testing various mysql setups in an LXD 
container and managed to reproduce it consistently. I'm unable to reproduce on 
Ubuntu desktop or server though since the prerequisites are probably handled 
properly there.

  ProblemType: Package
  DistroRelease: Ubuntu 20.04
  Package: mysql-server-8.0 8.0.28-0ubuntu0.20.04.3
  ProcVersionSignature: Ubuntu 5.15.0-25.25-generic 5.15.30
  Uname: Linux 5.15.0-25-generic x86_64
  ApportVersion: 2.20.11-0ubuntu27.23
  Architecture: amd64
  CasperMD5CheckResult: skip
  Date: Fri Apr 15 21:31:09 2022
  Dmesg:

  ErrorMessage: installed mysql-server-8.0 package post-installation script 
subprocess returned error exit status 1
  KernLog:

  Logs.var.log.daemon.log:

  MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
  MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
   [mysqldump]
   quick
   quote-names
   max_allowed_packet   = 16M
  MySQLConf.etc.mysql.my.cnf: Error: [Errno 40] Too many levels of symbolic 
links: '/etc/mysql/my.cnf'
  MySQLVarLibDirListing: ['ibdata1', 'ib_logfile0', '#innodb_temp', 
'debian-5.7.flag', '#ib_16384_0.dblwr', 'client-cert.pem', 'undo_001', 
'server-cert.pem', 'mysql.ibd', '#ib_16384_1.dblwr', 'client-key.pem', 
'ca-key.pem', 'sys', 'private_key.pem', 'mysql', 'undo_002', 'binlog.index', 
'performance_schema', 'ib_buffer_pool', 'auto.cnf', 'ib_logfile1', 
'public_key.pem', 'ca.pem', 'server-key.pem']
  ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.15.0-25-generic 
root=UUID=93666562-b5e4-4fb4-ba8c-7b42a3e6bf61 ro quiet splash 
mem_sleep_default=deep vt.handoff=7
  Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 
3.8.2-0ubuntu2
  PythonDetails: N/A
  RelatedPackageVersions:
   dpkg 1.19.7ubuntu3
   apt  2.0.6
  SourcePackage: mysql-8.0
  Title: package mysql-server-8.0 8.0.28-0ubuntu0.20.04.3 failed to 
install/upgrade: installed mysql-server-8.0 package post-installation script 
subprocess returned error exit status 1
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zfs/+bug/1969247/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1969247] Re: fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in Jammy

2022-07-30 Thread Martin Richtarsky
I ran into this today on jammy, which I understand should have the fix?
Here are my symptoms:

- unattended-upgrades upgraded mysql server:
$ grep upgrade /var/log/dpkg.log | grep mysql
2022-07-30 06:38:00 upgrade mysql-server:all 8.0.29-0ubuntu0.22.04.2 
8.0.30-0ubuntu0.22.04.1
2022-07-30 06:38:05 upgrade mysql-client-8.0:amd64 8.0.29-0ubuntu0.22.04.2 
8.0.30-0ubuntu0.22.04.1
2022-07-30 06:38:09 upgrade mysql-client-core-8.0:amd64 8.0.29-0ubuntu0.22.04.2 
8.0.30-0ubuntu0.22.04.1
2022-07-30 06:38:15 upgrade libmysqlclient21:amd64 8.0.29-0ubuntu0.22.04.2 
8.0.30-0ubuntu0.22.04.1
2022-07-30 06:38:20 upgrade mysql-server-8.0:amd64 8.0.29-0ubuntu0.22.04.2 
8.0.30-0ubuntu0.22.04.1
2022-07-30 06:38:25 upgrade mysql-server-core-8.0:amd64 8.0.29-0ubuntu0.22.04.2 
8.0.30-0ubuntu0.22.04.1

- however, the restart failed:
$ /var/log/mysql/error.log
2022-07-30T06:38:31.591223Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld 
(mysqld 8.0.30-0ubuntu0.22.04.1) starting as process 457250
2022-07-30T06:38:31.646707Z 1 [System] [MY-013576] [InnoDB] InnoDB 
initialization has started.
2022-07-30T06:38:35.237627Z 1 [System] [MY-013577] [InnoDB] InnoDB 
initialization has ended.
2022-07-30T06:38:38.804696Z 4 [System] [MY-013381] [Server] Server upgrade from 
'80029' to '80030' started.
2022-07-30T06:38:44.914043Z 4 [System] [MY-013381] [Server] Server upgrade from 
'80029' to '80030' completed.
2022-07-30T06:38:45.097152Z 0 [Warning] [MY-010068] [Server] CA certificate 
ca.pem is self signed.
2022-07-30T06:38:45.097223Z 0 [System] [MY-013602] [Server] Channel mysql_main 
configured to support TLS. Encrypted connections are now supported for this 
channel.
2022-07-30T06:38:45.108326Z 0 [Warning] [MY-011810] [Server] Insecure 
configuration for --pid-file: Location '/tmp' in the path is accessible to all 
OS users. Consider choosing a different directory.
2022-07-30T06:38:45.156661Z 0 [System] [MY-011323] [Server] X Plugin ready for 
connections. Socket: /var/run/mysqld/mysqlx.sock
2022-07-30T06:38:45.156821Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: 
ready for connections. Version: '8.0.30-0ubuntu0.22.04.1'  socket: 
'/tmp/tmp.hmxTqM13bi/mysqld.sock'  port: 0  (Ubuntu).
2022-07-30T06:38:45.190816Z 0 [System] [MY-013172] [Server] Received SHUTDOWN 
from user . Shutting down mysqld (Version: 
8.0.30-0ubuntu0.22.04.1).
2022-07-30T06:38:47.795072Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: 
Shutdown complete (mysqld 8.0.30-0ubuntu0.22.04.1)  (Ubuntu).
2022-07-30T06:38:49.617486Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld 
(mysqld 8.0.30-0ubuntu0.22.04.1) starting as process 458616
2022-07-30T06:38:49.628355Z 1 [System] [MY-013576] [InnoDB] InnoDB 
initialization has started.
2022-07-30T06:38:49.749634Z 1 [ERROR] [MY-012962] [InnoDB] The redo log file 
./#innodb_redo/#ib_redo6 size 1712128 is not a multiple of innodb_page_size
2022-07-30T06:38:49.749689Z 1 [ERROR] [MY-012930] [InnoDB] Plugin 
initialization aborted with error Generic error.
2022-07-30T06:38:50.180894Z 1 [ERROR] [MY-010334] [Server] Failed to initialize 
DD Storage Engine
2022-07-30T06:38:50.181389Z 0 [ERROR] [MY-010020] [Server] Data Dictionary 
initialization failed.
2022-07-30T06:38:50.182614Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-07-30T06:38:50.184018Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: 
Shutdown complete (mysqld 8.0.30-0ubuntu0.22.04.1)  (Ubuntu).

Error is the same as in this bug.

- zfs package versions:

libzfs4linux/jammy-updates,now 2.1.4-0ubuntu0.1 amd64 [installed,automatic]
zfs-zed/jammy-updates,now 2.1.4-0ubuntu0.1 amd64 [installed,automatic]
zfsutils-linux/jammy-updates,now 2.1.4-0ubuntu0.1 amd64 [installed]

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to zfs-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1969247

Title:
  fallocate with FALLOC_FL_ZERO_RANGE produces zero-size files on zfs in
  Jammy

Status in Native ZFS for Linux:
  Fix Released
Status in mysql-8.0 package in Ubuntu:
  Invalid
Status in zfs-linux package in Ubuntu:
  Fix Released
Status in zfs-linux source package in Jammy:
  Fix Released

Bug description:
  [Summary]

  When running Jammy on zfs or LXD with a zfs pool on a Jammy host,
  fallocate creates a zero-sized file.

  The issue was originally found when installing mysql on LXD, where
  fallocate would create a zero-sized ib_logfile1 file. The original
  information in this bug is based on that.

  [Steps to Reproduce]

  touch foo.img
  fallocate -z -l 10M foo.img
  ls -la foo.img

  On a non-zfs Jammy system this will show something like:
  -rw-r--r-- 1 root root 10M ...

  while on zfs it will show:
  -rw-rw-r-- 1 root root 0 ...

  [Original Description]
  I came across this error when testing various mysql setups in an LXD 
container and managed to reproduce it consistently. I'm unable to reproduce on 
Ubuntu desktop or server though since the prerequisites are probably handled 
properly there.

  ProblemType: