-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log format during shutdown (Issue 480) #634
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ONE minor glitch...
In the do_shutdown_now()
function, you need to move your declaration for spincount
up to the top where your loggersetshutdown
is being declared.
Yes, I know most modern versions of 'C' these days now allow you to declare variables anywhere before you reference them, but older compiler versions do not. They require them to all be declared at the beginning of the function.
Other than that ONE TINY THING, everything else looks fine to me!
Make that one change and I'll be happy to accept your Pull Request!
Thank you for your continued contributions, James! :)
Fish, Not a problem. I welcome the review and comments. Change completed. Jim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Merged! Thanks again, James! |
We do still need to fully test it out on other systems, non-Linux, BSDs, macOS, etc. |
Damn! I keep forgetting about that. I'll give it a try on my Kubuntu 21.10 system too. |
FWIW, it seems to work just fine on both my Kubuntu 21.10 and my old CentOS 6.10 system too, both virtual machines running under VMware WorkStation (not that that makes any difference of course). Should we close GitHub Issue #480 now? |
I'd like to try it first on BSD and macOS before closing. |
Works on macOS (Sonoma 14.4 Beta). I'll try BSD next. |
Well? Is BSD okay? I'd like to close issue #480! |
Fish, So just tried things out with the latest commit, on FreeBSD 14, and get endless errors in 'make check': I then rebuilt on Debian, and getting the same there. The very recent change for that For example:
...
Bill |
As far as this issue with the log output during shutdown is concerned, though, the changes to seem to work correctly on FreeBSD. So I'd say we're good to go. Bill |
Bill: Thank you for all the testing, especially pointing out the problems with the first fix version. Fish: thank you for the extra tests and reviewing the pull request. Much appreciate all your support. Jim |
Yep. It sure as hell is. (F**K!) I jumped right on it and fixed it as soon as I got up this morning and saw your message, but also noticed another unrelated problem too that I introduced recently: the E7Prefix "Various CKD dasd I/O tests" test keeps failing because its shadow file isn't being deleted when the test finishes. If you manually delete all shadow files in the tests directory before running your 'runtest', it works fine. But if you immediately try it again, it fails because the old shadow file is still there when the test starts even though its .tst script clearly said to discard it when the test was over! ( I already have the fix for the "processor stopped" SNAFU ready to go and it does indeed correct the cause for all of the other 230+ failures. I'll go ahead and commit it ASAP. BUT... be aware that the other bug -- the 'sf' command's failure to delete the file when |
Good. I'll go ahead and close issue #480 then. Thanks. |
Fixed! |
Both issues tested and verifiied are fixed as of commit: 140a0cf Tests work, and are "serially reusable". |
Thank you, James, for your work and contribution! |
Here is a 2nd solution to fix two log format issues during shutdown Issue 480:
Issue related to logger processing and timing of shutdown
logger_unredirect()
. To fix the timing issue, a systemshutbegin
flag notifieslogger_thread()
that shutdown is beginning and to executelogger_unredirect()
before setting system shutdown flag. Timing is now controlled bylogger_thread()
.Update
logger_timestamped_logfile_write
to have a lock if timestamps are required.Tested using MVS TK5 startup/shutdown on Armbain Jammy (Ubuntu) on Raspberry Pi4 and Intel Nuc, and on Windows (Intel Nuc). Missing log lines (e.g. 'hao_thread' ended) from previous 'bad' solution are included in the log. Not sure how to explicitly test problem #2. My test runs do not show any interleaved log lines but that doesn't imply the problem is resolved.
Note: this solution does not make any attempt to resolve missing shutdown messages on the console.
I would appreciate further testing on other systems and any comments on the solution.
Thanks,
Jim