Skip to content

[C++] MakeDeeplyNestedListView times out on MSVC 14.52 due to fixture dependency on normal_distribution's implementation-defined behavior #55895

Backlog

Description

@ConnorQi01

The MSVC team regularly builds popular open-source projects, including yours, with development versions of the build tools in order to find and fix regressions in the compiler and libraries before they can ship and cause trouble for the world. This also allows us to provide advance notice of breaking changes, which is the case here.

In MSVC Build Tools 14.52 (VS 2026 18.12), the implementation of std::normal_distribution switched to the modified ziggurat algorithm (microsoft/STL#6104), which changed the values it produces. In MakeDeeplyNestedListView, each level's MakeRandomListViewArray uses std::normal_distribution to generate view sizes — an implicit dependency on implementation-defined behavior. Under the new algorithm, the fixture generates views with significant overlap at each level. CompareListView starts a new child-range comparison for every valid non-empty view without reusing results, so the cost grows exponentially with overlap.

Timing Array::ApproxEquals on the fixture at different nesting depths showed:

depth time
20 0.018 s
30 2.21 s
40 > 15 s
63 > 15 s (timeout)

This causes twelve cases across arrow-json-integration-test, arrow-feather-test, and arrow-ipc-read-write-test to time out. The fixture's implicit dependency on RNG output surfaced when the toolset updated. This exposes a performance issue in the deep ListView test fixture when the generated views overlap.

Suggested fix:

Build each level from a regular ListArray and convert via ListViewArray::FromList. List offsets are monotonically increasing, so the resulting views never overlap and comparison cost stays linear in the nesting depth:

-    RETURN_NOT_OK(
-        MakeRandomListViewArray(array, batch_length, include_nulls, pool, &array));
+    std::shared_ptr<Array> list_array;
+    RETURN_NOT_OK(
+        MakeRandomListArray(array, batch_length, include_nulls, pool, &list_array));
+    ARROW_ASSIGN_OR_RAISE(array, ListViewArray::FromList(
+                                     checked_cast<const ListArray&>(*list_array), pool));

Timeout info:

48: [ RUN      ] TestJsonRoundTrip/TestJsonRoundTrip.RoundTrip/7
1/1 Test #48: arrow-json-integration-test ......***Timeout 180.01 sec

Steps to reproduce:

Build Arrow C++ with tests enabled following the official documentation, then run:

set "GTEST_FILTER=TestJsonRoundTrip/TestJsonRoundTrip.RoundTrip/7"
ctest -C Release -V -R "^arrow-json-integration-test$" --timeout 180

The corresponding cases include FeatherRoundTripTests/TestFeatherRoundTrip.RoundTrip/6 and GenericIpcRoundTripTests/TestIpcRoundTrip.RoundTrip/7.

Environment:

  • Arrow SHA: d228ba5a9def26e67e12b2e475be0b00edb77aea
  • MSVC Build Tools 14.52 (VS 2026 18.12), microsoft/STL#6104
  • Windows x64, Release build

Activity

  1. changed the title [-][C++] Deeply nested ListView comparisons can time out on overlapping child ranges[/-] [+][C++] MakeDeeplyNestedListView times out on MSVC 14.52 due to fixture dependency on normal_distribution's implementation-defined behavior[/+] on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions