#2312 Fails to start in interactive mode when stdin isn't a pts device
Closed: Fixed None Opened 10 years ago by stgraber.

In Debian and Ubuntu, when using upstart, it's usually recommended to start services in foreground mode to skip some extra forks and to better track the pid of the service.

However when doing that, upstart executes the command with stdin being /dev/null which makes sssd exit as it's getting EOF from stdin in its handler. We tried an alternative of using /dev/zero which didn't make it exit but instead use 100% of CPU as it was reading zeros from its stdin. In the end we ended up redirecting stdin to stdout which happens to be a pts device making sssd happy and everything working as expected.

What's the use case for actually sending information to sssd through stdin and would it be a problem to have sssd keep running after it gets EOF? If so, could /dev/null maybe be special cased?


Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.11.6
rhbz: => 0

As Sumit proposed, we should just close stdin.

owner: somebody => preichl

This problem occurs also in container without tty.

[sssd] [server_stdin_handler] (0x0020): sssd: EOF on stdin - terminating

owner: preichl => lslebodn

Fields changed

patch: 0 => 1
status: new => assigned

Replying to [comment:2 jhrozek]:

As Sumit proposed, we should just close stdin.

+1

resolution: => fixed
status: assigned => closed

Metadata Update from @stgraber:
- Issue assigned to lslebodn
- Issue set to the milestone: SSSD 1.11.6

7 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/3354

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata