Skip to content

Infinite Loop on Self-Negating Recursive Definition Without Feedback or Timeout #28

@LEARNTAU

Description

@LEARNTAU
  1. Summary

    • Description: When defining a recursive function such that a call refers to its own negation, Tau enters what seems to be an infinite normalization loop with 100% CPU usage. The REPL becomes unresponsive, and there's no output or way to interrupt the evaluation.
  2. Environment

    • Tau Version: for now "v0.7-alpha (e7e7ab9)"
    • Build Number or Date:
    • Operating System: Ubuntu
  3. Steps to Reproduce
    Step 1: g[0](y) := 0
    Step 2: g[n](y) := g[n](y)'
    Step 3: n g[5](1)

    Expected Result
    Tau should either:

  • Detect self-referential

  • Abort normalization after a timeout

  • Provide a warning about non-terminating behavior

  • Allow the user to interrupt execution

    Actual Result

  • Tau becomes unresponsive

  • No error or feedback is given

  • CPU spikes to 100%

  • User cannot break or cancel the operation via REPL input

  1. Additional Information
    • Screenshots:

Image

  1. Severity and Impact
    Severity Level:*
  • Impact on System Stability (High): It causes the REPL to hang indefinitely and maxes out CPU. That’s a serious impact on usability. On large-scale deployments or future integrations (like APIs or real-time environments), this could crash processes or hog system resources.

  • Ease of Triggering (Very Easy): A user just has to define a self-negating function. No deep knowledge required. This makes it potentially abusable by bad actors or just accidental by curious users.

  • Frequency (Occasional but probable): Not everyone will write self-negating functions, but it's a kind of mistake that an experimental or beginner user could make easily, especially when playing with recursive definitions.

  • Visibility / Feedback (Very Low): No error message, no warning, no timeout, no way to cancel. This makes the problem feel like a freeze or crash, even though the system is just stuck in a logical loop.

  • Security Concern (Optional) Medium: While it’s not a security bug per se, it could be used as a vector for resource exhaustion. If the REPL were exposed in a web service or future TauNet node, attackers could overload it with such queries.

Impact on Work:

  • Degrades user experience
  • Risk of unintentional infinite loops
  • Possible vector for DoS-like attacks

Suggested Improvements:

  • Add loop detection or termination heuristics
  • Implement a timeout or resource cap
  • Allow interrupt commands in REPL (e.g., Ctrl+C or :cancel)
  • Provide real-time feedback during long evaluations
  1. Workaround (if applicable)

    • Tell us if you found a way around this problem:
  2. Contact Information

Submission Instructions

  • Make sure to attach any input files to this bug report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions