gno icon indicating copy to clipboard operation
gno copied to clipboard

test(bug): txtar to reproduce node crash on inserting many posts

Open jefft0 opened this issue 6 months ago • 1 comments

This txtar uses r/demo/boards to create a new board and post. Then it runs a script to add 200 replies (inserting into the avl.Tree). To run the test:

go test -v -count=1 ./gno.land/pkg/integration --run TestTestdata/many_inserts_stack_overflow

This should succeed. (There is enough gas.) But it crashes the node. (When I run the script in a terminal with gnokey and a gnoland node, it crashes with "fatal error: stack overflow".) See the gist with the stack dump.

As the txtar says, if it only adds 100 replies then it succeeds.

NOTE: This PR also has a commit with the fix in https://github.com/gnolang/gno/pull/4398 to allow maketx run to call a crossing function. When that PR is merged, this commit will be removed from this PR.

jefft0 avatar Jun 25 '25 07:06 jefft0

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • [ ] IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🟢 Maintainers must be able to edit this pull request (more info) 🟢 Pending initial approval by a review team member, or review from tech-staff

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: jefft0/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Pending initial approval by a review team member, or review from tech-staff

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)

Then

🟢 Requirement satisfied
└── 🟢 If
    ├── 🟢 Condition
    │   └── 🟢 Or
    │       ├── 🔴 At least one of these user(s) reviewed the pull request: [jefft0 leohhhn n0izn0iz notJoon omarsy x1unix] (with state "APPROVED")
    │       ├── 🟢 At least 1 user(s) of the team tech-staff reviewed pull request
    │       └── 🔴 This pull request is a draft
    └── 🟢 Then
        └── 🟢 And
            ├── 🟢 Not (🔴 This label is applied to pull request: review/triage-pending)
            └── 🟢 At least 1 user(s) of the team tech-staff reviewed pull request

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

Gno2D2 avatar Jun 25 '25 07:06 Gno2D2

This other PR could also address your issue more effectively: https://github.com/gnolang/gno/pull/4435 (preferred)

moul avatar Jul 01 '25 11:07 moul

This other PR could also address your issue more effectively: #4435 (preferred)

Yes, it works for me. When #4435 is merged, I'll update this PR.

jefft0 avatar Jul 01 '25 11:07 jefft0

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests.

:loudspeaker: Thoughts on this report? Let us know!

codecov[bot] avatar Jul 01 '25 15:07 codecov[bot]

@Kouteki

We should open an issue on this, mission critical

zivkovicmilos avatar Aug 07 '25 09:08 zivkovicmilos

#4302 is the first step fix, will complete this issue with a following one.

ltzmaxwell avatar Aug 07 '25 11:08 ltzmaxwell

After https://github.com/gnolang/gno/pull/4302 is merged, @jefft0 to update the PR.

Kouteki avatar Sep 02 '25 12:09 Kouteki

PR https://github.com/gnolang/gno/pull/4302 fixes the bug and also includes this txtar as a regression test. Closing as completed by that PR.

jefft0 avatar Sep 03 '25 07:09 jefft0