Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 815643 - net-dns/pdns-4.5.1 broken gsqlite3 backend
Summary: net-dns/pdns-4.5.1 broken gsqlite3 backend
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-01 13:07 UTC by Luca Santarelli
Modified: 2023-05-12 20:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Santarelli 2021-10-01 13:07:12 UTC
After upgrading from 4.4.1-r1 to 4.5.1, using a SQLite back-end, PowerDNS fails to start claiming that the database does not exist.
Re-emerging back 4.4.1-r1 restores functionality.

Reproducible: Always




syslog of 4.5.1 vs (restored) 4.4.1-r1

Oct 01 14:56:14 [pdns] Loading '/usr/lib64/powerdns/pdns/libgsqlite3backend.so'
Oct 01 14:56:14 [pdns] This is a standalone pdns
Oct 01 14:56:14 [pdns] Listening on controlsocket in '/var/lib/pdns/pdns.controlsocket'
Oct 01 14:56:14 [pdns] gsqlite3: connection failed: SQLite database 'pdns.sqlite3.db' does not exist yet
Oct 01 14:56:14 [pdns] Caught an exception instantiating a backend: Unable to launch gsqlite3 connection: SQLite database 'pdns.sqlite3.db' does not exist yet
Oct 01 14:56:14 [pdns] Cleaning up
Oct 01 14:56:14 [pdns] Fatal error: Unable to launch gsqlite3 connection: SQLite database 'pdns.sqlite3.db' does not exist yet


Oct 01 15:00:36 [pdns] Loading '/usr/lib64/powerdns/pdns/libgsqlite3backend.so'
Oct 01 15:00:36 [pdns] This is a standalone pdns
Oct 01 15:00:36 [pdns] Listening on controlsocket in '/var/lib/pdns/pdns.controlsocket'
Oct 01 15:00:36 [pdns] UDP server bound to 0.0.0.0:54
Oct 01 15:00:36 [pdns] TCP server bound to 0.0.0.0:54
Oct 01 15:00:36 [pdns] PowerDNS Authoritative Server 4.4.1 (C) 2001-2020 PowerDNS.COM BV
Oct 01 15:00:36 [pdns] Using 64-bits mode. Built using gcc 10.3.0 on Sep 30 2021 05:15:39 by portage@localhost.
Oct 01 15:00:36 [pdns] PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
Oct 01 15:00:36 [pdns] Chrooted to '/var/lib/pdns'
Oct 01 15:00:36 [pdns] Polled security status of version 4.4.1 at startup, no known issues reported: OK
Oct 01 15:00:36 [pdns] Creating backend connection for TCP
Oct 01 15:00:36 [pdns] Master/slave communicator launching
Oct 01 15:00:36 [pdns] About to create 3 backend threads for UDP
Oct 01 15:00:36 [pdns] Done launching threads, ready to distribute questions
Comment 1 Luca Santarelli 2021-10-01 13:10:52 UTC
Upstream doesn't report any breaking changes from 4.4.1 to 4.5.1 and has no open issues.

I wanted to help in determining the root of the issue trying to use the ebuild command, doing unpack, replacing the source tree with a git clone of upstream's repo, then git bisect-ing, compile, merge.

Unfortunately the git repo and the source package used by gentoo are very different and the procedure doesn't work. This prevents me, with my limited knowledge, to help. If guided, I'm willing to go further.
Comment 2 Sven Wegener gentoo-dev 2021-10-08 18:47:56 UTC
I suspect it is

https://github.com/PowerDNS/pdns/pull/9464

and the contained commit

https://github.com/PowerDNS/pdns/commit/d5385b3570b0d8c13626dcb4cd8fe5fc344db16d#diff-ddb1bcfaa39977012e0eee48d311eac1e18d87c6bd5b59de7116337518a3fa40

This added instantiation of the backends before the process has called chroot()+ chdir() and dropped privileges, resulting in not finding the configured database file, because your configuration references it by a relative path.

I've opened https://github.com/PowerDNS/pdns/issues/10829
Comment 3 Sven Wegener gentoo-dev 2023-05-12 20:30:24 UTC
This should be fixed in the 4.7.x series.