Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
77bd767
8372465: Bump update version for OpenJDK: jdk-17.0.19
GoeLin Dec 3, 2025
e853a44
8368882: NPE during text drawing on machine with JP locale
Dec 3, 2025
b123440
8303475: potential null pointer dereference in filemap.cpp
GoeLin Dec 6, 2025
e2c53d9
8301875: java.util.TimeZone.getSystemTimeZoneID uses C library defaul…
GoeLin Dec 6, 2025
084c4b5
6899304: java.awt.Toolkit.getScreenInsets(GraphicsConfiguration) retu…
GoeLin Dec 6, 2025
e904358
8282484: G1: Predicted old time in log always zero
Dec 7, 2025
b6eb8ce
8337681: PNGImageWriter uses much more memory than necessary
cost0much Dec 7, 2025
5014504
8283784: java_lang_String::as_platform_dependent_str stores to oop in…
jyma22 Dec 7, 2025
58dab5e
8361117: SIGSEGV in LShiftLNode::Ideal due to unexpected dead node
TheRealMDoerr Dec 9, 2025
7b541a2
8341779: [REDO BACKPORT] type annotations are not visible to javac pl…
cushon Dec 12, 2025
e12abc7
8357277: Update OpenSSL library for interop tests
GoeLin Dec 12, 2025
454e260
8336695: Update Commons BCEL to Version 6.10.0
GoeLin Dec 12, 2025
403ae7b
8372048: Performance improvement on Linux remote desktop
GoeLin Dec 12, 2025
fc816a5
Merge
GoeLin Dec 17, 2025
e0c50fd
8244400: MenuItem may cache the size and did not update it when the s…
GoeLin Dec 17, 2025
cc60106
8372756: Mouse additional buttons and horizontal scrolling are broken…
GoeLin Dec 17, 2025
5c9fbee
8288556: VM crashes if it gets sent SIGUSR2 from outside
GoeLin Dec 19, 2025
cb09e7b
8347475: GTK: javax/swing/JColorChooser/Test8152419.java there are no…
GoeLin Dec 19, 2025
c228e96
8331431: Update to use jtreg 7.4
GoeLin Dec 19, 2025
f9bb776
8333386: TestAbortOnVMOperationTimeout test fails for client VM
GoeLin Dec 19, 2025
f8c50b8
8349351: Combine Screen Inset Tests into a Single File
GoeLin Dec 19, 2025
708e1a2
8363950: Incorrect jtreg header in TestLayoutVsICU.java
GoeLin Dec 19, 2025
b3527e4
8372977: Unnecessary gthread-2.0 loading
GoeLin Dec 19, 2025
e4dc0cd
8370579: PPC: fix inswri immediate argument order
dbriemann Dec 19, 2025
a81daeb
8353755: Add a helper method to Util - findComponent()
GoeLin Dec 23, 2025
a0ebad3
8367904: Test java/net/InetAddress/ptr/Lookup.java should throw Skipp…
Dec 23, 2025
766ff45
Merge
GoeLin Dec 24, 2025
2088e2a
8030957: AIX: Implement OperatingSystemMXBean.getSystemCpuLoad() and …
Dec 30, 2025
580e494
8337795: Type annotation attached to incorrect type during class reading
cushon Dec 31, 2025
3f9c279
8271396: Spelling errors
Dec 31, 2025
69e83b1
8337102: JITTester: Fix breaks in static initialization blocks
kirill-shirokov Dec 31, 2025
827207b
8369563: Gtest dll_address_to_function_and_library_name has issues wi…
MBaesken Jan 5, 2026
f1b9421
8368960: Adjust java UL logging in the build
MBaesken Jan 9, 2026
4adae74
8368787: Error reporting: hs_err files should show instructions when …
TheRealMDoerr Jan 9, 2026
8ba7c16
8366694: Test JdbStopInNotificationThreadTest.java timed out after 60…
Jan 11, 2026
322760f
8374209: [17u,21u] Backout JDK-8361748 due to JDK-8373727
MBaesken Jan 14, 2026
24fe61e
8371978: tools/jar/ReproducibleJar.java fails on XFS
Jan 15, 2026
8976472
8372857: Improve debuggability of java/rmi/server/RemoteServer/AddrIn…
Jan 18, 2026
f02f962
8342175: MemoryEaterMT fails intermittently with ExceptionInInitializ…
shipilev Jan 19, 2026
d9c8bd2
8346962: Test CRLReadTimeout.java fails with -Xcomp on a fastdebug build
Jan 19, 2026
7d3eabd
8334670: SSLSocketOutputRecord buffer miscalculation
GoeLin Jan 20, 2026
4892ed4
8337998: CompletionFailure in getEnclosingType attaching type annotat…
cushon Jan 20, 2026
4217112
Merge
GoeLin Jan 21, 2026
dbeb994
8343622: AesDkCrypto.stringToKey should not return null
GoeLin Jan 22, 2026
381db13
8355632: WhiteBox.waitForReferenceProcessing() fails assert for retur…
GoeLin Jan 22, 2026
b0196fe
7036144: GZIPInputStream readTrailer uses faulty available() test for…
toddjonker Jan 22, 2026
041058f
8354893: [REDO BACKPORT] javac crashes while adding type annotations …
cushon Jan 22, 2026
80ef28b
8375530: PPC64: incorrect quick verify_method_data_pointer check caus…
dbriemann Jan 23, 2026
aafaadd
8360406: [21u] Disable logic for attaching type annotations to class …
cushon Jan 26, 2026
17151d9
8360539: DTLS handshakes fails due to improper cookie validation logic
GoeLin Jan 26, 2026
13ed988
8374642: EscapeHash macro fails with GNU make 4.3 and 4.4
GoeLin Jan 27, 2026
a6de0c1
8317633: Modernize text.testlib.HexDumpReader
GoeLin Jan 29, 2026
0082bc3
8351639: Improve debuggability of test/langtools/jdk/jshell/JdiHangin…
GoeLin Jan 29, 2026
6dc6add
8375063: Update Libpng to 1.6.54
mrserb Feb 2, 2026
2c8f01b
8366817: test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcServer.java …
Feb 2, 2026
fb8229e
8376270: [21u, 17u] Redo JDK-8361748: Enforce limits on the size of a…
GoeLin Feb 2, 2026
aa29cc6
8373727: New XBM images parser regression: only the first line of the…
GoeLin Feb 2, 2026
2132ad1
8355278: Improve debuggability of com/sun/jndi/ldap/LdapPoolTimeoutTe…
GoeLin Feb 3, 2026
0d49e54
8345578: New test in JDK-8343622 fails with a promoted build
GoeLin Feb 3, 2026
6d95e17
8354219: Automate javax/swing/JComboBox/ComboPopupBug.java
GoeLin Feb 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
8372857: Improve debuggability of java/rmi/server/RemoteServer/AddrIn…
…Use.java test

Backport-of: 04c0f8d
  • Loading branch information
SendaoYan committed Jan 18, 2026
commit 8976472909f3ee2ecca75437c9d18d0359caab85
96 changes: 37 additions & 59 deletions test/jdk/java/rmi/server/RemoteServer/AddrInUse.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -24,7 +24,6 @@
/* @test
* @bug 4111507
* @summary retryServerSocket should not retry on BindException
* @author Ann Wollrath
*
* @run main/othervm AddrInUse
*/
Expand All @@ -33,75 +32,54 @@
import java.rmi.registry.LocateRegistry;
import java.rmi.server.ExportException;

public class AddrInUse implements Runnable {
public class AddrInUse {

private static int port = -1;
private static final long TIMEOUT = 10000;

private boolean exportSucceeded = false;
private Throwable exportException = null;

public void run() {

/*
* Attempt to create (i.e. export) a registry on the port that
* has already been bound, and record the result.
*/
try {
LocateRegistry.createRegistry(port);
synchronized (this) {
exportSucceeded = true;
notifyAll();
}
} catch (Throwable t) {
synchronized (this) {
exportException = t;
notifyAll();
}
}
}
private static volatile Throwable registryExportFailure = null;

public static void main(String[] args) throws Exception {
System.err.println("\nRegression test for bug 4111507\n");

/*
* Bind a server socket to a port.
*/
ServerSocket server = new ServerSocket(0);
port = server.getLocalPort();
System.err.println("Created a ServerSocket on port " + port + "...");

/*
* Start a thread that creates a registry on the same port,
* and analyze the result.
*/
System.err.println("create a registry on the same port...");
System.err.println("(should cause an ExportException)");
AddrInUse obj = new AddrInUse();
synchronized (obj) {
(new Thread(obj, "AddrInUse")).start();
try (ServerSocket server = new ServerSocket(0)) {
int port = server.getLocalPort();
System.err.println("Created a ServerSocket on port " + port + "...");

/*
* Don't wait forever (original bug is that the export
* hangs).
* Start a thread that creates a registry on the same port,
* and analyze the result.
*/
obj.wait(TIMEOUT);
System.err.println("create a registry on the same port...");
System.err.println("(should cause an ExportException)");

if (obj.exportSucceeded) {
throw new RuntimeException(
"TEST FAILED: export on already-bound port succeeded");
} else if (obj.exportException != null) {
obj.exportException.printStackTrace();
if (obj.exportException instanceof ExportException) {
System.err.println("TEST PASSED");
} else {
throw new RuntimeException(
"TEST FAILED: unexpected exception occurred",
obj.exportException);
Thread exportRegistryThread = new Thread(() -> {
/*
* Attempt to create (i.e. export) a registry on the port that
* has already been bound, and record the result.
*/
try {
LocateRegistry.createRegistry(port);
} catch (Throwable t) {
registryExportFailure = t;
}
} else {
throw new RuntimeException("TEST FAILED: export timed out");
}, "ExportRegistry-Thread");

exportRegistryThread.start();

/*
* Wait for the LocateRegistry.createRegistry() call to complete or
* if it blocks forever (due to the original bug), then let jtreg fail
* the test with a timeout
*/
exportRegistryThread.join();
if (registryExportFailure == null) {
throw new RuntimeException(
"TEST FAILED: export on already-bound port succeeded");
}
if (!(registryExportFailure instanceof ExportException)) {
throw new RuntimeException(
"TEST FAILED: unexpected exception occurred", registryExportFailure);
}
System.err.println("TEST PASSED, received expected exception: " + registryExportFailure);
}
}
}
Loading