NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rc.d problem



On Fri, Jan 18, 2019 at 11:30:18AM +0000, Stephen Borrill wrote:

> > > > After some 8.0-STABLE upgrades all my NetBSD boxes have problem
> > > > with rc.d scripts. They are definitely working, but when script
> > > > have to wait for a process it contantly prints that:
> > > > 
> > > > [root@almaz src]$ /etc/rc.d/php_fpm restart
> > > > Stopping php_fpm.
> > > > usage: sleep seconds
> > > 
> > > Can you try "sh -x /etc/rc.d/php_fpm restart" and log the output?
> 
> Try the following instead:
> sh -x /etc/rc.d/php_fpm stop

Here it is:

[root@almaz src]$ sh -x /etc/rc.d/php_fpm stop
+ . /etc/rc.subr
+ ':' 'rc.conf(5)'
+ ':' 5660
+ export RC_PID
+ nl='
'
+ _env_clear_rc_vars='
RC_PID=
_rc_pid=
_rc_original_stdout_fd=
_rc_original_stderr_fd=
_rc_postprocessor_fd=
'
+ _rc_subr_loaded=':'
+ name=php_fpm
+ rcvar=php_fpm
+ command=/usr/pkg/sbin/php-fpm
+ required_files=/usr/pkg/etc/php-fpm.conf
+ pidfile=/var/run/php-fpm.pid
+ sig_reload=USR2
+ extra_commands=reload
+ load_rc_config php_fpm
+ _command=php_fpm
+ '[' -z php_fpm ']'
+ false
+ . /etc/rc.conf
+ '[' -r /etc/defaults/rc.conf ']'
+ . /etc/defaults/rc.conf
+ /sbin/sysctl -n kern.boothowto 2>/dev/null
+ '[' 0 '!=' 0 ']'
+ echo false
+ command echo false
+ rc_silent=false
+ rc_silent_cmd=twiddle
+ rc_rcorder_flags=''
+ rc_directories=/etc/rc.d
+ do_rcshutdown=YES
+ rcshutdown_rcorder_flags=''
+ rcshutdown_timeout=''
+ hostname=''
+ defaultroute=''
+ defaultroute6=''
+ domainname=''
+ critical_filesystems_local='OPTIONAL:/var'
+ critical_filesystems_remote='OPTIONAL:/usr'
+ no_swap=NO
+ swapoff=YES
+ ccd=YES
+ raidframe=YES
+ cgd=YES
+ lvm=NO
+ savecore=YES savecore_flags=-z
+ savecore_dir=/var/crash
+ resize_root=NO
+ per_user_tmp=NO
+ per_user_tmp_dir=/private/tmp
+ clear_tmp=YES
+ update_motd=YES
+ dmesg=YES dmesg_flags=''
+ accounting=NO
+ newsyslog=NO newsyslog_flags=''
+ quota=YES
+ ldconfig=YES
+ sysdb=YES
+ rndctl=NO rndctl_flags=''
+ gpio=NO
+ modules=YES
+ rtclocaltime=NO
+ fsck_flags=-p
+ securelevel=''
+ ifconfig_wait_dad_flags='-w 15 -W 5'
+ mdnsd=NO
+ npf=NO
+ npfd=NO
+ ipfilter=NO ipfilter_flags=''
+ ipnat=NO
+ ipfs=NO ipfs_flags=''
+ ipsec=NO
+ ipmon=NO ipmon_flags=-Dns
+ pf=NO pf_rules=/etc/pf.conf pf_flags=''
+ pflogd=NO
+ ftp_proxy=NO
+ racoon=NO
+ auto_ifconfig=YES
+ net_interfaces=''
+ flushroutes=YES
+ dhcpcd=NO
+ dhcpcd_flags=-qM
+ dhclient=NO
+ dhclient_flags=''
+ ntpdate=NO ntpdate_flags='-b -s'
+ ppp=YES ppp_peers=''
+ ip6mode=host
+ ip6uniquelocal=NO
+ ifwatchd=NO
+ ifwatchd_flags='-u /etc/ppp/ip-up -d /etc/ppp/ip-down pppoe0'
+ altqd=NO altqd_flags=''
+ inetd=YES inetd_flags=-l
+ identd=NO identd_flags='-b -l -u nobody'
+ rpcbind=NO rpcbind_flags=-l
+ syslogd=YES syslogd_flags=-s
+ cron=YES
+ named=NO named_flags=''
+ timed=NO timed_flags=''
+ ntpd=NO ntpd_flags=''
+ postfix=YES
+ lpd=NO lpd_flags=-s
+ sshd=NO sshd_flags=''
+ ssh_keygen_flags=''
+ ftpd=NO ftpd_flags=-ll
+ httpd=NO httpd_flags=''
+ httpd_wwwdir=/var/www
+ httpd_wwwuser=_httpd
+ routed=NO routed_flags=-q
+ gated=NO
+ mrouted=NO mrouted_flags=''
+ route6d=NO route6d_flags=''
+ ldpd=NO
+ rarpd=NO rarpd_flags=-a
+ bootparamd=NO bootparamd_flags=''
+ dhcpd=NO dhcpd_flags=-q
+ dhcrelay=NO dhcrelay_flags=''
+ rbootd=NO rbootd_flags=''
+ mopd=NO mopd_flags=-a
+ ndbootd=NO ndbootd_flags='-s /tftpboot /tftpboot/bootyy'
+ rtadvd=NO rtadvd_flags=''
+ isibootd=NO isibootd_flags=''
+ xfs=NO xfs_flags=''
+ xdm=NO xdm_flags=''
+ fccache=YES
+ ypbind=NO ypbind_flags=''
+ ypserv=NO ypserv_flags=-d
+ yppasswdd=NO yppasswdd_flags=''
+ mountd=NO mountd_flags=''
+ nfs_client=NO
+ nfs_server=NO
+ nfsd_flags=''
+ lockd=NO lockd_flags=''
+ statd=NO statd_flags=''
+ amd=NO amd_flags='-l syslog -x error,noinfo,nostats'
+ amd_dir=/amd
+ kdc=NO kdc_flags=--detach
+ iscsi_target=NO iscsi_target_flags=''
+ iscsid=NO
+ hostapd=NO hostapd_flags='-B /etc/hostapd.conf'
+ wpa_supplicant=NO wpa_supplicant_flags=''
+ isdnd=NO isdnd_flags=''
+ bluetooth=NO
+ btconfig_devices=''
+ bthcid=YES bthcid_flags=''
+ sdpd=YES sdpd_flags=''
+ rwhod=NO rwhod_flags='-u _rwhod'
+ devpubd=NO devpubd_flags=''
+ envsys=NO
+ apmd=NO apmd_flags=''
+ powerd=NO powerd_flags=''
+ screenblank=NO screenblank_flags=''
+ moused=NO
+ moused_flags='-p /dev/tty00'
+ wdogctl=NO
+ irdaattach=NO
+ irdaattach_flags=tty00
+ wscons=NO wscons_flags=''
+ wsmoused=NO wsmoused_flags=''
+ tpctl=NO tpctl_flags=''
+ mixerctl=NO mixerctl_mixers=''
+ virecover=YES
+ veriexec=NO
+ veriexec_strict=0
+ veriexec_verbose=0
+ veriexec_flags=-k
+ random_seed=YES
+ makemandb=YES
+ blacklistd=NO
+ ip6addrctl=NO
+ ip6addrctl_policy=auto
+ ip6addrctl_verbose=NO
+ unbound=NO
+ unbound_chrootdir=/var/chroot/unbound
+ nsd=NO
+ nsd_chrootdir=/var/chroot/nsd
+ nsd_flags='-t /var/chroot/nsd'
+ /sbin/sysctl -q machdep.xen
+ /sbin/sysctl -q hw.acpi.root
+ powerd=YES
+ rc_configured=YES
+ hostname=almaz
+ sshd=YES
+ ntpd=YES
+ cgd=NO
+ wscons=YES
+ rwhod=YES
+ npf=YES
+ npfd=YES
+ ipsec=YES
+ racoon=YES
+ named_chrootdir=/var/chroot/named/
+ named_flags=-4
+ named=YES
+ rpcbind=YES
+ rpcbind_flags=-l
+ lockd=YES
+ statd=YES
+ nfs_client=YES
+ nfs_server=YES
+ nfsd_flags='-n 6'
+ mountd=YES
+ amd=YES
+ rsyncd=NO
+ mysqld=NO
+ apache=YES
+ php_fpm=YES
+ pgsql=NO
+ squid=YES
+ slapd=YES
+ mongodb=NO
+ radiusd=YES
+ pure_ftpd=YES
+ pure_ftpd_flags='-A -E -j -p 49152:65535 -l ldap:/usr/pkg/etc/pureftpd-ldap.conf'
+ pure_uploadscript=NO
+ openvpn=YES
+ openvpn_cfg=iac.conf
+ critical_filesystems_local='/var /usr /tmp'
+ zebra=YES
+ ripngd=NO
+ ripd=NO
+ ospfd=YES
+ ospf6d=NO
+ bgpd=NO
+ _rc_conf_loaded=true
+ '[' -f /etc/rc.conf.d/php_fpm ']'
+ run_rc_command stop
+ rc_arg=stop
+ '[' -z php_fpm ']'
+ _rc_prefix=''
+ _keywords='start stop restart rcvar'
+ '[' -n reload ']'
+ _keywords='start stop restart rcvar reload'
+ rc_pid=''
+ _pidcmd=''
+ _procname=/usr/pkg/sbin/php-fpm
+ '[' -z '' -a -n /usr/pkg/sbin/php-fpm ']'
+ '[' -n /var/run/php-fpm.pid ']'
+ _pidcmd='rc_pid=$(check_pidfile /var/run/php-fpm.pid /usr/pkg/sbin/php-fpm )'
+ '[' -n 'rc_pid=$(check_pidfile /var/run/php-fpm.pid /usr/pkg/sbin/php-fpm )' ']'
+ _keywords='start stop restart rcvar reload status poll'
+ '[' -z stop ']'
+ shift
+ '[' -n '' ']'
+ eval 'rc_flags=$php_fpm_flags'
+ rc_flags=''
+ eval '_chdir=$php_fpm_chdir' '_chroot=$php_fpm_chroot' '_nice=$php_fpm_nice' '_user=$php_fpm_user' '_group=$php_fpm_group' '_groups=$php_fpm_groups' '_env="$php_fpm_env"'
+ _chdir='' _chroot='' _nice='' _user='' _group='' _groups='' _env=''
+ '[' -n '' ']'
+ '[' -n php_fpm -a stop '!=' rcvar ']'
+ checkyesno php_fpm
+ local var
+ checkyesnox php_fpm
+ eval '_value=$php_fpm'
+ _value=YES
+ return 0
+ var=0
+ '[' 0 = 0 -o 0 = 1 ']'
+ return 0
+ eval 'rc_pid=$(check_pidfile' /var/run/php-fpm.pid /usr/pkg/sbin/php-fpm ')'
+ check_pidfile /var/run/php-fpm.pid /usr/pkg/sbin/php-fpm
+ _pidfile=/var/run/php-fpm.pid
+ _procname=/usr/pkg/sbin/php-fpm
+ _interpreter=''
+ '[' -z /var/run/php-fpm.pid -o -z /usr/pkg/sbin/php-fpm ']'
+ '[' '!' -f /var/run/php-fpm.pid ']'
+ read _pid _junk </var/run/php-fpm.pid
+ '[' -z 12705 ']'
+ _find_processes /usr/pkg/sbin/php-fpm . '-p 12705'
+ '[' 3 -ne 3 ']'
+ _procname=/usr/pkg/sbin/php-fpm
+ _interpreter=.
+ _psargs='-p 12705'
+ _pref=''
+ _procnamebn=php-fpm
+ '[' . '!=' . ']'
+ _fp_args='_arg0 _argv'
+ _fp_match='case "$_arg0" in
                    $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")'
