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 30 commits into
base: main
Choose a base branch
from
Open

Add gc tests #469

wants to merge 30 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

@jmid
Copy link
Collaborator Author

jmid commented Sep 25, 2024

CI summary for e9c9a6a

  • all 3 Linux debug runs aborted 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
    • Linux 5.2 debug
    • Linux 5.3 debug
    • Linux trunk debug
  • linux-s390x-5.2 failed STM Gc test parallel with a quick_stat output mismatch

Out of 45 workflows 4 failed with genuine issues

@jmid
Copy link
Collaborator Author

jmid commented Sep 25, 2024

CI summary for 6c1252f

Out of 45 workflows 14 failed with 13 genuine issues and 1 CI infrastructure issue.
The macOS-ARM64 5.3 crash is disturbing.
fd0a3fd should address the pagesize rounding... 🤞

@jmid
Copy link
Collaborator Author

jmid commented Sep 25, 2024

CI summary for fd0a3fd:

  • 3 Linux debug workflows 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
    • Linux 5.2, 5.3, trunk debug
  • 4 MSVC workflows failed to compile due to a header issue fatal error C1189: #error: "No Target Architecture"
    • MSVC 5.3, trunk
    • MSVC bytecode 5.3, trunk

Out of 45 workflows, 3 failed with a genuine error and 4 due to a buggy Windows header in the test-suite.
1ebdda4 should address that, leaving only genuine errors.

Note to self: Having removed v=0 in debug mode triggers v=63 and adds a bit of noise to the logs for the Gc test...

@jmid
Copy link
Collaborator Author

jmid commented Sep 27, 2024

CI summary for 1ebdda4:

Out of 45 workflows 4 failed - all with genuine issues

@jmid
Copy link
Collaborator Author

jmid commented Sep 30, 2024

CI summary for e5b93d3

  • 3 32bit workflows all segfaulted in STM implicit Gc stress test parallel or STM implicit Gc test parallel
    • 32bit 5.2, 5.3, trunk
  • 3 Linux debug workflows aborted STM Gc stress test parallel with ### Assertion failed: local->stats.pool_live_words == pool_stats.live
    • 5.2, 5.3, trunk debug
    • In addition, Linux 5.2 debug also failed STM implicit Gc test parallel with a negative allocated_bytes result
  • macOS-ARM64 trunk segfaulted in STM Gc stress test parallel

Out of 45 workflows 7 failed all with genuine errors

@jmid
Copy link
Collaborator Author

jmid commented Sep 30, 2024

CI summary for 6a86f20

Out of 45 workflows, 11 failed with 9 genuine issues, 1 CI timeout, and 1 false alarm

@jmid
Copy link
Collaborator Author

jmid commented Oct 23, 2024

I've just pushed to trigger a fresh run, now that #13553 has been merged to trunk and cherry-picked to 5.3.

In other news, I've investigated the previously observed FreeBSD 5.2 crash.
This was easy to reproduce, but turned out to be a known one, namely db586e0b27 - Merge pull request #13370 from DemiMarie/fix-missing-gc-rule

@jmid
Copy link
Collaborator Author

jmid commented Oct 23, 2024

CI summary for 4a93462:

Out of 41 workflows, 4 failed - all with genuine issues 🎉

(For some reason, the force push didn't trigger multicoretests-ci's four 5.2.0 workflows)

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