From 64bbb7ba9ce36eb1dcc76d4a6509f451b4a22207 Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Wed, 21 May 2025 00:27:33 -0700 Subject: [PATCH 1/2] Fix Issue #2155 (loadup -f -b -x fails can't find full.sysout). Reordered loadup so that the sysouts are copied to loadups before loadup-aux and loadup-db are run, and that the product of loadup-aux are copied to loadups before loadup-db is run -- all to make sure that the right prerequisites are available in loadups when needed. Also forced a run of loadup-aux if full.sysout is newer than exports.all when -db is specified. --- scripts/loadups/loadup | 63 ++++++++++++++++++++------ scripts/loadups/loadup-aux.sh | 9 +++- scripts/loadups/loadup-db-from-full.sh | 12 ++++- scripts/loadups/loadup-setup.sh | 7 ++- 4 files changed, 72 insertions(+), 19 deletions(-) diff --git a/scripts/loadups/loadup b/scripts/loadups/loadup index 0a55b2104..631a7d164 100755 --- a/scripts/loadups/loadup +++ b/scripts/loadups/loadup @@ -18,6 +18,7 @@ main() { thinw=false thinl=false override_lock=false + ignore_lock=false while [ "$#" -ne 0 ]; do case "$1" in @@ -148,7 +149,12 @@ main() { -ov | -override | --override) override_lock=true ;; + --ignore_lock) + # internal + ignore_lock=true + ;; --noendmsg) + # internal noendmsg=true ;; -z | -man | --man ) @@ -284,7 +290,7 @@ main() { fi # - # Do individual loadups as requested + # Do individual "stage" loadups as requested # if [ "${no_loadups}" = false ] @@ -318,23 +324,11 @@ main() { /bin/sh "${LOADUP_SCRIPTDIR}/loadup-apps-from-full.sh" exit_if_failure $? "${noendmsg}" fi - - if [ "${aux}" = true ] - then - /bin/sh "${LOADUP_SCRIPTDIR}/loadup-aux.sh" - exit_if_failure $? "${noendmsg}" - fi - - if [ "${db}" = true ] - then - /bin/sh "${LOADUP_SCRIPTDIR}/loadup-db-from-full.sh" - exit_if_failure $? "${noendmsg}" - fi fi # - # Done with loadups, successfully. Now copy files into loadups dir from workdir + # Done with "stage" loadups, successfully. Now copy the stages files into loadups dir from workdir # if [ "${nocopy}" = false ] @@ -371,7 +365,29 @@ main() { /bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/apps.dribble "${LOADUP_OUTDIR}" \ | sed -e "s#${MEDLEYDIR}/##g" fi + fi + + + + # + # Now do the "after stages" loadups, if required. Do the copies as necessary to meet the dependecies + # of one loadup on another's output. + # + + # First aux + + if [ "${no_loadups}" = false ] + then + + if [ "${aux}" = true ] + then + /bin/sh "${LOADUP_SCRIPTDIR}/loadup-aux.sh" + exit_if_failure $? "${noendmsg}" + fi + fi + if [ "${nocopy}" = false ] + then if [ "${aux}" = true ] then /bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/whereis.hash "${LOADUP_OUTDIR}" \ @@ -383,7 +399,21 @@ main() { /bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/exports.dribble "${LOADUP_OUTDIR}" \ | sed -e "s#${MEDLEYDIR}/##g" fi + fi + + # then db, which depends on the output of aux + + if [ "${no_loadups}" = false ] + then + if [ "${db}" = true ] + then + /bin/sh "${LOADUP_SCRIPTDIR}/loadup-db-from-full.sh" + exit_if_failure $? "${noendmsg}" + fi + fi + if [ "${nocopy}" = false ] + then if [ "${db}" = true ] then /bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/fuller.database "${LOADUP_OUTDIR}" \ @@ -391,9 +421,12 @@ main() { /bin/sh "${LOADUP_CPV}" "${LOADUP_WORKDIR}"/fuller.dribble "${LOADUP_OUTDIR}" \ | sed -e "s#${MEDLEYDIR}/##g" fi - fi + + # + # OK we're done, exit cleanly + # echo "+++++ loadup: SUCCESS +++++" remove_run_lock exit 0 diff --git a/scripts/loadups/loadup-aux.sh b/scripts/loadups/loadup-aux.sh index f2301d106..c16182519 100755 --- a/scripts/loadups/loadup-aux.sh +++ b/scripts/loadups/loadup-aux.sh @@ -8,6 +8,13 @@ main() { loadup_start + SYSOUT="${LOADUP_OUTDIR}/full.sysout" + if [ ! -f "${SYSOUT}" ] + then + output_error_msg "Error: cannot find ${SYSOUT}.${EOL}Exiting." + exit 1 + fi + initfile="-" cat >"${cmfile}" <<-"EOF" " @@ -33,7 +40,7 @@ main() { " EOF - run_medley "${LOADUP_WORKDIR}/full.sysout" + run_medley "${SYSOUT}" loadup_finish "whereis.hash" "whereis.hash" "exports.all" } diff --git a/scripts/loadups/loadup-db-from-full.sh b/scripts/loadups/loadup-db-from-full.sh index fef9535e7..39f016fbb 100755 --- a/scripts/loadups/loadup-db-from-full.sh +++ b/scripts/loadups/loadup-db-from-full.sh @@ -6,13 +6,21 @@ main() { loadup_start - SYSOUT="${MEDLEYDIR}/loadups/full.sysout" - if [ ! -f "${SYSOUT}" ]; + SYSOUT="${LOADUP_OUTDIR}/full.sysout" + if [ ! -f "${SYSOUT}" ] then output_error_msg "Error: cannot find ${SYSOUT}.${EOL}Exiting." exit 1 fi + # Check to make sure exports.all exists and is newer than full.sysout + # if not, run loadup-aux to create a new exports.all + EXPORTS="${LOADUP_OUTDIR}/exports.all" + if [ ! -f "${EXPORTS}" ] || [ "$(find "${SYSOUT}" -newer "${EXPORTS}" -exec echo true \; )" = true ] + then + "${MEDLEYDIR}"/scripts/loadups/loadup --aux --ignore_lock --noendmsg + fi + initfile="-" cat >"${cmfile}" <<-"EOF" " diff --git a/scripts/loadups/loadup-setup.sh b/scripts/loadups/loadup-setup.sh index e1e102964..47b0ba1a1 100644 --- a/scripts/loadups/loadup-setup.sh +++ b/scripts/loadups/loadup-setup.sh @@ -247,9 +247,13 @@ process_maikodir() { } export LOADUP_LOCKFILE="${LOADUP_WORKDIR}"/lock +LOADUP_LOCK="" +override_lock=false +ignore_lock=false check_run_lock() { - set +x + if [ "${ignore_lock}" = false ] + then if [ -e "${LOADUP_LOCKFILE}" ] then output_warn_msg "Warning: Another loadup is already running with PID $(cat "${LOADUP_LOCKFILE}")" @@ -282,6 +286,7 @@ check_run_lock() { fi echo "$$" > "${LOADUP_LOCKFILE}" LOADUP_LOCK="$$" + fi } remove_run_lock() { From 1e3970177aa5c8f012297c9abd0afbf862b04127 Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Wed, 21 May 2025 23:42:27 -0700 Subject: [PATCH 2/2] Fix Issue 2148 - loadups fail on WSL1 with Xvnc server error. Root cause of 2148 is that certain Medley sessions in loadups run very quickly - less that a second or 2. This causes the medley script to improperly detect an Xvnc server error. Fixed by adding a cli flag --automation that forces the medley script to skip the check for Xvnc server errors. Changed loadup script to call medley with this flag set. Also add a cl flag to loadup --forcevnc that forces loadup to use vnc even on WSL2. This is intended for testing purposes only. --- docs/man-page/man_medley.html | 9 +++++++++ docs/man-page/medley.1 | 9 +++++++++ docs/man-page/medley.1.gz | Bin 5066 -> 5242 bytes docs/man-page/medley.1.md | 9 +++++++-- scripts/loadups/loadup | 5 +++++ scripts/loadups/loadup-setup.sh | 3 +++ scripts/medley/medley.command | 8 +++++++- scripts/medley/medley_args.sh | 4 ++++ scripts/medley/medley_usage.sh | 2 ++ scripts/medley/medley_vnc.sh | 2 +- 10 files changed, 47 insertions(+), 4 deletions(-) diff --git a/docs/man-page/man_medley.html b/docs/man-page/man_medley.html index e75ac6bed..a0e6c58ae 100644 --- a/docs/man-page/man_medley.html +++ b/docs/man-page/man_medley.html @@ -284,6 +284,15 @@

