Skip to content

Recursive call after rename to (*PeerState).MarshalJSON  #863

Closed

Description

@mmsqe

Bug Report

Setup

CometBFT version: v0.34.28

What happened?

No new block when config as debug log_level.

Anything else we need to know

This issue was introduced in 587bc0b, when debug logger calls MarshalJSON, double lock happens.

Activity

  1. added
    bug
    needs-triage
    on May 21, 2023
  2. adizere commented on May 22, 2023

    @adizere
    Contributor

    Thanks for opening the issue and PR! We'll confirm this soon and review your PR. cc @mark-rushakoff

  3. added this to the 2023-Q2 milestone on May 22, 2023
  4. moved this from Todo to In Progress in CometBFT 2023on May 22, 2023
  5. self-assigned this
    on May 31, 2023
  6. cason commented on Jun 12, 2023

    @cason

    This issue was introduced in 587bc0b, when debug logger calls MarshalJSON, double lock happens.

    This is actually more than that, as the error is reproduced in test units. It looks more like an infinite loop when marshalling to JSON.

  7. mmsqe commented on Jun 12, 2023

    @mmsqe
    ContributorAuthor

    This is actually more than that, as the error is reproduced in test units. It looks more like an infinite loop when marshalling to JSON.

    Since cmtjson.Marshal inside MarshalJSON of PeerState trigger itself again which implements JSONMarshaler interface, it causes recursive call.

  8. removed
    needs-triage
    on Jun 14, 2023
  9. moved this from In Progress to Ready for Review in CometBFT 2023on Jun 14, 2023
  10. moved this from Ready for Review to Done in CometBFT 2023on Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions