Code Monkey home page Code Monkey logo

Comments (15)

drahnr avatar drahnr commented on June 11, 2024 1

It turns out it only happens when run with a directory as argument, not a single file, single files don't trigger it. -j1 also does not trigger it. I run it on a 64 threads machine. It doesn't popup when using -vvvvv

from cargo-spellcheck.

drahnr avatar drahnr commented on June 11, 2024 1

RUST_BACKTRACE=1 cargo-spellcheck --cfg=../../../spellcheck/era.cfg --code 1 zksync-era/core/lib/multivm/src/versions/vm_m6/tests/bootloader.rs fails reproducibly

from cargo-spellcheck.

drahnr avatar drahnr commented on June 11, 2024 1

Re-opening, it's not acceptable for cargo-spellcheck to crash and burn on a stray space.

from cargo-spellcheck.

drahnr avatar drahnr commented on June 11, 2024

Could you share the repository in question with me? Otherwise I'd recommend to find the particular file in question by running spell check on each file

from cargo-spellcheck.

dutterbutter avatar dutterbutter commented on June 11, 2024

@drahnr repo is: zksync-era

branch: dutterbutter-pla-646-add-spelling-linter-for-zksync-era-core-part-2

from cargo-spellcheck.

dutterbutter avatar dutterbutter commented on June 11, 2024

@drahnr alright I seem to have narrowed it down but I still don't see what is causing the crash in order for me to fix it. The issue is specifically when I run:

cargo spellcheck -vvv --cfg=../../../spellcheck/era.cfg . in this directory: https://github.com/matter-labs/zksync-era/tree/main/core/lib/multivm

However, if I run cargo-spellcheck inside each of the nested directories it does not crash?

Running with -vvv I see this now:

[2023-12-06T01:54:05Z DEBUG hunspell] Errorfunctionsel --{suggest}--> ["Perfunctorily"]
[2023-12-06T01:54:05Z INFO  cargo_spellcheck::action] ✅ /Users/dustinbrickwood/Documents/dev/zk/zksync-era/core/lib/multivm/src/interface/types/errors/vm_revert_reason.rs
[2023-12-06T01:54:05Z DEBUG hunspell] stopreasonVmExec --{suggest}--> []
[2023-12-06T01:54:05Z DEBUG hunspell] Ocallstackdepth --{suggest}--> []
The application panicked (crashed).
Message:  assertion failed: plain_range.start <= plain_range.end
Location: /Users/dustinbrickwood/.cargo/registry/src/index.crates.io-6f17d22bba15001f/doc-chunks-0.0.5/src/markdown.rs:363

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
[2023-12-06T01:54:05Z DEBUG hunspell] VmTracer --{suggest}--> []

Again, I don't see the issue but it could be staring at me in the face.

from cargo-spellcheck.

drahnr avatar drahnr commented on June 11, 2024

c4dc1e1d5b0e88cf22679aea46287b5725fcc9bc of the mentioned repo with your given command works for me using cargo-spellcheck 0.13.1 (or latest git).

I need a lot more context to dig into this. OS, version, git sha, the first lines of the cargo-spellcheck output to see your local options. Could you run with -j1.

from cargo-spellcheck.

dutterbutter avatar dutterbutter commented on June 11, 2024

Thanks @drahnr

Relevant info:

OS: MacOs 14.1.1 (Sonoma)
Git Sha: 878fd2d
Cargo-spellcheck version: cargo-spellcheck 0.13.1

As soon as I run cargo spellcheck --cfg=./spellcheck/era.cfg --code 1 I receive the panic so there is no output other than the provided error message.

I will try to run on a linux machine to see if its specific to my environment.

from cargo-spellcheck.

dutterbutter avatar dutterbutter commented on June 11, 2024

Also crashes on linux / CI :(

CI Job: https://github.com/dutterbutter/zksync-era/actions/runs/7116055857/job/19373574987?pr=2

It also seems to crash at different parts.

from cargo-spellcheck.

drahnr avatar drahnr commented on June 11, 2024

Your branch does trigger it, main does not.

from cargo-spellcheck.

drahnr avatar drahnr commented on June 11, 2024

It's src/vm_instance.rs that triggers it.

from cargo-spellcheck.

dutterbutter avatar dutterbutter commented on June 11, 2024

@drahnr thanks for investigating. Truly appreciate it.

Can you elaborate on "-j1 also does not trigger it". When I run it with cargo spellcheck --cfg=./spellcheck/era.cfg --code 1 -j1 it still triggers a panic. I also tried running on 16 vCPU | 64 GB runner and it still triggered a panic.

CI reference: https://github.com/dutterbutter/zksync-era/actions/runs/7117204624/job/19377403555?pr=2
Workflow with command mentioned: https://github.com/dutterbutter/zksync-era/actions/runs/7117204624/workflow?pr=2#L25

from cargo-spellcheck.

drahnr avatar drahnr commented on June 11, 2024

There is a space in line 328 in that file, after that the code is interpreted as text. Once that space is removed everything is fine. I'd recommend to comment out the mod bootloader; rather than commenting the entire file. cargo-spellcheck walks the module declration tree.
However, this is not a good reason for cargo-spellcheck to crash. It should never, regardless of input.

from cargo-spellcheck.

dutterbutter avatar dutterbutter commented on June 11, 2024

Thank you very much for your support here. Top notch for OS ❤️ Let me test on my side and then I can close accordingly.

from cargo-spellcheck.

dutterbutter avatar dutterbutter commented on June 11, 2024

👏 Thanks! Solves the issue as you described it.

from cargo-spellcheck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.