Date: Fri, 26 Feb 1999 12:39:52 -0500 (EST) From: "David E. Cross" <crossd@phoenix.cs.rpi.edu> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/10283: Race condition in rc.network Message-ID: <199902261739.MAA17549@phoenix.cs.rpi.edu>
next in thread | raw e-mail | index | archive | help
>Number: 10283 >Category: bin >Synopsis: Race condition in rc.network >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Feb 26 10:10:10 PST 1999 >Closed-Date: >Last-Modified: >Originator: David E. Cross >Release: FreeBSD 3.1-STABLE i386 >Organization: Rensselaer Polytechnic Institute, Department of Computer Science >Environment: Automounted /usr/local with automount maps provided by NIS >Description: AMD returns almost immediately when run, not waiting for for initialization of the parent to complete. In the network startup amd is started as part of network_pass3, this occurs immediately before things like ldconfig_paths, and scanning option directories for additional startup scripts, the result is that sometimes the directories listed do not exist and therefore are not added to ld.so's hint file or are not searched for additional files. >How-To-Repeat: amd [OPTIONS]; ls -la /automounted/directory >Fix: A loose loop after amd is called that waits for amd to come up before allowing the startup sctipts to continue. This is stolen from 'wait4amd', which is included with the base AMD distribution from Columbia, is included in our source tree, but is not included in our install?? (patch to rc.network is included below) *** rc.network.old Sat Feb 20 12:56:18 1999 --- rc.network Sat Feb 20 13:05:29 1999 *************** *** 284,294 **** fi if [ "X${amd_enable}" = X"YES" ]; then ! echo -n ' amd' if [ "X${amd_map_program}" != X"NO" ]; then amd_flags="${amd_flags} `eval ${amd_map_program}`" fi amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null fi if [ "X${rwhod_enable}" = X"YES" ]; then --- 284,299 ---- fi if [ "X${amd_enable}" = X"YES" ]; then ! echo -n ' amd(' if [ "X${amd_map_program}" != X"NO" ]; then amd_flags="${amd_flags} `eval ${amd_map_program}`" fi amd -p ${amd_flags} > /var/run/amd.pid 2> /dev/null + while ! amq >/dev/null 2>&1; do + echo -n . + sleep 1; + done + echo -n ')' fi if [ "X${rwhod_enable}" = X"YES" ]; then >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902261739.MAA17549>