+ _proccheck='
                ps -o "pid,args" -p 12705 |
                while read _npid _arg0 _argv; do
                        case "$_npid" in
                            PID)
                                continue ;;
                        esac ; case "$_arg0" in
                    $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")
                                echo -n "$_pref$_npid" ;
                                _pref=" "
                                ;;
                        esac
                done'
+ eval ps -o '"pid,args"' -p 12705 '|' while read _npid _arg0 '_argv;' do case '"$_npid"' in 'PID)' continue ';;' esac ';' case '"$_arg0"' in '$_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")' echo -n '"$_pref$_npid"' ';' '_pref="' '"' ';;' esac done
+ ps -o pid,args+  -p 12705read
 _npid _arg0 _argv
+ continue
+ read _npid _arg0 _argv
+ echo -n 12705
+ command echo -n 12705
+ _flush_rc_output
+ print_rc_metadata nop
+ _have_rc_postprocessor
+ '[' -n '' ']'
+ unset _rc_pid
+ return 1
+ _pref=' '
+ read _npid _arg0 _argv
+ rc_pid=12705
+ for _elem=start
+ '[' start '!=' stop ']'
+ continue
+ for _elem=stop
+ '[' stop '!=' stop ']'
+ eval '_cmd=$stop_cmd' '_precmd=$stop_precmd' '_postcmd=$stop_postcmd'
+ _cmd='' _precmd='' _postcmd=''
+ '[' -n '' ']'
+ '[' 0 -gt 0 ']'
+ '[' -z 12705 ']'
+ eval
+ echo 'Stopping php_fpm.'
+ command echo 'Stopping php_fpm.'
Stopping php_fpm.
+ _doit='kill -TERM 12705'
+ '[' -n '' ']'
+ eval kill -TERM 12705
+ kill -TERM 12705
+ wait_for_pids 12705
+ _list=12705
+ '[' -z 12705 ']'
+ _prefix=''
+ true
+ _nlist=''
+ for _j=12705
+ kill -0 12705 2>/dev/null
+ _nlist=12705
+ '[' -z 12705 ']'
+ '[' 12705 '!=' 12705 ']'
+ sleep 0.05
usage: sleep seconds
+ true
+ _nlist=''
+ for _j=12705
+ kill -0 12705 2>/dev/null
+ _nlist=12705
+ '[' -z 12705 ']'
+ '[' 12705 '!=' 12705 ']'
+ sleep 0.05
usage: sleep seconds
+ true
+ _nlist=''
+ for _j=12705
+ kill -0 12705 2>/dev/null
+ _nlist=12705
+ '[' -z 12705 ']'
+ '[' 12705 '!=' 12705 ']'
+ sleep 0.05
usage: sleep seconds
+ true
+ _nlist=''
+ for _j=12705
+ kill -0 12705 2>/dev/null
+ _nlist=12705
+ '[' -z 12705 ']'
+ '[' 12705 '!=' 12705 ']'
+ sleep 0.05
usage: sleep seconds
+ true
+ _nlist=''
+ for _j=12705
+ kill -0 12705 2>/dev/null
+ _nlist=12705
+ '[' -z 12705 ']'
+ '[' 12705 '!=' 12705 ']'
+ sleep 0.05
usage: sleep seconds
+ true
+ _nlist=''
+ for _j=12705
+ kill -0 12705 2>/dev/null
+ '[' -z '' ']'
+ break
+ '[' -n '' ']'
+ eval
+ return 0


-- 
Sincerely yours,
Dima Veselov
Physics R&D Establishment of Saint-Petersburg University


Home | Main Index | Thread Index | Old Index