php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76835 FPM stuck at getrandom()
Submitted: 2018-09-02 07:25 UTC Modified: 2018-09-02 11:00 UTC
From: olafvdspek at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: FPM related
PHP Version: 7.2.9 OS: Debian
Private report: No CVE-ID: None
 [2018-09-02 07:25 UTC] olafvdspek at gmail dot com
Description:
------------
Debian is running in a VM.
At boot, it tries to start php-fpm via systemd. After a minute or so, it times out as php-fpm seems stuck at a getrandom() call.



Actual result:
--------------
# strace -p 383
strace: Process 383 attached
getrandom(0x7ffd606d51f0, 16, 0)        = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=1, si_uid=0} ---
+++ killed by SIGTERM +++

# service php7.2-fpm status
‚óŹ php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Sun 2018-09-02 09:22:00 CEST; 2min 28s ago
     Docs: man:php-fpm7.2(8)
  Process: 383 ExecStart=/usr/sbin/php-fpm7.2 --nodaemonize --fpm-config /etc/php/7.2/fpm/php-fpm.conf (code=killed, signal=TERM)
 Main PID: 383 (code=killed, signal=TERM)

Sep 02 09:20:29 debian systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
Sep 02 09:22:00 debian systemd[1]: php7.2-fpm.service: Start operation timed out. Terminating.
Sep 02 09:22:00 debian systemd[1]: php7.2-fpm.service: Failed with result 'timeout'.
Sep 02 09:22:00 debian systemd[1]: Failed to start The PHP 7.2 FastCGI Process Manager.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-02 08:52 UTC] spam2 at rhsoft dot net
it's not a bug when you missed to setup your VM proper so that it don't run out of random


install "haveged" and consider what such a setup has for impact on encryption

i recommend replace every certificate generated on that machine, especial ECC is sensible for broken setups
 [2018-09-02 11:00 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2018-09-02 11:00 UTC] cmb@php.net
Indeed, if a system fails to get 16 random bytes, that doesn't
look like a bug in PHP.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri May 24 03:01:26 2019 UTC