[crac] RFR: Merge jdk:jdk-25+18
Timofei Pushkin
tpushkin at openjdk.org
Tue Jun 24 11:36:50 UTC 2025
On Mon, 16 Jun 2025 07:31:21 GMT, Dmitry Cherepanov <dcherepanov at openjdk.org> wrote:
> This MR includes merges for tags between jdk-25+15 and jdk-25+18.
>
> Attaching output of --diff-merges=remerge
>
> <details>
>
> <summary>jdk-25+15</summary>
>
>
> commit b0b66cb5999e89dd44456682c6bc932fa559e242
> Merge: eea5480cdda 74df384a987
> Author: Dmitry Cherepanov <dcherepanov at azul.com>
> Date: Mon Jun 9 18:31:26 2025 +0400
>
> Merge with jdk-25+15
>
> diff --git a/src/hotspot/os/posix/attachListener_posix.cpp b/src/hotspot/os/posix/attachListener_posix.cpp
> remerge CONFLICT (content): Merge conflict in src/hotspot/os/posix/attachListener_posix.cpp
> index ca3666be119..4fcb7a24e08 100644
> --- a/src/hotspot/os/posix/attachListener_posix.cpp
> +++ b/src/hotspot/os/posix/attachListener_posix.cpp
> @@ -60,105 +60,6 @@
> // obtain the credentials of client. We check that the effective uid
> // of the client matches this process.
>
> -<<<<<<< eea5480cdda (8358956: [CRaC] Fix NULL usage in hotspot)
> -=======
> -// forward reference
> -class PosixAttachOperation;
> -
> -class PosixAttachListener: AllStatic {
> - private:
> - // the path to which we bind the UNIX domain socket
> - static char _path[UNIX_PATH_MAX];
> - static bool _has_path;
> -
> - // the file descriptor for the listening socket
> - static volatile int _listener;
> -
> - static bool _atexit_registered;
> -
> - public:
> - static void set_path(char* path) {
> - if (path == nullptr) {
> - _path[0] = '\0';
> - _has_path = false;
> - } else {
> - strncpy(_path, path, UNIX_PATH_MAX);
> - _path[UNIX_PATH_MAX-1] = '\0';
> - _has_path = true;
> - }
> - }
> -
> - static void set_listener(int s) { _listener = s; }
> -
> - // initialize the listener, returns 0 if okay
> - static int init();
> -
> - static char* path() { return _path; }
> - static bool has_path() { return _has_path; }
> - static int listener() { return _listener; }
> -
> - static PosixAttachOperation* dequeue();
> -};
> -
> -class SocketChannel : public AttachOperation::RequestReader, public AttachOperation::ReplyWriter {
> -private:
> - int _socket;
> -public:
> - SocketChannel(int socket) : _socket(socket) {}
> - ~SocketChannel() {
> - close();
> - }
> -
> - bool opened() const {
> - return _socket != -1;
> - }
> -
> - void close() {
> - if (opened()) {
> - ::shutdown(_socket, SHUT_RDWR);
> - ::close(_socket);
> - _socket = -1;
> - }
> - }
> -
> - // RequestReader
> - int read(void* buffer, int size) override {
> - ssize_t n;
> - RESTARTABLE(::read(_socket, buffer, (size_t)size), n);
> - return checked_cast<int>(n);
> - }
> -
> - //...
I mean these two calls (in the order they are executed):
1. [Here](https://github.com/openjdk/jdk/pull/23405/files#diff-5373ebf2d7b4e9c8fcbb188dd0d7193d4af7e3e021de7e3e4dd61c9bb5803edfR636) `CheckpointDCmd` is executed which indirectly calls `PosixAttachOperation::effectively_complete_raw` writing the output via `PosixAttachOperation::write_operation_result`.
2. [Here](https://github.com/openjdk/jdk/pull/23405/files#diff-5373ebf2d7b4e9c8fcbb188dd0d7193d4af7e3e021de7e3e4dd61c9bb5803edfR641) `attachStream::complete` is called which tries to write the output again via `attachStream::flush_reply`.
Before the change there was only `AttachOperation::complete` instead of (2) which checked that `PosixAttachOperation::effectively_complete_raw` hasn't been called yet, but `attachStream::complete` does not. Maybe it's OK for some reason but then there should be no reason to maintain `_effectively_completed`.
-------------
PR Comment: https://git.openjdk.org/crac/pull/238#issuecomment-2999972602
More information about the crac-dev
mailing list