RT upgrades causing segmentation faults under Debian Buster

Hey,

I’m working since the past year on a Request-Tracker 4.0.7 upgrade to 4.4.3 on a huge RT instance with several customizations. Meanwhile, Debian Buster was released and I tried to adapt the migration process to that. Unfortunately, I figured out, the rt-database-upgrade script does not work properly on Debian Buster.

To demonstrate that I screencasted a Debian Buster VM RT 4.0.7 installation and an upgrade attempt to RT 4.4.3. But even an upgrade from 4.4.3 to 4.4.4 will be stopped by the same errors: segmentation faults.

Screencast Debian Buster
Screencast Debian Stretch

You can reproduce this process by the following bash commands.

Maybe you have some ideas, meanwhile I’m will stick to Stretch and have to test if RT 4.4.3 will run smoothly after an update on Buster.

Cheers

Roman

The missing bash commands are linked here.

This issue was already described but never solved. I guess that’s related to that too.

Some of the “segmentation fault” upgrades do not perform database changes at all and are reproducible. That’s an indication that something in the Perl script is broken or a package/dependency corrupted.
Solving the dependencies completely by CPAN (make fixdeps) will cause the same issue, by the way.

Just a shot in the dark but I see you are manually setting the file permissions for the RT directory, the file rights should be handled when you run make install, there is also the make fixperms command that will fix file permissions.

Can you try running make fixperms and then the upgrade step or make fixdeps and see if its the same issue?

Hey, thank you for your suggestion.
I will try that but in that case Debian Stretch should behave the same way like Buster (file permissions are not fundamentally changed).

chmod -R 777 /opt/rt4/
does not have any effect

I set the permissions according make installs suggestions; its just copy-&-pasted.

As it seems to be having trouble with file permissions, I’d still be looking at making sure things like AppArmor and SELinux are (at least whilst debugging) disabled, as they can make traditional Unix style file permissions look fine but still cause failures. Also check for ACLs that have been applied. I’ve seen this so many times over the years - when we now hit an oddity at work one of the first suggestions is “have you disabled SELinux”?

Hey,

thank you for your post.

I checked SELinux, its by default disabled like AppArmor. AppArmor is even not installed in the minimal network Debian installation. During the screencast, I tried to stop AppArmor, but it is not present on the system.

make fixperms
does not change anything.

So it neither SELinux nor AppArmor nor file permissions (chmod -R 777) are solving the problem. And it’s not only applied during database upgrades.

As you can see, I used the pure vanilla Debian Buster Image. So nothing is “different” than the default settings.

The answers to linked posts are as well referred to file permissions and AppArmor/SELinux und the problem could not be solved.

I guess that’s something more complicated. I would like to encourage some developer just to install plain Debian Buster and to reproduce my procedure, or the basic installation and upgrade routine.

Is there a possibility to open an issue for the developer directly (like GitHub/GitLab issues)?

Honestly, it took a long time to break the issue down to Debian Buster, since everything works great on Debian Stretch with the identical steps.

That’s why I screencast the whole Debian setup, RT installation and upgrade. I could guess that’s something related to Perl or especially some functions or dependencies which are only used during the upgrades?

Next step I will perform tests on a Debian Stretch upgraded RT and subsequently upgrade Debian to Buster to see if RT behaves like expected. If yes, that could explain why there are not so many reports on that, since there are not a lot of RT upgrades after Debian Buster release. I’ll report the outcome.

Just to be able to reproduce, are you using system Perl or a standalone Perl for RT?

System perl:
$ apt install perl
as written in the second line.

Meanwhile I throw away the chown/chmods commands, since they are redundant. segfaults still appear

Ok, apply Debian Buster distribution upgrade after a successful RT 4.4.3 upgrade on Debian Stretch seems to work.
RT looks fine and works with my ~90 GB RT-MySQL-DB. Indicates, that something is wrong in the upgrade script.

Interesting. I just came to do a fresh install again today on Debian Buster. (Also tried and had similar problems on Ubuntu.) It seems to be related to the default database being mariadb on fresh install of Buster. The init script sometimes succeeds with no errors, but more often than not, it gets part-way through and segfaults. The “root” user account in RT is not created and therefore logging on to the new install isn’t possible.

The only way I managed to upgrade our system in the end was to copy the database to an fresh install of Ubuntu running mysql, then install RT, then point that RT install at the old database, then perform the upgrades using the upgrade script, then dump the resulting database out and re-import it again in mariadb on the debian buster box.

