Make upgrade-database Segmentation fault

Hello,

Migrating from 4.2.9, to 4.4 on a new server (Debian) and running into some issues. Installation completed, resulting in a working installation, then a mysqldump was copied over and imported into MariaDB. During make upgrade-database, seg fault.

root@rt:~/rt-4.4.4# new~ make upgrade-database
/usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib sbin/rt-setup-database --action upgrade --prompt-for-dba-    password
In order to create or update your RT database, this script needs to connect to your  mysql instance     on localhost (port '') as root
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Working with:
Type:   mysql
Host:   localhost
Port:
Name:   rt4
User:  ticketaccess
DBA:    root
Enter RT version you're upgrading from: 4.2.9

Going to apply following upgrades:
* 4.2.10
* 4.2.11
* 4.3.0
* 4.3.1
* 4.3.2
* 4.3.3
* 4.3.5
* 4.3.6
* 4.3.7
* 4.3.8
* 4.3.9
* 4.3.10
* 4.3.11
* 4.3.12
* 4.3.13
* 4.4.1
* 4.4.2

Enter RT version if you want to stop upgrade at some point,
or leave it blank if you want apply above upgrades:

IT'S VERY IMPORTANT TO BACK UP BEFORE THIS STEP

Proceed [y/N]:y
Processing 4.2.10
make: *** [Makefile:392: upgrade-database] Segmentation fault

I tried strace for more information, but didn’t really help.

IT'S VERY IMPORTANT TO BACK UP BEFORE THIS STEP

Proceed [y/N]:y
Processing 4.2.10
Now inserting data.
[{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV}], 0, NULL) = 19857
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2995, ...}) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2995
read(3, "", 4096)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1      ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1     ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1    ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "make: *** [Makefile:392: upgrade"..., 62make: *** [Makefile:392: upgrade-database]     Segmentation fault
 ) = 62
stat("upgrade-database", 0x7ffc91e18fc0) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
chdir("/root/rt-4.4.4")                 = 0
close(1)                                = 0
exit_group(2)                           = ? 
+++ exited with 2 +++

Anyone have some ideas in things I can try to get to the cause of the seg fault of the make database-upgrade script? Is there another way I can achieve the same result, w/o using the script?

I haven’t seen a seg fault before but looking through the forum it seems to be related to file permissions

No such file or directory

That could point to file permissions, does sbin/rt-setup-database --upgrade have the same issue?

Yes, sbin/rt-setup-database --upgrade produces exactly the same the output. File permissions appear to be fine.

Do you have SELinux turned on? If so, you might want to see if (temporarily) turning it off with setenforce 0 and then rerunning the commands works. If it does, take a look in the SELinux audit.log to see what is being triggered.

This is Debian Buster

Hmm, that seems to come with something called AppArmour. Not something I’ve used I’m afraid, but as it looks to do something similar to SELinux, I’d probably look closely at it to see if it is restricting access rights that traditional Linux/Unix toolchains would appear to indicate are OK. We often trip over SELinux for similar reasons.

Thanks. I disabled AppArmour and still segfaulting.

How different is running make upgrade-database from cat’ing all the .sql files in /opt/rt4/etc/upgrade and just sourcing that file in MySQL?