Bug 92430 - systemd-tty-ask-password-agent hangs when starting services
Summary: systemd-tty-ask-password-agent hangs when starting services
Status: RESOLVED WONTFIX
Alias: None
Product: system-tools-backends
Classification: Unclassified
Component: init (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Carlos Garnacho Parro
QA Contact: Carlos Garnacho Parro
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-11 15:16 UTC by poluduh
Modified: 2018-06-29 19:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description poluduh 2015-10-11 15:16:09 UTC
hello

please help, in my debian 8 this services don't wanna start anymore:
postfix,mysql,redis

some strange things with permission denied and i don't know how to debug it:

# systemctl status mysql.service
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled)
   Active: activating (start-post) (Result: exit-code) since Вс 2015-10-11 16:57:29 MSK; 1min 54s ago
  Process: 18410 ExecStart=/usr/bin/mysqld_safe (code=exited, status=203/EXEC)
  Process: 18406 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 18410 (code=exited, status=203/EXEC);         : 18411 (mysql-systemd-s)
   CGroup: /system.slice/mysql.service
           └─control
             ├─18411 /bin/bash /usr/share/mysql/mysql-systemd-start post
             └─18754 sleep 1

окт 11 16:57:29 fs.annett systemd[18410]: Failed at step EXEC spawning /usr/bin/mysqld_safe: Permission denied
окт 11 16:57:29 fs.annett systemd[1]: mysql.service: main process exited, code=exited, status=203/EXEC

root@fs:/etc/init.d# journalctl -xn
-- Logs begin at Сб 2015-10-10 21:58:00 MSK, end at Вс 2015-10-11 16:58:11 MSK. --
окт 11 16:56:20 fs.annett postfix/local[18165]: 7B5A31355: to=<root@fs.annett>, orig_to=<root>, relay=local, delay=24439, delays=24439/0.07/0/0.03, dsn=4.3.0, status=deferred (temporary failur
окт 11 16:57:29 fs.annett systemd[1]: mysql.service start-post operation timed out. Stopping.
окт 11 16:57:29 fs.annett systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit error mysql.service
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--.
-- Произошел сбой юнита mysql.service.
--.
-- Результат: failed.
окт 11 16:57:29 fs.annett systemd[1]: Unit mysql.service entered failed state.
окт 11 16:57:29 fs.annett systemd[18410]: Failed at step EXEC spawning /usr/bin/mysqld_safe: Permission denied
-- Subject: Не удалось запустить процесс /usr/bin/mysqld_safe
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--.
-- Error: can't start process /usr/bin/mysqld_safe.
--.
-- Error code: 13.
окт 11 16:57:29 fs.annett systemd[1]: mysql.service: main process exited, code=exited, status=203/EXEC



# strace -f -e execve ./postfix start
execve("./postfix", ["./postfix", "start"], [/* 31 vars */]) = 0
Process 32289 attached
[pid 32289] execve("/bin/run-parts", ["run-parts", "--lsbsysinit", "--list", "/lib/lsb/init-functions.d"], [/* 31 vars */]) = 0
[pid 32289] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=32289, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
Process 32290 attached
[pid 32290] execve("/bin/readlink", ["readlink", "-f", "./postfix"], [/* 31 vars */]) = 0
[pid 32290] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=32290, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
Process 32291 attached
[pid 32291] execve("/bin/systemctl", ["systemctl", "-p", "CanReload", "show", "postfix.service"], [/* 31 vars */]) = 0
[pid 32291] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=32291, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
Process 32292 attached
[pid 32292] execve("/bin/systemctl", ["systemctl", "-p", "LoadState", "show", "postfix.service"], [/* 31 vars */]) = 0
[pid 32292] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=32292, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
Process 32293 attached
[pid 32293] execve("/usr/bin/tput", ["/usr/bin/tput", "hpa", "60"], [/* 31 vars */]) = 0
[pid 32293] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=32293, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
Process 32294 attached
[pid 32294] execve("/usr/bin/tput", ["/usr/bin/tput", "setaf", "1"], [/* 31 vars */]) = 0
[pid 32294] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=32294, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
[....] Starting postfix (via systemctl): postfix.serviceProcess 32295 attached
[pid 32295] execve("/bin/systemctl", ["/bin/systemctl", "start", "postfix.service"], [/* 31 vars */]) = 0
Process 32296 attached
[pid 32296] execve("/bin/systemd-tty-ask-password-agent", ["/bin/systemd-tty-ask-password-ag"..., "--watch"], [/* 31 vars */]) = 0
^CProcess 32288 detached
Process 32295 detached
Process 32296 detached

freeze at "/bin/systemd-tty-ask-password-agent"


also postfix has this in mail logs: fatal: execl /bin/sh: Permission denied

# ll /bin/sh /bin/dash
-rwxr-xr-x 1 root root 125400 ноя  8  2014 /bin/dash
lrwxrwxrwx 1 root root      4 ноя  8  2014 /bin/sh -> dash


any ideas what to do?
Comment 1 Kamil Dudka 2017-03-21 12:58:49 UTC
Any progress on this bug?

I am experiencing long delays while running "systemctl restart httpd" on Fedora 26.  The command does not print any diagnostic.  If I look at the the process tree I can see that '/usr/bin/systemd-tty-ask-password-agent --watch' hangs as long as the command hangs.  After 1-2 minutes the command finishes successfully.

Is there any way to debug the cause of the hanging?
Comment 2 niknah 2017-04-03 02:12:36 UTC
I have this problem when I'm trying to mount a fusecompress drive during start up.  
The drive mounts and it gets to the end of the script.
But systemd starts up systemd-tty-ask-password-agent and times out.
The drive mounts ok as root in a normal shell.
Comment 3 poluduh 2017-04-03 03:20:07 UTC
i've fixed this bug it was about some lib
ldd permissions fix that
Comment 4 poluduh 2017-04-03 03:20:45 UTC
(In reply to Kamil Dudka from comment #1)
> Any progress on this bug?

yes it's done
Comment 5 Kenyon Ralph 2018-05-16 21:45:29 UTC
(In reply to Kamil Dudka from comment #1)
> Any progress on this bug?
> 
> I am experiencing long delays while running "systemctl restart httpd" on
> Fedora 26.  The command does not print any diagnostic.  If I look at the the
> process tree I can see that '/usr/bin/systemd-tty-ask-password-agent
> --watch' hangs as long as the command hangs.  After 1-2 minutes the command
> finishes successfully.
> 
> Is there any way to debug the cause of the hanging?

That problem is likely due to broken DNS servers. Apache tries to determine its hostname from nameservers listed in /etc/resolv.conf. If the nameservers there take a long time to time out, httpd startup could take longer than the default systemd timeout of 90 seconds, so systemd then thinks httpd hung and kills it. In this case, fixing your DNS configuration should allow httpd to start quickly.
Comment 6 Adam Jackson 2018-06-29 19:59:38 UTC
Project has been inactive for seven years, none of this is getting fixed. Closing remaining bugs and disabling the bz product.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.