support.dev:/etc/request-tracker4/RT_SiteConfig.d# /usr/sbin/rt-setup-database-4 --action init --dba root2 --prompt-for-dba-password --root-password-file /tmp/rtpass
In order to create or update your RT database, this script needs to connect to your  mysql instance on 5.57.93.6 (port '3306') as root2
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Working with:
Type:   mysql
Host:   x.x.x.x
Port:   3306
Name:   support_dev
User:   support_dev
DBA:    root2
Now creating a mysql database support_dev for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs.
Done.
Now inserting RT core system objects.
Done.
[15006] [Mon Jan 27 16:15:31 2020] [debug]: Using internal Perl HTML -> text conversion (/usr/share/request-tracker4/lib/RT/Interface/Email.pm:1479)
Now inserting data.
[15006] [Mon Jan 27 16:15:31 2020] [debug]: Going to load '/usr/share/request-tracker4/etc/initialdata' data file (/usr/share/request-tracker4/lib/RT/Handle.pm:863)
[15006] [Mon Jan 27 16:15:31 2020] [debug]: Creating users... (/usr/share/request-tracker4/lib/RT/Handle.pm:987)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 14. (/usr/share/request-tracker4/lib/RT/Handle.pm:1004)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: done. (/usr/share/request-tracker4/lib/RT/Handle.pm:1040)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: Creating queues... (/usr/share/request-tracker4/lib/RT/Handle.pm:1070)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 1. (/usr/share/request-tracker4/lib/RT/Handle.pm:1078)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 2. (/usr/share/request-tracker4/lib/RT/Handle.pm:1078)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: done. (/usr/share/request-tracker4/lib/RT/Handle.pm:1083)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: Creating classes... (/usr/share/request-tracker4/lib/RT/Handle.pm:1086)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 1. (/usr/share/request-tracker4/lib/RT/Handle.pm:1100)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: done. (/usr/share/request-tracker4/lib/RT/Handle.pm:1122)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: Creating Catalogs... (/usr/share/request-tracker4/lib/RT/Handle.pm:1126)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 1. (/usr/share/request-tracker4/lib/RT/Handle.pm:1135)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: done. (/usr/share/request-tracker4/lib/RT/Handle.pm:1139)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: Creating custom fields... (/usr/share/request-tracker4/lib/RT/Handle.pm:1160)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: done. (/usr/share/request-tracker4/lib/RT/Handle.pm:1243)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: Creating ACL... (/usr/share/request-tracker4/lib/RT/Handle.pm:1276)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 3. (/usr/share/request-tracker4/lib/RT/Handle.pm:1357)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 4. (/usr/share/request-tracker4/lib/RT/Handle.pm:1357)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: done. (/usr/share/request-tracker4/lib/RT/Handle.pm:1361)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: Creating ScripActions... (/usr/share/request-tracker4/lib/RT/Handle.pm:1365)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 1. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 2. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 3. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 4. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 5. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 6. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 7. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 8. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 9. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 10. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 11. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 12. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 13. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 14. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 15. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 16. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 17. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 18. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 19. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 20. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 21. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 22. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 23. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 24. (/usr/share/request-tracker4/lib/RT/Handle.pm:1374)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: done. (/usr/share/request-tracker4/lib/RT/Handle.pm:1378)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: Creating ScripConditions... (/usr/share/request-tracker4/lib/RT/Handle.pm:1382)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 1. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 2. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 3. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 4. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 5. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 6. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 7. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 8. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 9. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 10. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 11. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 12. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 13. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 14. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 15. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 16. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 17. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 18. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 19. (/usr/share/request-tracker4/lib/RT/Handle.pm:1391)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: done. (/usr/share/request-tracker4/lib/RT/Handle.pm:1395)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: Creating templates... (/usr/share/request-tracker4/lib/RT/Handle.pm:1399)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 1. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 2. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 3. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 4. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 5. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 6. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 7. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 8. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 9. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 10. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:32 2020] [debug]: 11. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 12. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 13. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 14. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 15. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 16. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 17. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 18. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 19. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 20. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 21. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 22. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 23. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 24. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 25. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 26. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 27. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 28. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 29. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 30. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 31. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 32. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 33. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 34. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 35. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 36. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 37. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 38. (/usr/share/request-tracker4/lib/RT/Handle.pm:1408)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: done. (/usr/share/request-tracker4/lib/RT/Handle.pm:1411)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: Creating scrips... (/usr/share/request-tracker4/lib/RT/Handle.pm:1414)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 1. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 2. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 3. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 4. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 5. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 6. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 7. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 8. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 9. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 10. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 11. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 12. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 13. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 14. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 15. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 16. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 17. (/usr/share/request-tracker4/lib/RT/Handle.pm:1428)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: done. (/usr/share/request-tracker4/lib/RT/Handle.pm:1439)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: Creating attributes... (/usr/share/request-tracker4/lib/RT/Handle.pm:1442)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 4. (/usr/share/request-tracker4/lib/RT/Handle.pm:1458)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 5. (/usr/share/request-tracker4/lib/RT/Handle.pm:1458)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 6. (/usr/share/request-tracker4/lib/RT/Handle.pm:1458)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: 7. (/usr/share/request-tracker4/lib/RT/Handle.pm:1458)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: done. (/usr/share/request-tracker4/lib/RT/Handle.pm:1461)
[15006] [Mon Jan 27 16:15:33 2020] [debug]: Done setting up database content. (/usr/share/request-tracker4/lib/RT/Handle.pm:1483)
Segmentation fault

