Comments (14)
ah shoot, someone added that feature flag and forgot to add it to TALA plugin. i'm going to release a hotfix for that. thank you for surfacing. cc @gavin-ts
from tala.
i'm going to release a hotfix for that. thank you for surfacing.
No problem.
Testing with TALA v0.3.1 (which includes the hotfix for the container self-loop edges) seems to indicate that it is much more stable now. I have not encountered any Timed out: EdgeRouting
or Reached a bad state
errors so far. I do still occasionally encounter the panic issue. Once the panic is resolved, I think we can close this issue.
from tala.
@orange-buffalo just did a new release! should be able to set timeout now with the latest D2 (might have to wait a bit for package managers like homebrew to pick it up) and latest TALA
d2 --timeout 200 large.d2
to increase from 120s to 200s
from tala.
@jamestiotio sorry for the late reply, been busy getting new TALA release out. Can you try again with the diagram you tried with? it should be faster now. also if you get a panic, would love to get a few more lines of the stack trace (to get to a line number).
from tala.
Sure, I have attached this file that contains the complete logs when I encountered the panic. I managed to reproduce the panic using d2 v0.2.1 and TALA v0.3.0.
It seems that only the last part of the logs is relevant:
err: 2023-02-25 06:32:35.536 [INFO] (default) <./tala\pipeline.go:537> (*Pipeline).RunAllStages finished stage {"stage": "AlignAxes", "time_ms": 249}
err: 2023-02-25 06:32:35.536 [WARN] (default) <./..\..\..\..\oss.terrastruct.com\d2\lib\log\log.go:31> from missing slog.Logger in context, see lib/log.With ...
err: "stack": goroutine 10 [running]:
err: runtime/debug.Stack()
err: runtime/debug/stack.go:24 +0x65
err: oss.terrastruct.com/d2/lib/log.from({0x1f31680, 0xc0001dac00})
err: oss.terrastruct.com/[email protected]/lib/log/log.go:31 +0x128
err: oss.terrastruct.com/d2/lib/log.Debug({0x1f31680, 0xc0001dac00}, {0x1411ffe, 0x11}, {0xc0005b9a28, 0x1, 0x1})
err: oss.terrastruct.com/[email protected]/lib/log/log.go:52 +0x7b
err: github.com/terrastruct/src/backend/tala.(*Pipeline).RunAllStages(0xc0000b6c30, {0x1f31680, 0xc0001dac00})
err: github.com/terrastruct/src/backend/tala/pipeline.go:507 +0x21b
err: github.com/terrastruct/src/backend/tala.Autolayout({0x1f31680, 0xc0001dac00}, 0x118f7dd?, 0xc0004a5ef0?, 0x0?, 0x39?, 0x68?)
err: github.com/terrastruct/src/backend/tala/pipeline.go:558 +0x11b
err: github.com/terrastruct/src/backend/tala.AutolayoutLocal({0x1f31680, 0xc0001dac00}, 0x13f75c6?, 0x4?, 0x0?, 0xc0005b5d28?)
err: github.com/terrastruct/src/backend/tala/pipeline.go:603 +0x1d5
err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler.Layout({0x1f31610, 0xc000d4b600}, 0xc0005b5db0?, 0x1?)
err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler/d2transpiler.go:162 +0x376
err: main.talaPlugin.Layout({0xc000e411d0?, 0xc000d48688?}, {0x1f31610?, 0xc000d4b600?}, 0x0?)
err: github.com/terrastruct/src/backend/tala/cmd/d2plugin-tala/plugin_tala.go:161 +0x12c
err: oss.terrastruct.com/d2/d2plugin.layout({0x1f31610, 0xc000d4b600}, {0x1f32f40, 0xc000e6cdb0}, 0xc000086480)
err: oss.terrastruct.com/[email protected]/d2plugin/serve.go:106 +0xb5
err: oss.terrastruct.com/d2/d2plugin.Serve.func1({0x1f31610, 0xc000d4b600}, 0xc000086480)
err: oss.terrastruct.com/[email protected]/d2plugin/serve.go:56 +0x2e5
err: oss.terrastruct.com/util-go/xmain.(*State).Main.func1()
err: oss.terrastruct.com/[email protected]/xmain/xmain.go:91 +0x71
err: created by oss.terrastruct.com/util-go/xmain.(*State).Main
err: oss.terrastruct.com/[email protected]/xmain/xmain.go:89 +0x155
err: panic: runtime error: invalid memory address or nil pointer dereference
err: [signal 0xc0000005 code=0x0 addr=0x78 pc=0x117c617]
err:
err: goroutine 10 [running]:
err: github.com/terrastruct/src/backend/tala.(*Node).getContainer(...)
err: github.com/terrastruct/src/backend/tala/node.go:3432
err: github.com/terrastruct/src/backend/tala.(*Node).reduceGapToNeighbors(0xc000926e40, {0x1f31680?, 0xc0001dac00}, 0x1, 0x0, 0x1)
err: github.com/terrastruct/src/backend/tala/gapreduction.go:332 +0x10d7
err: github.com/terrastruct/src/backend/tala.Nodes.GapNormalization.func2()
err: github.com/terrastruct/src/backend/tala/gapreduction.go:39 +0x36
err: github.com/terrastruct/src/backend/tala.(*Transaction).Commit(0xc0005d34a0, {0x280fd20?, 0xc000926e40?})
err: github.com/terrastruct/src/backend/tala/transaction.go:237 +0x97
err: github.com/terrastruct/src/backend/tala.Nodes.GapNormalization({0xc000b725a0?, 0x2, 0xc001006948?}, {0x1f31680?, 0xc0001dac00?}, 0x1, 0x0,
0xc0002426c0)
err: github.com/terrastruct/src/backend/tala/gapreduction.go:42 +0x2d2
err: github.com/terrastruct/src/backend/tala.(*Pipeline).GapNormalizationStage.func1({0xc000b725a0, 0x2, 0x2}, 0xd0?)
err: github.com/terrastruct/src/backend/tala/pipeline.go:199 +0x8a
err: github.com/terrastruct/src/backend/tala.(*Pipeline).GapNormalizationStage(0xc0000b6c30, {0x1f31680?, 0xc0001dac00?})
err: github.com/terrastruct/src/backend/tala/pipeline.go:208 +0x18f
err: github.com/terrastruct/src/backend/tala.(*Pipeline).RunAllStages(0xc0000b6c30, {0x1f31680, 0xc0001dac00})
err: github.com/terrastruct/src/backend/tala/pipeline.go:510 +0x25f
err: github.com/terrastruct/src/backend/tala.Autolayout({0x1f31680, 0xc0001dac00}, 0x118f7dd?, 0xc0004a5ef0?, 0x0?, 0x39?, 0x68?)
err: github.com/terrastruct/src/backend/tala/pipeline.go:558 +0x11b
err: github.com/terrastruct/src/backend/tala.AutolayoutLocal({0x1f31680, 0xc0001dac00}, 0x13f75c6?, 0x4?, 0x0?, 0xc0005b5d28?)
err: github.com/terrastruct/src/backend/tala/pipeline.go:603 +0x1d5
err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler.Layout({0x1f31610, 0xc000d4b600}, 0xc0005b5db0?, 0x1?)
err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler/d2transpiler.go:162 +0x376
err: main.talaPlugin.Layout({0xc000e411d0?, 0xc000d48688?}, {0x1f31610?, 0xc000d4b600?}, 0x0?)
err: github.com/terrastruct/src/backend/tala/cmd/d2plugin-tala/plugin_tala.go:161 +0x12c
err: oss.terrastruct.com/d2/d2plugin.layout({0x1f31610, 0xc000d4b600}, {0x1f32f40, 0xc000e6cdb0}, 0xc000086480)
err: oss.terrastruct.com/[email protected]/d2plugin/serve.go:106 +0xb5
err: oss.terrastruct.com/d2/d2plugin.Serve.func1({0x1f31610, 0xc000d4b600}, 0xc000086480)
err: oss.terrastruct.com/[email protected]/d2plugin/serve.go:56 +0x2e5
err: oss.terrastruct.com/util-go/xmain.(*State).Main.func1()
err: oss.terrastruct.com/[email protected]/xmain/xmain.go:91 +0x71
err: created by oss.terrastruct.com/util-go/xmain.(*State).Main
err: oss.terrastruct.com/[email protected]/xmain/xmain.go:89 +0x155
from tala.
Additionally, it seems that a diagram that was successfully generated on older TALA versions (tested on v0.2.15) can fail to compile on v0.3.0 of TALA with the following error:
err: failed to compile: Connection "empty.(not_present -> not_present)[0]" is a self loop on a container, but layout engine "tala" does not support this.
The empty.not_present
node and self-connection are declared as such:
empty.not_present: not_present {
ex: |`txt
Mucho texto.
`|
}
empty.not_present -> empty.not_present: |`md
Stay in this state if blablabla...
`|
This is strange since using only the above declaration works (as demonstrated here), but in the context of additional nodes and connections present in a large diagram such as mine, it fails.
from tala.
With d2 v0.4.2 and TALA v0.3.7 I am facing a similar issue on a fairly complex graph. The output and the failure is:
info: compiling & running layout algorithms...
info: compiling & running layout algorithms...
info: compiling & running layout algorithms...
info: compiling & running layout algorithms...
err: failed to compile: exit status 1
err: stderr:
err: 2023-05-22 07:22:22.496 [WARN] (default) <./../../../../oss.terrastruct.com/d2/lib/log/log.go:31> from missing slog.Logger in context, see lib/log.With ...
...
err: 2023-05-22 07:22:22.496 [INFO] (default) <./tala/pipeline.go:548> (*Pipeline).RunAllStages finished stage {"stage": "Prescale", "time_ms": 0}
err: 2023-05-22 07:22:22.496 [INFO] (default) <./tala/pipeline.go:548> (*Pipeline).RunAllStages finished stage {"stage": "Prescale", "time_ms": 0}
err: 2023-05-22 07:22:22.496 [INFO] (default) <./tala/pipeline.go:548> (*Pipeline).RunAllStages finished stage {"stage": "Prescale", "time_ms": 0}
err: 2023-05-22 07:22:22.497 [INFO] (default) <./tala/pipeline.go:548> (*Pipeline).RunAllStages finished stage {"stage": "PreprocessSequences", "time_ms": 0}
err: 2023-05-22 07:22:41.373 [INFO] (default) <./tala/pipeline.go:548> (*Pipeline).RunAllStages finished stage {"stage": "NodePlacement", "time_ms": 18850}
err: 2023-05-22 07:22:41.569 [INFO] (default) <./tala/pipeline.go:548> (*Pipeline).RunAllStages finished stage {"stage": "NodePlacement", "time_ms": 19046}
err: "stack": goroutine 49 [running]:
err: runtime/debug.Stack()
err: runtime/debug/stack.go:24 +0x65
err: oss.terrastruct.com/d2/lib/log.from({0x2492210, 0xc0015bb440})
err: oss.terrastruct.com/[email protected]/lib/log/log.go:31 +0x108
err: oss.terrastruct.com/d2/lib/log.Debug({0x2492210, 0xc0015bb440}, {0x16b70c2, 0x11}, {0xc0008d9a78, 0x1, 0x1})
err: oss.terrastruct.com/[email protected]/lib/log/log.go:52 +0x7b
err: github.com/terrastruct/src/backend/tala.(*Pipeline).RunAllStages(0xc0000aa050, {0x2492210, 0xc0015bb440})
err: github.com/terrastruct/src/backend/tala/pipeline.go:518 +0x21b
err: github.com/terrastruct/src/backend/tala.Autolayout({0x2492210, 0xc0015bb440}, 0x1630340?, 0xa9f7?, 0x98?, 0x89?, 0x9a?)
err: github.com/terrastruct/src/backend/tala/pipeline.go:569 +0x11b
err: github.com/terrastruct/src/backend/tala.AutolayoutLocal({0x2492210, 0xc0015bb440}, 0x0?, 0x0?, 0x0?, 0x0?)
err: github.com/terrastruct/src/backend/tala/pipeline.go:614 +0x1d5
err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler.RaceSeeds.func1(0x2, 0x3)
err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler/d2transpiler.go:287 +0x5d6
err: created by github.com/terrastruct/src/backend/tala/transpilers/d2transpiler.RaceSeeds
err: github.com/terrastruct/src/backend/tala/transpilers/d2transpiler/d2transpiler.go:257 +0x28f
err: err: Timed out: Autolayout
from tala.
@orange-buffalo would you mind sending me the D2 for that for us to investigate? [email protected] if you prefer email
from tala.
@alixander, sent via email, hopefully it does not end up in the spam folder :)
from tala.
@alixander, is there anything else we can provide to help with the investigation? We are currently evaluating TALA to support our architecture diagrams, and this issue is a blocker for us.
from tala.
oh we actually did fix this but just haven't done a release. will cut one today and email you when it's out @orange-buffalo
from tala.
Thanks @alixander! I've tested v0.3.8, but it fails with the same Timed out: Autolayout
exception. The diagram has evolved since the last two weeks, I am sending a new version via email.
from tala.
@alixander, with v0.3.9 we still observe timeouts on our diagram. Any chance to have a timeout configuration so we could set it is get the diagram generated, even if it takes more time?
from tala.
Thank you @alixander! We now have it generated successfully.
from tala.
Related Issues (20)
- all else equal, prefer lining up opposite side connections HOT 1
- manual: Add instructions to test everything is working
- routing for grid edges
- direction on edges HOT 1
- Include grid edges in manual
- `shape: hierarchy` to force hierarchy
- failed to verify $TSTRUCT_TOKEN: illegal base64 data at input byte 5 HOT 4
- explain perpetual fallback license more
- allow `width`/`height` to be set on root
- tala layout could be more symmetrical in comparison to elk for this scenario
- edges labels should prefer intersecting nodes than other edges
- Unexpected behavior when using `grid-column`
- failed to compile: plugin has routing feature but does not implement RoutingPlugin HOT 3
- Please don't recommend to use this layout engine if it's not a one-line install... HOT 1
- manual: mention routing grid edges
- label should automatically move away from icons
- rearrange edges to prefer sorting by appearance
- Tala error with connection between two sequence diagrams HOT 1
- when token expires and used as environment variable, attempt refresh and print to tty
- edges can go through `opacity: 0` objects HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tala.