Bug 251550 - databases/mariadb103-server pkg upgrade removes customized my.cnf, unable to start daemon
Summary: databases/mariadb103-server pkg upgrade removes customized my.cnf, unable to ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-02 23:24 UTC by Miroslav Lachman
Modified: 2020-12-07 19:42 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (brnrd)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2020-12-02 23:24:27 UTC
We are using MySQL / MariaDB for many years but current pkg upgrade of MariaDB 10.3 ends up with broken configuration where daemon was unable to start with strange error message in the log:

2020-11-29 17:58:53 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-11-29 17:58:53 0 [Note] InnoDB: Uses event mutexes
2020-11-29 17:58:53 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-11-29 17:58:53 0 [Note] InnoDB: Number of pools: 1
2020-11-29 17:58:53 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-11-29 17:58:53 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-11-29 17:58:53 0 [Note] InnoDB: Completed initialization of buffer pool
2020-11-29 17:58:53 0 [ERROR] [FATAL] InnoDB: Trying to read page number 294949 in space 0, space name innodb_system, which is outside the tablespace bounds. Byte offset 0, len 16384Please check that the configuration matches the InnoDB system tablespace location (ibdata files)
201129 17:58:53 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.3.25-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467360 K  bytes of memory
Hope that''s ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x0 thread_stack 0x49000
0xcd7b7c <my_print_stacktrace+0x3c> at /usr/local/libexec/mysqld
0x83f634 <handle_fatal_signal+0x294> at /usr/local/libexec/mysqld
0x8039fec80 <pthread_sigmask+0x530> at /lib/libthr.so.3
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.


This was tracked down to /usr/local/etc/my.cnf which was replaced by some "empty" configuration file:

> cat /usr/local/etc/my.cnf
#
# This group is read both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include *.cnf from the config directory
#
!includedir /usr/local/etc/mysql/conf.d

Original my.cnf was not moved in to /usr/local/etc/mysql/conf.d nor backed up. 
To make this instance work again I must restored my.cnf from backup.

This very same problem was seen on another machine with upgrade from 10.3.23 to 10.3.27. This first machine was upgraded from 10.3.23 to 10.3.25.

I think this behavior is very dangerous a should be avoided - no user modified configuration files should be replaced by pkg install / pkg upgrade.

If this is really REALLY necessary then it should be mentioned in UPDATING and/or pkg-message but this is not the case here.

From user / administrator perspective I really do not expected to "pkg upgrade" breaks configuration forking for years.
Comment 1 Bernard Spil freebsd_committer freebsd_triage 2020-12-06 14:44:54 UTC
Fixed with r557137
Comment 2 Miroslav Lachman 2020-12-07 15:11:01 UTC
(In reply to Bernard Spil from comment #1)
Quaterly branch (ports and packages) is still affected by this bug.
Can you merge it to quaterly branch, please?
Comment 3 Bernard Spil freebsd_committer freebsd_triage 2020-12-07 19:42:42 UTC
MFH requested from ports-secteam