Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gc tests #469

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Add gc tests #469

wants to merge 14 commits into from

Conversation

jmid
Copy link
Collaborator

@jmid jmid commented Aug 27, 2024

This PR adds initial tests of the Gc module - and in particular testing of Gc.compact.

Exercising Gc.counters already triggered a known issue locally, which has recently been fixed on trunk: ocaml/ocaml#13370 I therefore expect the parallel test to fail on 5.2.0 and earlier.

This can be extended (and improved) in many ways adding (big)arrays, Weak, Ephemeron, custom blocks, finalizers, and dynamic Gc_ctrl changes.

@jmid
Copy link
Collaborator Author

jmid commented Aug 27, 2024

CI summary for ca8cf93:

  • 11 5.2 workflows failed as expected due to the Gc test
    • 32bit 5.2 failed with a segfault
    • Bytecode aborted with Fatal error: allocation failure during minor GC
    • Cygwin 5.2 aborted with Fatal error: allocation failure during minor GC
    • FP 5.2 aborted with Fatal error: allocation failure during minor GC
    • Linux 5.2 aborted with Fatal error: allocation failure during minor GC
    • Linux 5.2 debug aborted with Fatal error: allocation failure during minor GC
    • MinGW 5.2 exited with code -1073741819
    • MinGW bytecode 5.2 exited with code -1073741819
    • macOS-ARM64 5.2 failed with a segfault
    • macOS-intel 5.2 got signal BUS
    • freebsd-amd64-5.2 failed with a segfault
  • 3 Cygwin/MinGW trunk workflows failed with a version mismatch after the 5.3 branching
    • Cygwin trunk
    • MinGW bytecode trunk
    • MinGW trunk
  • Linux trunk debug failed with runtime/shared_heap.c; line 1392 ### Assertion failed: local->stats.pool_live_words == pool_stats.live [ocaml5-issue] Assertion failure on live words in GC test #470

Out of 33 workflows 15 failed with 12 genuine issues and 3 ci-setup issues

@jmid
Copy link
Collaborator Author

jmid commented Aug 29, 2024

I removed the stress test, as the positive parallel test is already stress testing.
I've also rebased based on #471 which should take care of the MinGW+Cygwin version mismatching.

I still expect the 5.2 workflows to trigger ocaml/ocaml#13370 (unsure whether the cmd should be disabled under 5.2 testing 🤔 )

@jmid
Copy link
Collaborator Author

jmid commented Sep 3, 2024

CI summary for 9ef90b5:

  • 7 5.2 workflows failed as expected due to the Gc test
    • 32bit 5.2 failed the parallel STM Gc test with Allocated_bytes : -7.47499188671e+196
    • Bytecode 5.2 aborted with Fatal error: allocation failure during minor GC
    • Cygwin 5.2 aborted with Fatal error: allocation failure during minor GC
    • FP 5.2 aborted with Fatal error: allocation failure during minor GC
    • MinGW 5.2 failed with Fatal error: allocation failure during minor GC
    • macOS-intel 5.2 failed with BUS error
    • linux-s390x-5.2 - aborted with Fatal error: allocation failure during minor GC
  • 3 debug runtime runs failed with an assertion error:
    • Linux 5.2 debug aborted with runtime/shared_heap.c; line 1392 ### Assertion failed: local->stats.pool_live_words == pool_stats.live
    • Linux 5.3 debug failed with runtime/shared_heap.c; line 1392 ### Assertion failed: local->stats.pool_live_words == pool_stats.live
    • Linux trunk debug failed with runtime/shared_heap.c; line 1392 ### Assertion failed: local->stats.pool_live_words == pool_stats.live

Out of 45 workflows 10 failed, all with genuine issues

@jmid
Copy link
Collaborator Author

jmid commented Sep 3, 2024

CI summary for 6b2669b

  • 10 5.2 workflows failed as expected due to the Gc test [ocaml5-issue] Gc.counters unsafe root registration #474
    • 32bit 5.2 failed STM Gc test parallel with a negative allocated_bytes
    • Cygwin 5.2 aborted with Fatal error: allocation failure during minor GC
    • FP 5.2 aborted with Fatal error: allocation failure during minor GC
    • Linux 5.2 debug aborted with Fatal error: allocation failure during minor GC
    • MinGW bytecode 5.2 failed with Fatal error: allocation failure during minor GC
    • macOS-ARM64 5.2 failed with signal BUS
    • macOS-intel 5.2 failed with signal BUS
    • linux-arm64-5.2 aborted with Fatal error: allocation failure during minor GC
    • linux-s390x-5.2 aborted with Fatal error: allocation failure during minor GC
    • freebsd-amd64-5.2 aborted with Fatal error: allocation failure during minor GC
  • 2 debug runtime workflows failed with an assertion error [ocaml5-issue] Assertion failure on live words in GC test #470
    • Linux 5.3 debug failed with runtime/shared_heap.c; line 1392 ### Assertion failed: local->stats.pool_live_words == pool_stats.live
    • Linux trunk debug failed with runtime/shared_heap.c; line 1392 ### Assertion failed: local->stats.pool_live_words == pool_stats.live
  • linux-ppc64le-5.2 found an unexpected STM Sys test parallel counterexample Unexpected STM Sys parallel test counterexample on s390x and ppc64le #466

Out of 45 workflows 13 failed with with 12 genuine issues and 1 false alarm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant