Created attachment 244693 [details] proposed patch The patch is a backport of this upstream commit: https://github.com/rpm-software-management/rpm/commit/ea3187cfcf9cac87e5bc5e7db79b0338da9e355e We've observed that this fixes occasional crashes in dnf, which uses librpmio.so: #0 0x000000080083c884 in strlen () at /lib/libc.so.7 #1 0x00000008007ddb9e in __vfprintf () at /lib/libc.so.7 #2 0x00000008007507d9 in vsnprintf () at /lib/libc.so.7 #3 0x0000000801f8f248 in rpmlog () at /usr/local/lib/librpmio.so.9 #4 0x0000000801ffd824 in sqlite3_log () at /usr/local/lib/libsqlite3.so.0 #5 0x00000008020235a7 in () at /usr/local/lib/libsqlite3.so.0
Created attachment 244694 [details] proposed patch Submit a patch against the ports tree.
Hi Rodrigo, it looks like rpm 4.19.0 was released recently, and it contains the patch. Do you plan to update the port in the near future? If not, is there any problem with committing this patch?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=294f4c23aad46176cd0ebb8b816508b437f22b1f commit 294f4c23aad46176cd0ebb8b816508b437f22b1f Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-09-06 20:58:55 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-10-12 15:21:48 +0000 archivers/rpm4: Backport an upstream bugfix The following upstream commit addresses a problem where librpmio.so's sqlite error handler can interfere with other sqlite consumers and cause a crash: https://github.com/rpm-software-management/rpm/commit/ea3187cfcf9cac87e5bc5e7db79b0338da9e355e Backport the patch now since it's affecting at least one rpm4 user on FreeBSD. This can be dropped once rpm 4.19 is imported. PR: 273614 Approved by: maintainer timeout (4 weeks) Sponsored by: Klara, Inc. .../rpm4/files/patch-lib_backend_sqlite.c (new) | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+)