Flags

On Windows/Cygwin installations, FILE is specified in the Medley file system, not the host Windows file system.

+
-am, –automation
+
+

Useful only when using –vnc (and always on WSL1). When calling medley +as part of an automation script, often Medley will run for a very short +time (< a couple of seconds). This can cause issues with medley code +that detects Xvnc server failures. Setting this flag notifies Medley +that very short Medley sessions are possible and the Xvnc error +detection needs to be adjusted accordingly.

+

Other Options

diff --git a/docs/man-page/medley.1 b/docs/man-page/medley.1 index c2da6a5d3..c73c1f9c1 100644 --- a/docs/man-page/medley.1 +++ b/docs/man-page/medley.1 @@ -386,6 +386,15 @@ environment variable LDEREPEATCM. On Windows/Cygwin installations, \f[I]FILE\f[R] is specified in the Medley file system, not the host Windows file system. .RE +.TP +-am, \[en]automation +Useful only when using \[en]vnc (and always on WSL1). +When calling medley as part of an automation script, often Medley will +run for a very short time (< a couple of seconds). +This can cause issues with medley code that detects Xvnc server +failures. +Setting this flag notifies Medley that very short Medley sessions are +possible and the Xvnc error detection needs to be adjusted accordingly. .SS Other Options .PP \ diff --git a/docs/man-page/medley.1.gz b/docs/man-page/medley.1.gz index 4e563a85f4d0176e3502e746c4325fef5ac879d8..95dd0cf33f63760b6aced25bfd47a659cb027fbf 100644 GIT binary patch literal 5242 zcmV-=6ou;_iwFp4zbaF#ydw`EMJ!)xYzvAcE}&Ya@-5Y+9g3QNULc z0lr{)n*^~DP&1Uo&!eF-hiz@!|Gn=ZIh>K~IExl7c9YmMr779@*N=aT))6S@<`82q2=G?%oa8LRZ3Ij_~cHPQ-HG^ z%BC{KTpscYQ{W;vp`z{eLe;X=MW##m*;GRbhe%s5ba`(oEe~i{A`+wJi|g5!!-Ja# z_~+)u!wY%+_iK^JSzW^E2mYtAJQ(|*58B5E{QUZ#BGGwg=iz0$^)T9c81Fswn^h)r zkz9R{FHVn-PL4mnkS|`tAO3$*tFo4-I?MH1j*D8Cxv5q_r(z+J$p?A1e|jvEiwgla zIJjBTI{5MOMqYo>%NtqY{z^8h4H&e2^7-uiVltj=2k}MDay75y_5USFBJg*3KE9cJ zo}B-B_4VEOCEN~dOKQpr@7c;KpLiG?#vac6Jgd^H1VNPr`&^>S)+lM0akTexVcL9#2G z-{~w7B@8{1=mjy{BF9i(IL>CR4*}d1)%YkW9Cd{tr32!TrG1nVD~WEq(rMX5vZAlFMTz%M2+nYw}!ltkbNt%dSAu>9~*( z0Aa3xcZt9!3I76DP4fmck8oImeAPNK2FS@nyIk7h1b>Z`T-=*_0h_{EsOx}ihU#fo zWCv<%^9t0YmYIbU3LB1-k@~CE3KUGS4VX42ubp>k@68n6LDpMr*rg>t@wBu>zHSMMyQiuGWAhk2MMTg4@HG`)6DVCh>zcT* zdrf?@Au_<~at)FSyuuJ5lB!kS1lJPtSMXlkab|0s!if+bTw1$it8sX8J|Tfod1c#! zKw(C$F=SH=X604~-vU7lnHxIhKTONU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MZM2H>rE<-Pnx>_linmAO$jf2@ zLZF@i-ha@YOWhw2zQ)lQz8+6DNic_(E0x;9n#Oy(@FVeQO4BT^|JFO+_Q)1RgHzqT z?mC+7;N<`5(ec&s*-Tzgo_xU{9E4NuH$ww~R6dn)y$TJ{)wtA3 z#<6KP-wFCZG`C6VP5{~6G`kC1(wZC_l${y+9WJumr1x0xl=8?Wf&(qO-mItr2cGtN z9Kxq{?2z4@DA=m;lO?`8(YCQj?%b;7OKG4GyVpbWsBC>d#83DpduJx}sc9rzcv8ZG z92!M|I?0`*BDqu5Xi%ZH<~)0PB?8C!vwG!JXKS`n>|@i^e+0pmoxiKJ-9VybOhZv+ zY%slVa+(X}QB2bJo}0xla)L{FdnXZo*wCBj>6U$3?`Pt6jV~a#|#z#Hg++*rM z=TJeZL2ZZXgEro{$yjAVApE6GoDL3ilFgLpzVozY zRj`?^W;55mADEDh#7tw7nNetHcLFP_3a^<|TxB|Z#YvB!x^+j0Cy!vI_W(I3$~5P# z9*(_WU?mJloexV~))mxL5r1y;jhDHmxiev` z9=VL_uk&B?MZKvS?9z_6i~@z}Pr9IYEZmh7TbNNDj}zQzaNCAH z(8}opE&d7&gh1EPi1E<2Rvl8kMwGD26Ia&ep*kj|ia>kRBP_)-hCdQ8iPs~t*J4MGJEnrR&`yPz1`iV#u_XFZtYHcUp($=TKu0jq+NcwntnXF=G&8^+*By) gon$26y?OWB1pa!DvhqNpqFRdo1BvXFuH8HU0Ii@1iU0rr diff --git a/docs/man-page/medley.1.md b/docs/man-page/medley.1.md index 282159649..425e6a30a 100644 --- a/docs/man-page/medley.1.md +++ b/docs/man-page/medley.1.md @@ -216,7 +216,7 @@ specified in the Medley file system, not the host Windows file system. If the given value is "-", Medley will start up without using REM.CM file. There is no default Medley REM.CM file. - + On Windows/Cygwin installations, *FILE* is specified in the Medley file system, not the host Windows file system. @@ -254,10 +254,15 @@ for the parameter will be reset to the default value - which in the case of *Hos -cc \[*FILE* | -], \-\-repeat \[*FILE* | -] : Run Medley once. And then as long as *FILE* exists and is greater then zero length, repeatedly run Medley using *FILE* as the REM.CM file that Medley reads and executes at startup. Each run of Medley can change the contents of *FILE* to effect the subsequent run of Medley. To end the cycle, Medley needs to delete *FILE*. WIthin Medley, *FILE* can be found as the value of the environment variable LDEREPEATCM. - + On Windows/Cygwin installations, *FILE* is specified in the Medley file system, not the host Windows file system. +-am, --automation +: Useful only when using --vnc (and always on WSL1). When calling medley as part of an automation script, often Medley +will run for a very short time (< a couple of seconds). This can cause issues with medley code that detects Xvnc server failures. +Setting this flag notifies Medley that very short Medley sessions are possible and the Xvnc error detection needs to be adjusted accordingly. + Other Options ------------- diff --git a/scripts/loadups/loadup b/scripts/loadups/loadup index 631a7d164..ab84791e7 100755 --- a/scripts/loadups/loadup +++ b/scripts/loadups/loadup @@ -157,6 +157,11 @@ main() { # internal noendmsg=true ;; + --forcevnc) + # internal - for testing + # WSL only -otherwise warning msg from medley + force_vnc="+" + ;; -z | -man | --man ) if [ "$(uname)" = "Darwin" ] then diff --git a/scripts/loadups/loadup-setup.sh b/scripts/loadups/loadup-setup.sh index 47b0ba1a1..0177dd084 100644 --- a/scripts/loadups/loadup-setup.sh +++ b/scripts/loadups/loadup-setup.sh @@ -161,6 +161,7 @@ loadup_finish () { exit ${exit_code} } +force_vnc="-" run_medley () { /bin/sh "${MEDLEYDIR}/scripts/medley/medley.command" \ --config - \ @@ -171,6 +172,8 @@ run_medley () { --rem.cm "${cmfile}" \ --greet "${initfile}" \ --sysout "$1" \ + --automation \ + --vnc "${force_vnc}" \ "$2" "$3" "$4" "$5" "$6" "$7" ; exit_code=$? } diff --git a/scripts/medley/medley.command b/scripts/medley/medley.command index 28ce293f7..70a659b0f 100755 --- a/scripts/medley/medley.command +++ b/scripts/medley/medley.command @@ -586,6 +586,8 @@ flags: -x - | --logindir - : use MEDLEYDIR/logindir as LOGINDIR in Medley + -am | --automation : this call to medley is being used in automation, adjust timings. Relevant in -vnc case only. + -cm FILE | --rem.cm FILE : use FILE as the REM.CM when starting up Medley. FILE must be absolute pathname. -cm - | --rem.cm - : do not use an REM.CM. Negate any prior setting, e.g., from config file. @@ -638,6 +640,7 @@ pixelscale_arg="" borderwidth_arg="" remcm_arg="${LDEREMCM}" repeat_cm="" +automation=false # Add marker at end of args so we can accumulate pass-on args in args array set -- "$@" "--start_of_pass_args" @@ -915,6 +918,9 @@ do fi exit 0 ;; + -am | --automation) + automation=true + ;; -nf | -NF | --nofork) # for use in loadups case $2 in @@ -1702,7 +1708,7 @@ do "$(ip_addr)":"${VNC_PORT}" \ >>"${LOG}" 2>&1 & wait $! - if [ $(( $(date +%s) - start_time )) -lt 5 ] + if [ "${automation}" = false ] && [ $(( $(date +%s) - start_time )) -lt 5 ] then if [ -z "$(pgrep -f "Xvnc ${DISPLAY}")" ] then diff --git a/scripts/medley/medley_args.sh b/scripts/medley/medley_args.sh index eac7baa0e..2c3ec04d5 100755 --- a/scripts/medley/medley_args.sh +++ b/scripts/medley/medley_args.sh @@ -48,6 +48,7 @@ pixelscale_arg="" borderwidth_arg="" remcm_arg="${LDEREMCM}" repeat_cm="" +automation=false # Add marker at end of args so we can accumulate pass-on args in args array set -- "$@" "--start_of_pass_args" @@ -325,6 +326,9 @@ do fi exit 0 ;; + -am | --automation) + automation=true + ;; -nf | -NF | --nofork) # for use in loadups case $2 in diff --git a/scripts/medley/medley_usage.sh b/scripts/medley/medley_usage.sh index e241ab16f..a0346f91b 100644 --- a/scripts/medley/medley_usage.sh +++ b/scripts/medley/medley_usage.sh @@ -115,6 +115,8 @@ flags: -x - | --logindir - : use MEDLEYDIR/logindir as LOGINDIR in Medley + -am | --automation : this call to medley is being used in automation, adjust timings. Relevant in -vnc case only. + -cm FILE | --rem.cm FILE : use FILE as the REM.CM when starting up Medley. FILE must be absolute pathname. -cm - | --rem.cm - : do not use an REM.CM. Negate any prior setting, e.g., from config file. diff --git a/scripts/medley/medley_vnc.sh b/scripts/medley/medley_vnc.sh index b578f8599..df4f5fb42 100755 --- a/scripts/medley/medley_vnc.sh +++ b/scripts/medley/medley_vnc.sh @@ -215,7 +215,7 @@ "$(ip_addr)":"${VNC_PORT}" \ >>"${LOG}" 2>&1 & wait $! - if [ $(( $(date +%s) - start_time )) -lt 5 ] + if [ "${automation}" = false ] && [ $(( $(date +%s) - start_time )) -lt 5 ] then if [ -z "$(pgrep -f "Xvnc ${DISPLAY}")" ] then