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

Debugger deadlock when resolving variables inside Inspect protocol implementation #903

Closed
lukaszsamson opened this issue Jun 3, 2023 · 0 comments · Fixed by #939
Closed

Comments

@lukaszsamson
Copy link
Collaborator

lukaszsamson commented Jun 3, 2023

Break on IO.puts

defimpl Inspect, for: MySchema do
  def inspect(term, opts) do
    IO.puts(term)
    []
  end
end

We used inspect when checking out variables. It probably leads to a deadlock somewhere. The same does not happen for Enumerable and custom protocol implementations

@lukaszsamson lukaszsamson changed the title Debugger times out when resolving variables inside protocol implementation Debugger deadlock when resolving variables inside Inspect protocol implementation Jul 10, 2023
lukaszsamson added a commit that referenced this issue Jul 11, 2023
Disallow setting breakpoints in Inspect protocol implementations
Disallow setting breakpoints in builtin protocols and JasonV.Encoder protocol
Fixes #900
Fixes #903
Fixes #942
lukaszsamson added a commit that referenced this issue Jul 11, 2023
* break in all protocol implementations

* test unsetting implementation breakpoint

* add test

* implement fallback to runtime modules inspection

* more tests and logs

* cache module_info of interpreted modules

call to module_info may deadlock when stopped on a breakpoint
Fixes #940

* format

* Handle errors in setting breakpoints

Disallow setting breakpoints in Inspect protocol implementations
Disallow setting breakpoints in builtin protocols and JasonV.Encoder protocol
Fixes #900
Fixes #903
Fixes #942
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 a pull request may close this issue.

1 participant