Dnf Segmentation fault (core dumped)

I’m having an issue on several almalinux 9.5 servers. If I want to add/update I get the segfault which stems from a corrupt history. Running ‘sudo sqlite3 /var/lib/dnf/history.sqlite “PRAGMA integrity_check;”’ will fix the problem for one time. Then it’s corrupt again. I try removing & resetting the history and the problem keeps coming back. ‘dnf clean all’ will also fix the issue for one time.

I didn’t have any problems until I updated sqlite several weeks back when that update was available (sqlite-3.46.1-1.el9.x86_64). Selinux makes no difference.

I have rebuild the package database, reinstalled dnf/yum and this problem is persistent.

I have some Almalinux 9 servers that don’t have this problem so I don’t know what’s going on.

Any suggestions?