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

Hang in the cusp neighbourhood code #11

Open
unhyperbolic opened this issue Jan 20, 2020 · 5 comments
Open

Hang in the cusp neighbourhood code #11

unhyperbolic opened this issue Jan 20, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@unhyperbolic
Copy link
Member

Reported hang by Saul Schleimer:

sage: sig = 'nLLzLMAPAkcdchfghjkjklmmhsrsbwgarbgahr'
sage: M = snappy.Manifold(sig)
sage: C = M.cusp_neighborhood()
sage: C.set_tie(0, 2)

@unhyperbolic unhyperbolic self-assigned this Jan 20, 2020
@unhyperbolic unhyperbolic added the bug Something isn't working label Jan 20, 2020
@unhyperbolic
Copy link
Member Author

unhyperbolic commented Jan 20, 2020

Nathan also observed the following failure:

M = Manifold('nLLzLMAPAkcdchfghjkjklmmhsrsbwgarbgahr')
C = M.cusp_neighborhood()
C.set_displacement(C.get_displacement(which_cusp=0), which_cusp=0)

@unhyperbolic
Copy link
Member Author

5755f76
is avoiding the hang, but ideally, we would make this code fail less.

@NathanDunfield
Copy link
Member

is avoiding the hang, but ideally, we would make this code fail less.

It would be nice if we could reproduce the problem outside of the context of cusp_neighborhood. As I understand the traceback, the uFatalError is generated after a call to proto_canonize returns func_failed. But M.canonize(), which simply calls proto_canonize, doesn't give an error with Saul's triangulation. But maybe cusp_neighborhood changes the relevant cusp sizes used to define "canonical" in this setting.

In my example, the error message is somewhat different:

SnapPeaFatalError: SnapPea crashed in function remove_edge_of_order_one(), defined in simplify_triangulation.c.

I guess possibly the fatal error message has been overwritten by later calls to uFatalError. Perhaps to figure this out we need to have uFatalError generate a SEGFAULT so we can poke around at the C level with a debugger.

@culler
Copy link
Member

culler commented Jan 21, 2020 via email

@unhyperbolic
Copy link
Member Author

FYI, I checked in a change to uFatalError a couple of weeks ago so that a later error no longer overwrites the first error.
As for getting stack traces: it saddens me that dumping a stack trace is not standard in libc or libc++ and requires some platform dependent code (see, e.g., https://github.com/PixarAnimationStudios/USD/blob/master/pxr/base/lib/arch/stackTrace.cpp#L1311). I would love for uFatalError to raise a python exception that includes a stack trace either as extra data or folded into the traceback object associated with the python exception.

Another thought: I wonder whether we should change the signature of M.canonize to possibly include a list of cusp areas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants