Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-15 Thread Michael Chapman
On Fri, 16 Aug 2019, Uoti Urpala wrote: > On Thu, 2019-08-15 at 20:36 +1000, Michael Chapman wrote: > > With systemd 239 I was unable to cause an fd leak this way. > > > > Still, I would feel more comfortable if I could find a commit that > > definitely fixed the problem. All of these

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-15 Thread Uoti Urpala
On Thu, 2019-08-15 at 20:36 +1000, Michael Chapman wrote: > With systemd 239 I was unable to cause an fd leak this way. > > Still, I would feel more comfortable if I could find a commit that > definitely fixed the problem. All of these experiments are just > circumstantial evidence.

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-15 Thread Michael Chapman
On Thu, 15 Aug 2019, Lennart Poettering wrote: > On Mi, 14.08.19 22:36, Michael Chapman (m...@very.puzzling.org) wrote: > > > On Wed, 14 Aug 2019, Lennart Poettering wrote: > > > Well, a D-Bus connection can remain open indefinitely, and may even > > > have incomplete "half" messages queued in

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-15 Thread Lennart Poettering
On Mi, 14.08.19 22:36, Michael Chapman (m...@very.puzzling.org) wrote: > On Wed, 14 Aug 2019, Lennart Poettering wrote: > > Well, a D-Bus connection can remain open indefinitely, and may even > > have incomplete "half" messages queued in them as long as the client > > desires. After the initial

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-14 Thread Dave Howorth
On Wed, 14 Aug 2019 12:04:03 -0400 Brian Reichert wrote: > On Wed, Aug 14, 2019 at 04:19:46PM +0100, Simon McVittie wrote: > > On Wed, 14 Aug 2019 at 10:26:53 -0400, Brian Reichert wrote: > > Doesn't daemonize(1) make stdin, stdout and stderr point > > to /dev/null, instead of closing them? >

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-14 Thread Brian Reichert
On Wed, Aug 14, 2019 at 04:19:46PM +0100, Simon McVittie wrote: > On Wed, 14 Aug 2019 at 10:26:53 -0400, Brian Reichert wrote: > Doesn't daemonize(1) make stdin, stdout and stderr point to /dev/null, > instead of closing them? Looking at the source, yes, it does. > Expecting arbitrary

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-14 Thread Simon McVittie
On Wed, 14 Aug 2019 at 10:26:53 -0400, Brian Reichert wrote: > And, if I were to ever use daemonize(1), or any other other canonical > mechanism for daemonizing code, STDOUT would normally be closed > under those circumstances, as well. Doesn't daemonize(1) make stdin, stdout and stderr point to

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-14 Thread Lennart Poettering
On Mi, 14.08.19 10:26, Brian Reichert (reich...@numachi.com) wrote: > On Wed, Aug 14, 2019 at 11:34:21AM +0200, Lennart Poettering wrote: > > Hence: your code that closes fd1 like this is simply buggy. Don't do > > that, you are shooting yourself in the foot. > > Buggy or no, this is

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-14 Thread Brian Reichert
On Wed, Aug 14, 2019 at 11:34:21AM +0200, Lennart Poettering wrote: > Hence: your code that closes fd1 like this is simply buggy. Don't do > that, you are shooting yourself in the foot. Buggy or no, this is fifteen-year-old code, and prior cron/service mgmt framework implementations had no issue.

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-14 Thread Michael Chapman
On Wed, 14 Aug 2019, Lennart Poettering wrote: > Well, a D-Bus connection can remain open indefinitely, and may even > have incomplete "half" messages queued in them as long as the client > desires. After the initial authentication is done, clients may thus > take up resources as long as they

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-14 Thread Lennart Poettering
On Mi, 14.08.19 19:47, Michael Chapman (m...@very.puzzling.org) wrote: > On Wed, 14 Aug 2019, Lennart Poettering wrote: > > Quite frankly, invoking generic UNIX programs with fds < 3 closed is a > > really bad idea in general. That systemctl nowadays is particularly > > careful and deals with

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-14 Thread Michael Chapman
On Wed, 14 Aug 2019, Lennart Poettering wrote: > Quite frankly, invoking generic UNIX programs with fds < 3 closed is a > really bad idea in general. That systemctl nowadays is particularly > careful and deals with situations like that is not an invitation to > actually invoke things like this.

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-14 Thread Lennart Poettering
On Mi, 14.08.19 18:53, Michael Chapman (m...@very.puzzling.org) wrote: > On Wed, 14 Aug 2019, Michael Chapman wrote: > > On Wed, 14 Aug 2019, Brian Reichert wrote: > > > On Thu, Aug 01, 2019 at 07:18:20PM +, Zbigniew J??drzejewski-Szmek > > > wrote: > > > > Yes. (With the caveat that there

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-14 Thread Michael Chapman
On Wed, 14 Aug 2019, Michael Chapman wrote: > On Wed, 14 Aug 2019, Brian Reichert wrote: > > On Thu, Aug 01, 2019 at 07:18:20PM +, Zbigniew J??drzejewski-Szmek > > wrote: > > > Yes. (With the caveat that there *are* legitimate reasons to have new > > > long-lived fds created, so not every

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-14 Thread Michael Chapman
On Wed, 14 Aug 2019, Brian Reichert wrote: > On Thu, Aug 01, 2019 at 07:18:20PM +, Zbigniew J??drzejewski-Szmek wrote: > > Yes. (With the caveat that there *are* legitimate reasons to have new > > long-lived fds created, so not every long-lived fd is "wrong".) > > I finally was able to track

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-13 Thread Brian Reichert
On Thu, Aug 01, 2019 at 07:18:20PM +, Zbigniew J??drzejewski-Szmek wrote: > Yes. (With the caveat that there *are* legitimate reasons to have new > long-lived fds created, so not every long-lived fd is "wrong".) I finally was able to track down what's happening on my system. This is

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-01 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Aug 01, 2019 at 08:46:58AM -0400, Brian Reichert wrote: > On Thu, Aug 01, 2019 at 08:17:01AM +, Zbigniew J??drzejewski-Szmek wrote: > > The kernel will use the lower-numbered available fd, so there's lot of > > "reuse" of the same numbers happening. This strace means that between > >

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-01 Thread Brian Reichert
On Thu, Aug 01, 2019 at 08:17:01AM +, Zbigniew J??drzejewski-Szmek wrote: > The kernel will use the lower-numbered available fd, so there's lot of > "reuse" of the same numbers happening. This strace means that between > each of those close()s here, some other function call returned fd 19. >

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-08-01 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Jul 31, 2019 at 11:37:31AM -0400, Brian Reichert wrote: > On Wed, Jul 31, 2019 at 12:36:41AM +0300, Uoti Urpala wrote: > > On Tue, 2019-07-30 at 14:56 -0400, Brian Reichert wrote: > > > I see, between 13:49:30 and 13:50:01, I see 25 'successful' calls > > > for close(), e.g.: > > > > > >

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-07-31 Thread Brian Reichert
On Wed, Jul 31, 2019 at 12:36:41AM +0300, Uoti Urpala wrote: > On Tue, 2019-07-30 at 14:56 -0400, Brian Reichert wrote: > > I see, between 13:49:30 and 13:50:01, I see 25 'successful' calls > > for close(), e.g.: > > > > 13:50:01 close(19) = 0 > > > > Followed by

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-07-30 Thread Uoti Urpala
On Tue, 2019-07-30 at 14:56 -0400, Brian Reichert wrote: > I see, between 13:49:30 and 13:50:01, I see 25 'successful' calls > for close(), e.g.: > > 13:50:01 close(19) = 0 > > Followed by getsockopt(), and a received message on the supposedly-closed > file descriptor:

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-07-30 Thread Brian Reichert
On Thu, Jul 11, 2019 at 08:35:38PM +, Zbigniew J??drzejewski-Szmek wrote: > On Thu, Jul 11, 2019 at 10:08:43AM -0400, Brian Reichert wrote: > > Does that sound like expected behavior? > > No, this shouldn't happen. > > What I was trying to say, is that if you have the strace log, you > can

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-07-11 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jul 11, 2019 at 10:08:43AM -0400, Brian Reichert wrote: > On Wed, Jul 10, 2019 at 10:44:14PM +, Zbigniew J??drzejewski-Szmek wrote: > > That's ancient... 228 was released almost four years ago. > > That's the joy of using a commercial Linux distribution; they tend > to be conservative

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-07-11 Thread Brian Reichert
On Wed, Jul 10, 2019 at 10:44:14PM +, Zbigniew J??drzejewski-Szmek wrote: > That's ancient... 228 was released almost four years ago. That's the joy of using a commercial Linux distribution; they tend to be conservative about updates. SLES may very well have backported fixes to the packaged

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-07-10 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Jul 10, 2019 at 09:51:36AM -0400, Brian Reichert wrote: > On Wed, Jul 10, 2019 at 07:37:19AM +, Zbigniew J??drzejewski-Szmek wrote: > > > It's a bug report as any other. Writing a meaningful reply takes time > > and effort. Lack of time is a much better explanation than ressentiments.

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-07-10 Thread Brian Reichert
On Wed, Jul 10, 2019 at 07:37:19AM +, Zbigniew J??drzejewski-Szmek wrote: > It's a bug report as any other. Writing a meaningful reply takes time > and effort. Lack of time is a much better explanation than ressentiments. I wasn't expressing resentment; I apologize if it came off that way.

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-07-10 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Jul 02, 2019 at 09:57:44AM -0400, Brian Reichert wrote: > At $JOB, on some of our SLES12 boxes, our logs are getting swamped > with messages saying: > > "Too many concurrent connections, refusing" Please always specify the systemd version in use. We're not all SLES users, and even if

Re: [systemd-devel] systemd's connections to /run/systemd/private ?

2019-07-08 Thread Brian Reichert
On Tue, Jul 02, 2019 at 09:57:44AM -0400, Brian Reichert wrote: > At $JOB, on some of our SLES12 boxes, our logs are getting swamped > with messages saying: > > "Too many concurrent connections, refusing" > > It's hampering our ability to manage services, e.g.: > > # systemctl status ntpd >