Jan 27 16:15:33 support kernel: [257023.472818] rt-setup-databa[15006]: segfault at 108 ip 00007fcfe3efae52 sp 00007ffdeec12480 error 4 in libmariadb.so.3[7fcfe3eee000+23000]
Jan 27 16:15:33 support kernel: [257023.476174] Code: 48 8b 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8b 87 f0 04 00 00 48 85 c0 74 26 48 8b 00 48 85 c0 74 1e 48 8b 00 48 85 c0 74 16 <48> 8b 40 78 48 85 c0 74 0d ff d0 e9 57 03 00 00 66 0f 1f 44 00 00

So, this seems to point to something in this client library. It would be interesting to see what happens when you did the dist-upgrade, i.e, does this preserve the mysql setup or replace it with mariadb, and do you end up with the same libraries or does it keep the old versions?

I agree to that, could observe that probably related to the mysql-perl library. Unfortunately, the upgrade is done and the old machines does not exists anymore. I could only try to reproduce that from an old dump.

I’m having the same issue and the segfault is reproducible:

Current (working) rt instance:
4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64 GNU/Linux
request-tracker4 4.4.1-3+deb9u3
mariadb-server-10.1 10.1.45-0+deb9u1

New (segfault) rt instance:
4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux
request-tracker4 4.4.3-2
mariadb-server 1:10.3.23-0+deb10u1

This is what I do to upgrade:

  1. Dump entire database from working instance
  2. Restore database to new instance
  3. run “rt-setup-database -force --action upgrade” on new instance

The stack trace is:
/lib/x86_64-linux-gnu/libmariadb.so.3(mariadb_reconnect+0x3a)[0x7f7a728e647a]
/lib/x86_64-linux-gnu/libmariadb.so.3(+0x25b21)[0x7f7a728e6b21]
/lib/x86_64-linux-gnu/libmariadb.so.3(mysql_ping+0x20)[0x7f7a728e6dc0]
/usr/lib/x86_64-linux-gnu/perl5/5.28/auto/DBD/mysql/mysql.so(+0x1234f)[0x7f7a7293134f]
/usr/lib/x86_64-linux-gnu/perl5/5.28/auto/DBI/DBI.so(XS_DBI_dispatch+0xc49)[0x7f7a729ff629]
perl(Perl_pp_entersub+0x1f1)[0x560d8f52e901]
perl(Perl_runops_standard+0x16)[0x560d8f524c26]
perl(perl_run+0x2da)[0x560d8f4a002a]
perl(main+0x152)[0x560d8f476402]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb)[0x7f7a72f1509b]
perl(_start+0x2a)[0x560d8f47644a]

If add a return statement immediately before “$upgrade->();” on line 400 of “rt-setup-database”
no segfault occurs.

If someone has any idea, I would be happy to do more tests.

I believe this was fixed in RT5, you could try applying this commit and updating DBIx::SearchBuilder:

Thank you!

Upgrading using the package libdbix-searchbuilder-perl from Debian Testing seems to solve the issue.

I also found another way to solve this issue, it is more complicated, but maybe it will help someone anyway:

  • install “libdbd-mariadb-perl”
  • Define a new database type “mariadb => ‘MariaDB’” in “/etc/request-tracker4/RT_SiteConfig.d/51-dbconfig-common.pm”
  • Create the corresponding searchbuilder pacakge for mariadb by copying “/usr/share/perl5/DBIx/SearchBuilder/Handle/mysql.pm”
  • Modify “/usr/share/request-tracker4/lib/RT/Handle.pm” to handle the new database type in the same way it handles mysql