Re: get_printer_list_db: Failed to open printer_list.tdb
Michael Tokarev via samba <[email protected]> Sat, 18 Apr 2026 09:37:51 +0300
| Newsgroups | gmane.network.samba.general,gmane.network.samba.internals |
|---|---|
| Message-ID | <[email protected]> |
[This question received 0 replies on samba list, adding Cc: samba-technical]
On 08.03.2026 08:26, Michael Tokarev via samba wrote:
> Hi!
>
> Sometimes, I'm seeing a lot of messages like this:
>
> Mar 07 22:40:32 rpcd_spoolss[199894]: [2026/03/07 22:40:32.239192, 0]
> source3/printing/printer_list.c:58(get_printer_list_db)
> Mar 07 22:40:32 rpcd_spoolss[199894]: get_printer_list_db: Failed to
> open printer_list.tdb
> Mar 07 23:40:46 rpcd_spoolss[200124]: [2026/03/07 23:40:46.123153, 0]
> source3/printing/printer_list.c:58(get_printer_list_db)
> Mar 07 23:40:46 rpcd_spoolss[200124]: get_printer_list_db: Failed to
> open printer_list.tdb
> [global]
> load printers = no
> printing = BSD
> printcap name = /dev/null
> print command = lpr -P%p -l -h -r %s
>
> [hp1020]
> printer = hp1020
> comment = HP LaserJet 1020
> printable = yes
> path = /var/tmp
>
> Samba version 4.23.5.
It has become worse. The above messages are generated every 0.1s:
Apr 17 00:00:00 panda rpcd_spoolss[2186]: [2026/04/17 00:00:00.292537,
0] source3/printing/printer_list.c:58(get_printer_list_db)
Apr 17 00:00:00 panda rpcd_spoolss[2186]: get_printer_list_db: Failed
to open printer_list.tdb
Apr 17 00:00:10 panda rpcd_spoolss[2186]: [2026/04/17 00:00:10.300551,
0] source3/printing/printer_list.c:58(get_printer_list_db)
Apr 17 00:00:10 panda rpcd_spoolss[2186]: get_printer_list_db: Failed
to open printer_list.tdb
Apr 17 00:00:20 panda rpcd_spoolss[2186]: [2026/04/17 00:00:20.320819,
0] source3/printing/printer_list.c:58(get_printer_list_db)
Apr 17 00:00:20 panda rpcd_spoolss[2186]: get_printer_list_db: Failed
to open printer_list.tdb
Apr 17 00:00:30 panda rpcd_spoolss[2186]: [2026/04/17 00:00:30.340662,
0] source3/printing/printer_list.c:58(get_printer_list_db)
Apr 17 00:00:30 panda rpcd_spoolss[2186]: get_printer_list_db: Failed
to open printer_list.tdb
.. and so on, for whole day.
so I finally catched it. Here's what's going on in strace:
...
epoll_create1(EPOLL_CLOEXEC) = 16
writev(22, [{iov_base=",\0", iov_len=2},
{iov_base="\5\0\0\3\20\0\0\0,\0\0\0\37\0\0\0\24\0\0\0\0\0\5\0\1\0\0\0\3230\317\254"...,
iov_len=44}], 2) = 46
epoll_ctl(16, EPOLL_CTL_ADD, 22, {events=EPOLLIN|EPOLLRDHUP,
data=0x56442fad94a0}) = 0
epoll_wait(16, [{events=EPOLLIN, data=0x56442fad94a0}], 1, 10000) = 1
readv(22, [{iov_base="0\0", iov_len=2}], 1) = 2
readv(22, [{iov_base="\5\0\2\3\20\0\0\0000\0\0\0\37\0\0\0", iov_len=16},
{iov_base="\30\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
iov_len=32}], 2) = 48
close(16) = 0
close(22) = 0
umask(000) = 000
mkdir("/run/samba", 0755) = -1 EEXIST (File exists)
umask(000) = 000
newfstatat(AT_FDCWD, "/run/samba", {st_mode=S_IFDIR|0755, st_size=500,
...}, AT_SYMLINK_NOFOLLOW) = 0
openat(AT_FDCWD, "/run/samba/printer_list.tdb",
O_RDWR|O_CREAT|O_CLOEXEC, 0644) = -1 EACCES (Permission denied)
newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644,
st_size=1535, ...}, 0) = 0
geteuid() = 1064
writev(3, [{iov_base="[2026/04/18 09:26:46.821290, 0]"..., iov_len=89},
{iov_base=" get_printer_list_db: Failed to"..., iov_len=66}], 2) = 155
getpid() = 40112
sendto(21, "<27>Apr 18 09:26:46 rpcd_spoolss"..., 130, MSG_NOSIGNAL,
NULL, 0) = 130
getpid() = 40112
sendto(21, "<27>Apr 18 09:26:46 rpcd_spoolss"..., 107, MSG_NOSIGNAL,
NULL, 0) = 107
fcntl(20, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=12124,
l_len=1}) = 0
fcntl(20, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=12124,
l_len=1}) = 0
fcntl(20, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=9868,
l_len=1}) = 0
fcntl(20, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=9868,
l_len=1}) = 0
fcntl(20, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=9868,
l_len=1}) = 0
fcntl(20, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=9868,
l_len=1}) = 0
openat(AT_FDCWD, "/run/samba/samba-bgqd.pid", O_RDONLY|O_NONBLOCK) = 16
read(16, "40117\n", 19) = 6
kill(40117, 0) = -1 EPERM (Operation not permitted)
fcntl(16, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=0,
l_len=1}) = -1 EAGAIN (Resource temporarily unavailable)
close(16) = 0
openat(AT_FDCWD, "/run/samba/msg.lock/40117", O_RDONLY|O_NONBLOCK) = 16
pread64(16, "10145467335826111398\n", 24, 0) = 21
close(16) = 0
socket(AF_UNIX, SOCK_DGRAM, 0) = 16
connect(16, {sa_family=AF_UNIX, sun_path="/run/samba/msg.sock/40117"},
110) = -1 EACCES (Permission denied)
close(16) = 0
geteuid() = 1064
getegid() = 1064
getgroups(0, NULL) = 7
getgroups(7, [100, 1064, 3004, 5001, 5003, 5004, 5006]) = 7
geteuid() = 1064
...
This is rpcd_spoolss, running as a user (uid=1064), doing things as
user which aren't supposed to be run as user.
It looks like the whole thing here is quite broken. It does many
strange things - like constantly poking /root/.krb5/config &
/etc/hx509.conf, constantly creating and destroying epool fd,
and some more.
But the most important is that it does the creation of a global
printer_list.db as user, not as root.
For now, in order to keep our systems a bit saner, I replaced
contents of get_printer_list_db() with "return NULL" - since
this file is never created anyway, and it has always been that
way, it looks like. I wonder if I can do the same for debian,
to avoid having two builds (one local one debian), - and if yes,
maybe I can remove whole lot of other code which run this
function.
But this function should not be run as often (every 0.1s).
Thanks,
/mjt
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba