RFR: 8351842: Test issues on Windows with combination of --enable-linkable-runtime and --with-external-symbols-in-bundles=public [v2]

Christoph Langer clanger at openjdk.org
Thu Mar 13 07:52:52 UTC 2025


On Thu, 13 Mar 2025 07:39:20 GMT, Christoph Langer <clanger at openjdk.org> wrote:

>> This PR addresses an issue that can be observed when building on Windows with configure options `--enable-linkable-runtime` and `--with-external-symbols-in-bundles=public`.
>> 
>> The problem is that with this special build configuration, we build two sets of .pdb files for the binaries. The first set is the standard debug symbols files named <binary-name>.pdb. The second set consists of stripped debug symbols file called <binary-name>.stripped.pdb which have less information but enough to present line numbers in hs-err files.
>> 
>> During build we use the *.stripped.pdb files for compiling the jmods and also the bundle files. However, in the images folder, both sets of .pdb files exist. The tests for runtime linking will now, in the absence of jmod files, pick up the .pdb files (without *stripped*) from images, but in the runtime the hashes of the *stripped* files are stored.
>> 
>> With this change, the standard .pdb files in the `--with-external-symbols-in-bundles=public` configuration are now the stripped files and we create a set of full pdb files named *.full.pdb. Jmods and Bundles still contain the stripped pdb files and we also fix the issue that the debug symbols bundle also contained stripped pdb files so far. With this fix, it will contain the full pdb files and extracting these over a JDK runtime will replace stripped pdbs with full pdbs.
>
> Christoph Langer has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix tests

First of all, after giving this a spin in our testing I found that I needed to address two new test problems. If we go with this change, we need to align JmodExcludedFiles with the new naming (*.full.pdb instead of *.stripped.pdb), otherwise this test would fail in ` --with-external-symbols-in-bundles=public` mode. Also, with the standard pdb file not being the stripped one, the gtest `dll_address_to_function_and_library_name` fails in its current form because it doesn't print the symbol name any more but only an address. So I weakened the condition on Windows a little to make the test pass. Probably something for the eyes of @tstuefe.

Now, regarding the principal point opened by Erik, I think it is somehow valid. If we were to build with `--with-external-symbols-in-bundles=public`, the debugging experience for a developer is a bit worse. On the other hand, I agree with Severin, developers should probably not use this for their local builds, it's rather a shipment configuration. The alternative would be to exclude some 50+ test cases when using linkable runtime on Windows, which is no good either. Or should there be an alternative image directory used for these kinds of test? Or should jlink get some workaround coding to check whether *stripped.pdb files are present and try to prefer these when building runtimes?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24012#issuecomment-2720268571


More information about the build-dev mailing list