Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Bug] waitForTraceRotue reset does not do what is intended #784

Copy link
Copy link
@grleblanc

Description

@grleblanc
Issue body actions

We have code that performs traceroutes to various nodes (with respect to mesh load, etc). After running our service for any period of time, we see the below error.

Exception:

  File "/usr/local/lib/python3.13/site-packages/meshtastic/mesh_interface.py", line 652, in sendTraceRoute
    self.waitForTraceRoute(waitFactor)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/meshtastic/mesh_interface.py", line 1011, in waitForTraceRoute
    success = self._timeout.waitForTraceRoute(waitFactor, self._acknowledgment)
  File "/usr/local/lib/python3.13/site-packages/meshtastic/util.py", line 229, in waitForTraceRoute
    self.reset()
    ~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/meshtastic/util.py", line 203, in reset
    self.expireTime = time.time() + self.expireTimeout
                      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
OverflowError: int too large to convert to float

Upon printing out the self.expireTimeout value, I can see it continuously increase by a factor of 10 every time we perform a traceroute.

Looking at the code, the reset() method only resets the self.expireTime and not the self.expireTimeout that is being increased by a factor of waitFactor

    def reset(self) -> None:
        """Restart the waitForSet timer"""
        self.expireTime = time.time() + self.expireTimeout
    def waitForTraceRoute(self, waitFactor, acknowledgment, attr="receivedTraceRoute") -> bool:
        """Block until traceroute response is received. Returns True if traceroute response has been received."""
        self.expireTimeout *= waitFactor

If I manually edit the file and set self.expireTimeout to 20 it fixes the problem.

I wanted to make a issue first to confirm this is an issue and discuss posible solutions before making a PR.

Cheers!

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.