Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stable-6.0' into feature/app_gen…
Browse files Browse the repository at this point in the history
…erations
  • Loading branch information
CamJN committed Oct 17, 2024
2 parents 506dccd + 2998c1c commit 04fb08b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ jobs:
with:
name: cxx-test-logs-macos
path: 'buildout/testlogs/*'
if-no-files-found: ignore
if: '!cancelled()'

- name: Teardown sccache
run: ./dev/ci/teardown-sccache
Expand Down Expand Up @@ -102,6 +104,9 @@ jobs:
ARCH_AND_OS: aarch64-apple-darwin
SCCACHE_AZURE_CONNECTION_STRING: ${{ secrets.AZURE_CI_STORAGE_CONNECTION_STRING }}

- name: Setup dependencies
run: brew install coreutils

- name: Setup misc
run: |
sudo chmod 755 "$HOME"
Expand All @@ -114,23 +119,28 @@ jobs:
# The AbortHandler doesn't work so well on Github's macOS runners:
# - crash-watch invocation freezes the runner, so we disable this.
# - resuming the parent process after SIGSTOP doesn't work, so we force kill the parent.
# - force killing the parent may not work, so we enforce a low timeout to prevent
# the test from haging for a long time. We enforce this primarily using the 'timeout'
# command from coreutils instead of Github Actions' timeout, because the latter
# could put the entire job in the "skipped" state and refuse to show logs.
timeout-minutes: 11
run: >
sudo env
PATH="$PATH"
GEM_PATH="$GEM_PATH"
PASSENGER_DUMP_WITH_CRASH_WATCH=false
PASSENGER_FORCE_TERMINATE_ON_ABORT=true
gtimeout --signal KILL --verbose 600
../buildout/test/cxx/main
working-directory: test
# The AbortHandler may not be able to forcefully kill the parent. We set a low timeout
# to prevent the test from hanging for a long time.
timeout-minutes: 10

- name: Archive logs
uses: actions/upload-artifact@v4
with:
name: cxx-test-logs-macos
path: 'buildout/testlogs/*'
if-no-files-found: ignore
if: '!cancelled()'

- name: Teardown sccache
run: ./dev/ci/teardown-sccache
Expand Down Expand Up @@ -282,6 +292,8 @@ jobs:
with:
name: apache-test-logs-${{ matrix.os }}
path: 'buildout/testlogs/*'
if-no-files-found: ignore
if: '!cancelled()'

nginx:
name: "Nginx tests on ${{ matrix.name }}"
Expand Down Expand Up @@ -363,6 +375,8 @@ jobs:
with:
name: nginx-test-logs-${{ matrix.os }}
path: 'buildout/testlogs/*'
if-no-files-found: ignore
if: '!cancelled()'

- name: Teardown sccache
run: ./dev/ci/teardown-sccache
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Release 6.0.24 (Not yet released)
* Update the order Passenger routes requests to app processes. Processes are now chosen based on being in the latest generation (Enterprise), then by newest process, then by oldest, then by
busyness. Closes GH-2551.
* Fix a regression from 6.0.10 where running `passenger-config system-properties` would throw an error. Closes GH-2565.
* [Enterprise] Fix a memory corruption-related crash that could occur during rolling restarting.
* [Ubuntu] Add packages for Ubuntu 24.10 "oracular".
* [Ruby] Specify rackup version to avoid broken 1.0 gem. Closes GH-2559.
* Upgrades Boost from 1.85 -> 1.86.
Expand Down
3 changes: 1 addition & 2 deletions src/agent/Core/ApplicationPool/Process.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,8 @@ class Process {

void destroySelf() const {
Context *context = getContext();
this->~Process();
LockGuard l(context->memoryManagementSyncher);
getContext()->processObjectPool.free(const_cast<Process *>(this));
context->processObjectPool.destroy(const_cast<Process *>(this));
}


Expand Down
12 changes: 8 additions & 4 deletions src/agent/Shared/Fundamentals/AbortHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,11 @@ resumeOriginalProcess(AbortHandlerWorkingState &state) {
int e = errno;
pos = state.messageBuf;
pos = ASSU::appendData(pos, end, state.messagePrefix);
pos = ASSU::appendData(pos, end, " ] Could not resume original process: kill() failed with errno=");
pos = ASSU::appendData(pos, end, " ] Could not resume original process: kill() failed: ");
pos = ASSU::appendData(pos, end, ASSU::limitedStrerror(e));
pos = ASSU::appendData(pos, end, " (errno=");
pos = ASSU::appendInteger<int, 10>(pos, end, e);
pos = ASSU::appendData(pos, end, "\n");
pos = ASSU::appendData(pos, end, ")\n");
write_nowarn(STDERR_FILENO, state.messageBuf, pos - state.messageBuf);

return false;
Expand All @@ -306,9 +308,11 @@ forceTerminateOriginalProcess(AbortHandlerWorkingState &state) {
int e = errno;
pos = state.messageBuf;
pos = ASSU::appendData(pos, end, state.messagePrefix);
pos = ASSU::appendData(pos, end, " ] Could not force terminate original process: kill() failed with errno=");
pos = ASSU::appendData(pos, end, " ] Could not force terminate original process: kill() failed: ");
pos = ASSU::appendData(pos, end, ASSU::limitedStrerror(e));
pos = ASSU::appendData(pos, end, " (errno=");
pos = ASSU::appendInteger<int, 10>(pos, end, e);
pos = ASSU::appendData(pos, end, "\n");
pos = ASSU::appendData(pos, end, ")\n");
write_nowarn(STDERR_FILENO, state.messageBuf, pos - state.messageBuf);
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/cxx_supportlib/Utils/AsyncSignalSafeUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ limitedStrerror(int e, const char *defaultResult = "Unknown error") {
return "Operation not permitted";
case ETXTBSY:
return "Text file busy";
case ESRCH:
return "Process does not exist";
default:
return defaultResult;
}
Expand Down

0 comments on commit 04fb08b

Please sign in to comment.