[crac] RFR: Merge jdk:jdk-25+18
Timofei Pushkin
tpushkin at openjdk.org
Mon Jun 23 09:47:51 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'm having doubts on JDK-8319055 resolution. I don't see where the connection between `effectively_complete_raw` and `complete` is now? How is it ensured they don't do the same (write the result) twice?
Before this I see that VM thread would call `effectively_complete_raw` before checkpoint which would write the reply and close the socket, then after restore attach listener thread would call `complete` which would **just cleanup the memory**. Now `effectively_complete_raw` will be called as before but after restore `complete` will be called and **try to write something again**?
-------------
PR Comment: https://git.openjdk.org/crac/pull/238#issuecomment-2995716304
More information about the crac-dev
mailing list