[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-03-25 Thread Eugene Crosser
I confirm that with libc6 version 2.33-0ubuntu4 installed, postfix works
again.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-03-25 Thread Launchpad Bug Tracker
This bug was fixed in the package glibc - 2.33-0ubuntu4

---
glibc (2.33-0ubuntu4) hirsute; urgency=medium

  [ Matthias Klose ]
  * Run checks for every pass before failing the build.
  * Regenerate the control file.

  [ Balint Reczey ]
  * XFAIL new tests not setting up their container properly
  * Add Breaks: against fakeroot (<< 1.25.3-1.1ubuntu2~) (LP: #1915250)
  * debian/patches/git-updates.diff: update from upstream stable branch
(LP: #1916541)
  * debian/tests/rebuild: Print cpuinfo to help triaging CPU-specific failures

 -- Balint Reczey   Thu, 11 Mar 2021 17:29:21 +0100

** Changed in: glibc (Ubuntu Hirsute)
   Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-03-11 Thread Bug Watch Updater
Launchpad has imported 7 comments from the remote bug at
https://sourceware.org/bugzilla/show_bug.cgi?id=27389.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.


On 2021-02-10T08:19:18+00:00 Sjon-8 wrote:

I have an issue that I suspect is caused by a recent glibc change, but I
haven't 100% ruled out another cause, so this report might be bogus.

I use PHP-FPM [1] with chroots enabled. Since upgrading glibc, name
resolving (via DNS) fails with "getaddrinfo failed: System error" in my
chroot and I'm pretty sure it is caused by the recently added "Block
attempts to dlopen any module we haven't already opened" [2]

What seems to happen is that the PHP-FPM master process only loads
libnss_files.so.2 and libnss_systemd.so.2 because it uses that to
resolve the username (it matches nsswitch which contains: "passwd: files
systemd")

If any of the FPM workers then attempts to perform dns resolving, that
fails because libnss_dns.so.2 has not been loaded yet (even though I
made it available in the chroot), and due to the recent change, it won't
be loaded either.

I have confirmed I can "fix" it by forcing the fpm master to load the
dns module by modifying nsswitch.conf outside of the chroot to contains
"passwd: dns files systemd", this fixes it

1. https://www.php.net/manual/en/install.fpm.php
2. 
https://github.com/bminor/glibc/commit/429029a73ec2dba7f808f69ec8b9e3d84e13e804#diff-9305f1992144bc8c923a840d44827642f1c3f57e3df85a69357fff2fe7370fb8R352

Reply at:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/comments/0


On 2021-02-10T08:41:14+00:00 Sjon-8 wrote:

Some more information for clarification:

# grep dns /etc/nsswitch
hosts: files dns

# strace -eopenat -f /usr/bin/php-fpm --nodaemonize --fpm-config 
/etc/php/php-fpm.conf 2>&1|grep nss
openat(AT_FDCWD, "/etc/ssl/openssl.cnf", O_RDONLY) = 3
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 22
openat(AT_FDCWD, "/usr/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 22
openat(AT_FDCWD, "/usr/lib/libnss_systemd.so.2", O_RDONLY|O_CLOEXEC) = 22

# curl https://localhost/test.php
getaddrinfo failed: System error

--

# grep dns /etc/nsswitch
passwd: dns files systemd
hosts: files dns

# strace -eopenat -f /usr/bin/php-fpm --nodaemonize --fpm-config 
/etc/php/php-fpm.conf 2>&1|grep nss
openat(AT_FDCWD, "/etc/ssl/openssl.cnf", O_RDONLY) = 3
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 22
openat(AT_FDCWD, "/usr/lib/libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = 22
openat(AT_FDCWD, "/usr/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 22
openat(AT_FDCWD, "/usr/lib/libnss_systemd.so.2", O_RDONLY|O_CLOEXEC) = 22

# curl https://localhost/test.php
works

Reply at:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/comments/1


On 2021-02-16T12:45:06+00:00 Florian Weimer wrote:

I've started a discussion on libc-alpha:

NSS chroot protection
https://sourceware.org/pipermail/libc-alpha/2021-February/122714.html

Reply at:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/comments/2


On 2021-02-16T14:47:04+00:00 Howard Chu wrote:

(In reply to Florian Weimer from comment #2)
> I've started a discussion on libc-alpha:
> 
> NSS chroot protection
> https://sourceware.org/pipermail/libc-alpha/2021-February/122714.html

Can you link to more context on what security regressions this change
was meant to address? chrooted servers have been running for decades
using the NSS databases of the chroot jail, and this change breaks all
of them.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/comments/3


On 2021-02-16T14:50:52+00:00 Florian Weimer wrote:

It's CVE-2019-14271:

https://nvd.nist.gov/vuln/detail/CVE-2019-14271

(The Docker fix is likely incomplete depending on nsswitch.conf
contents.)

That issue is of no concern once the service is running, it applies to
the construction of the chroot contents from the outside.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/comments/4


On 2021-03-04T11:46:50+00:00 Florian Weimer wrote:

Fixed for 2.34.  Also backported to 2.33.

commit 58673149f37389495c098421085ffdb468b3f7ad
Author: DJ Delorie 
Date:   Thu Feb 18 15:26:30 2021 -0500

nss: Re-enable NSS module loading after chroot [BZ #27389]

The glibc 2.33 release enabled /etc/nsswitch.conf reloading,
and to prevent potential security issues like CVE-2019-14271
the re-lo

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-03-11 Thread Brian Murray
** Also affects: glibc (Ubuntu Hirsute)
   Importance: High
 Assignee: Balint Reczey (rbalint)
   Status: In Progress

** Also affects: postfix (Ubuntu Hirsute)
   Importance: High
   Status: Invalid

** Tags removed: rls-hh-incoming

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-03-11 Thread Matthieu Clemenceau
** Tags added: fr-1202

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-03-11 Thread Balint Reczey
Thanks, I'll upload the backported fix to Hirsute soon.

** Changed in: postfix (Ubuntu)
   Status: Confirmed => In Progress

** Changed in: postfix (Ubuntu)
   Status: In Progress => Confirmed

** Changed in: postfix (Ubuntu)
   Status: Confirmed => Invalid

** Changed in: glibc (Ubuntu)
   Status: Confirmed => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-03-11 Thread Balint Reczey
** Changed in: glibc (Ubuntu)
 Assignee: (unassigned) => Balint Reczey (rbalint)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-03-11 Thread Paride Legovini
Comment #5 of the upstream bug report [1] says this is

  Fixed for 2.34.  Also backported to 2.33.

The backport commit for 2.33 is [2].

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=27389#c5
[2] 
https://sourceware.org/git/?p=glibc.git;a=commit;h=3e880d733753183696d1a81c34caef3a9add2b0c

** Tags added: rls-hh-incoming

** Changed in: glibc (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-03-11 Thread Paride Legovini
** Also affects: glibc via
   https://sourceware.org/bugzilla/show_bug.cgi?id=27389
   Importance: Unknown
   Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-03-10 Thread Max Bowsher
I've just been bitten by this.

It seems this was broken by
https://sourceware.org/git/?p=glibc.git;a=commit;h=429029a73ec2dba7f808f69ec8b9e3d84e13e804

and it has recently been realised that was a bad idea:
https://sourceware.org/git/?p=glibc.git;a=commit;h=58673149f37389495c098421085ffdb468b3f7ad

https://sourceware.org/bugzilla/show_bug.cgi?id=27389

It looks like hirsute is going to need a backport of this

** Bug watch added: Sourceware.org Bugzilla #27389
   https://sourceware.org/bugzilla/show_bug.cgi?id=27389

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-03-10 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: glibc (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-02-26 Thread Christian Ehrhardt 
** Tags added: server-next

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-02-25 Thread Eugene Crosser
Thanks Paride,
I am glad that you could reproduce it, and it's not like either I or my system 
is crazy :)

I noticed something that may or may not be relevant. I have another
machine with hirsute, that was purchased a year+ ago and has undergone
less package upgrades: mail delivery _worked_ there. I did _not_
reconfigure it as "satellite" and I don't remember how it was configured
at the start, probably as all default.

The difference that I noticed is that the contents of
/var/spool/postfix/usr/lib (as filled by posttix's startup procedure) is
significantly different. One wild speculation would be that some shared
lib there is opportunistically loaded that refers to an earlier glibc
version, and that subsequently somehow results in impossibility to load
nss libraries.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-02-25 Thread Paride Legovini
Note: the very same steps in a ubuntu:focal VM do not lead to the same
issue.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-02-25 Thread Paride Legovini
Hi Eugene,

I could reproduce the issue from a clean Hirsute VM. Steps:

1. lxc launch ubuntu-daily:hirsute paride-h-vm --vm
2. lxc exec paride-h-vm bash
3. apt update
4. apt full-upgrade
5. apt install postfix
   # Debconf config as: Satellite system.
   # All the rest left with default values
6. apt install bsd-mailx
7. echo x | mailx par...@ubuntu.com
8. mailq. Check the "unknown mail transport error":

-Queue ID-  --Size-- Arrival Time -Sender/Recipient---
3D4CB3F4DB  370 Thu Feb 25 13:52:53  r...@paride-h-vm.lxd
(unknown mail transport error)
 par...@ubuntu.com


9. cat /var/log/mail.log. There it is:

Feb 25 13:52:53 paride-h-vm postfix/smtp[10307]: fatal: unknown service:
smtp/tcp

I'm not sure if this should be considered a postfix bug or a glibc bug
at this point. If this is a regression caused by a recent glibc upload
then other packages may be affected, and action should be taken on that
side.

I'm adding a "glibc" task to get attention from the glibc maintainers,
and raising the importance of this bug. Thanks a lot for sharing all the
details of your debugging work!

** Changed in: postfix (Ubuntu)
   Status: Incomplete => Confirmed

** Changed in: postfix (Ubuntu)
   Importance: Undecided => Critical

** Changed in: postfix (Ubuntu)
   Importance: Critical => High

** Also affects: glibc (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-02-24 Thread Eugene Crosser
Hello @sergiodj,

> Could you perhaps provide the configuration files you used to do that?

My complete configuration is included in the tar attached to this
ticket.

> please make sure that your Hirsute system is up-to-date

Yes, updated daily, _plus_ by hand right before the investigation.
Note the that problem (quite certainly) _was triggered by an update_ of the 
libc package.

Perhaps worth to mention, my systems are being upgraded between distro
versions, not fresh-installed.

In the meanwhile, I did more investigation.  First, I checked that the
problem is, as I suspected, connected to running `getservbyname()` under
chroot. When I change smtp line in `master.cf` to not run under chroot,
i.e.

smtp  unix  -   -   y   -   -   smtp

is changed to

smtp  unix  -   -   n   -   -   smtp

MAIL DELIVERY STARTS TO WORK!

So at least I have a workaround now. But the problem still stands.

Now here is something interesting: strace of the `smtp` process when it
is run under chroot and without chroot:

= under chroot =
[pid 224329] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 14
[pid 224329] connect(14, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 
110) = -1 ENOENT (No such file or directory)
[pid 224329] close(14)  = 0
[pid 224329] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 14
[pid 224329] connect(14, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 
110) = -1 ENOENT (No such file or directory)
[pid 224329] close(14)  = 0
[pid 224329] newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, 
st_size=699, ...}, 0) = 0
[pid 224329] newfstatat(AT_FDCWD, "/", {st_mode=S_IFDIR|0755, st_size=4096, 
...}, 0) = 0
[pid 224329] getpid()   = 224329
[pid 224329] sendto(7, "<18>Feb 24 20:48:11 postfix/smtp"..., 92, MSG_NOSIGNAL, 
NULL, 0) = 92


(the last line is the error message about "smtp"/"tcp" service. No
attempt to load any nsswitch modules!)

 no chroot 
[pid 224736] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 14
[pid 224736] connect(14, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 
110) = -1 ENOENT (No such file or directory)
[pid 224736] close(14)  = 0
[pid 224736] socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 14
[pid 224736] connect(14, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 
110) = -1 ENOENT (No such file or directory)
[pid 224736] close(14)  = 0
[pid 224736] newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, 
st_size=699, ...}, 0) = 0
[pid 224736] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 14
[pid 224736] newfstatat(14, "", {st_mode=S_IFREG|0644, st_size=177082, ...}, 
AT_EMPTY_PATH) = 0
[pid 224736] mmap(NULL, 177082, PROT_READ, MAP_PRIVATE, 14, 0) = 0x7f35ad92
[pid 224736] close(14)  = 0
[pid 224736] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or 
directory)
[pid 224736] openat(AT_FDCWD, 
"/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v2/libnss_db.so.2", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 224736] newfstatat(AT_FDCWD, 
"/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v2", 0x7ffc010b03a0, 0) = -1 ENOENT 
(No such file or directory)
[pid 224736] openat(AT_FDCWD, 
"/lib/x86_64-linux-gnu/tls/x86_64/x86_64/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = 
-1 ENOENT (No such file or directory)
[pid 224736] newfstatat(AT_FDCWD, "/lib/x86_64-linux-gnu/tls/x86_64/x86_64", 
0x7ffc010b03a0, 0) = -1 ENOENT (No such file or directory)

... many more lines from internal `dlopen()` ...

[pid 224736] openat(AT_FDCWD, "/etc/services", O_RDONLY|O_CLOEXEC) = 14
[pid 224736] newfstatat(14, "", {st_mode=S_IFREG|0644, st_size=12966, ...}, 
AT_EMPTY_PATH) = 0
[pid 224736] lseek(14, 0, SEEK_SET) = 0
[pid 224736] read(14, "# Network services, Internet sty"..., 4096) = 4096
[pid 224736] close(14)


So it looks like for some reason, dlopen() decided that it cannot /
should not try to load shared libraries, thus preventing nsswitch
operation. Perhaps `ldopen()` the new version of libc is more sensitive
to some file permissions, or absence of some files in the "fake root"
than the previous?

In any case, the problem is very likely in some peculiarity of dlopen in
the new libc.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-02-24 Thread Sergio Durigan Junior
Thanks for providing more information.

Unfortunately, I still cannot reproduce the problem.  This time I tried
using a Hirsute VM instead of a container, but everything worked as
expected.  I was able to send an email from inside the VM, the email
went through without problems, and I received it successfully.

You mentioned that you experience the issue even if you configure
postfix to act as a satellite system.  Could you perhaps provide the
configuration files you used to do that?  I did the same here, and I
think it is unlikely that the problem is in some configuration file, but
hey, here goes nothing...

Also, and I apologize if you have already done this, but please make
sure that your Hirsute system is up-to-date.  I'm using a completely up-
to-date Hirsute VM with absolutely nothing extra installed except
postfix and sasl2-bin.

Thanks.

** Changed in: postfix (Ubuntu)
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-02-23 Thread Eugene Crosser
I did some more investigation, and did not find an explanation, but I am
writing it here to maybe save somebody else some effort.

Postfix uses normal(?) `getservbyname(service, protocol)` in the file
src/smtp/smtp_connect.c line 363:

if ((sp = getservbyname(service, protocol)) == 0)
msg_fatal("unknown service: %s/%s", service, protocol);

and I see this message in the log.

On the other hand, a simple program that performs
`chroot("/var/spool/postfix")` and calls `getservbyname()` _works
correctly_ on hirsute (C code in attachment):

crosser@pccross:~/src$ sudo ./getsrvname 
[sudo] password for crosser: 
s_name="smtp", s_port=25, s_proto="tcp"

Note though that in such form the the program does not try to use NSS,
it just opens `/etc/services` directly. While postfix's `smtp` goes
through nsswitch, as can be seen in the strace log from my previous
attachment.

** Attachment added: "getsrvname.c"
   
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/+attachment/5466343/+files/getsrvname.c

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-02-23 Thread Eugene Crosser
** Changed in: postfix (Ubuntu)
   Status: Incomplete => New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-02-23 Thread Eugene Crosser
Hello @lucaskanashiro,

it may work differently in a container because the problem may be
triggered by a combination of libc components and possibly the kernel
(only a speculation). I can reproduce the problem on another hirsute
machine, postfix was never used there. I `dpkg-reconfigure`d it as a
"satellite system" and sent an email. Sure enough, it got stuck in the
queue the same way:

crosser@journey:~$ mailq
-Queue ID-  --Size-- Arrival Time -Sender/Recipient---
6712B36270B 422 Tue Feb 23 21:36:05  cros...@journey.average.org
(unknown mail transport error)
 cros...@average.org

-- 0 Kbytes in 1 Request.

I am attaching all relevant files.

> not enough information in your report to begin triage or to
differentiate between a local configuration problem and a bug in Ubuntu

Well, nothing in the local configuration changed between Feb 20 when
delivery worked and Feb 21 when it stopped to work...

> provide a more complete description of the problem
The most complete I could provide short of recompiling postfix and adding debug 
printouts was that strace looks like libc's `getservbyname()` returned failure 
when it was called from a chrooted process, without trying to access 
`/etc/services` or even opening `/etc/nsswitch.conf` (but checked `stat` of the 
latter, which was successful).

> explain why you believe this is a bug in Ubuntu rather than a problem 
> specific to your
system

As I explained in my first report (and another time above), there were
no local changes (other than package upgrades) between the moment
deliver worked and the moment after which it stopped working.

?field.comment=Hello @lucaskanashiro,

it may work differently in a container because the problem may be
triggered by a combination of libc components and possibly the kernel
(only a speculation). I can reproduce the problem on another hirsute
machine, postfix was never used there. I `dpkg-reconfigure`d it as a
"satellite system" and sent an email. Sure enough, it got stuck in the
queue the same way:

crosser@journey:~$ mailq
-Queue ID-  --Size-- Arrival Time -Sender/Recipient---
6712B36270B 422 Tue Feb 23 21:36:05  cros...@journey.average.org
(unknown mail transport error)
 cros...@average.org

-- 0 Kbytes in 1 Request.

I am attaching all relevant files.

> not enough information in your report to begin triage or to
differentiate between a local configuration problem and a bug in Ubuntu

Well, nothing in the local configuration changed between Feb 20 when
delivery worked and Feb 21 when it stopped to work...

> provide a more complete description of the problem
The most complete I could provide short of recompiling postfix and adding debug 
printouts was that strace looks like libc's `getservbyname()` returned failure 
when it was called from a chrooted process, without trying to access 
`/etc/services` or even opening `/etc/nsswitch.conf` (but checked `stat` of the 
latter, which was successful).

> explain why you believe this is a bug in Ubuntu rather than a problem 
> specific to your
system

As I explained in my first report (and another time above), there were
no local changes (other than package upgrades) between the moment
deliver worked and the moment after which it stopped working.


** Attachment added: "tar contains compressed /etc/postfix, mail.log, smtp 
process strace etc."
   
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/+attachment/5466342/+files/postfix-debug-data.tar

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1916541] Re: smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

2021-02-23 Thread Lucas Kanashiro
Thank you for taking the time to file a bug report.

I tried to reproduce your bug in a Ubuntu Hirsute container without
success. Moreover, I looked for an upstream bug report about any
incompatibility with glibc 2.33 but found nothing. Could you please
share your postfix config file to help us understand what is going on
here?

Since there is not enough information in your report to begin triage or to
differentiate between a local configuration problem and a bug in Ubuntu, I
am marking this bug as "Incomplete". We would be grateful if you would:
provide a more complete description of the problem, explain why you
believe this is a bug in Ubuntu rather than a problem specific to your
system, and then change the bug status back to "New".

For local configuration issues, you can find assistance here:
http://www.ubuntu.com/support/community

** Changed in: postfix (Ubuntu)
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs