Skip to content

[Bug]: Lots of Thread Panic #1985

@scarabcat

Description

@scarabcat

What happened?

I'm running sqruff in Travis on a directory with numerous sql files. I have several hundred threads panicking. Here's the full print out for linting just one file. It asked me to send it your way.

thread '' panicked at crates/lib/src/rules/layout/lt06.rs:68:14:
called Option::unwrap() on a None value
stack backtrace:
0: 0xffff809e3b70 -
1: 0xffff800e4e04 -
2: 0xffff809e3768 -
3: 0xffff809e3a30 -
4: 0xffff809e3444 -
5: 0xffff80a093ec -
6: 0xffff80a0938c -
7: 0xffff80a09cac -
8: 0xffff80060228 -
9: 0xffff80060314 -
10: 0xffff80060454 -
11: 0xffff8028b3c4 -
12: 0xffff8022391c -
13: 0xffff802233b0 -
14: 0xffff8022360c -
15: 0xffff8022360c -
16: 0xffff8022360c -
17: 0xffff8022360c -
18: 0xffff8022360c -
19: 0xffff80220800 -
20: 0xffff8021dee4 -
21: 0xffff802df508 -
22: 0xffff802de484 -
23: 0xffff8008f9cc -
24: 0xffff8159fad8 - cfunction_call
at /usr/src/python/Objects/methodobject.c:537:18
25: 0xffff815717d4 - _PyObject_MakeTpCall
at /usr/src/python/Objects/call.c:240:18
26: 0xffff8157cd24 - _PyEval_EvalFrameDefault
at /usr/src/python/Python/bytecodes.c:2715:19
27: 0xffff8161c004 - PyEval_EvalCode
at /usr/src/python/Python/ceval.c:578:21
28: 0xffff81651b0c - run_eval_code_obj
at /usr/src/python/Python/pythonrun.c:1722:0
29: 0xffff8164a404 - run_mod
at /usr/src/python/Python/pythonrun.c:1743:0
30: 0xffff8166cb4c - pyrun_file
at /usr/src/python/Python/pythonrun.c:1643:0
31: 0xffff8166bb04 - _PyRun_SimpleFileObject
at /usr/src/python/Python/pythonrun.c:433:0
32: 0xffff8166af30 - _PyRun_AnyFileObject
at /usr/src/python/Python/pythonrun.c:78:0
33: 0xffff81661084 - pymain_run_file_obj
at /usr/src/python/Modules/main.c:360:0
34: 0xffff81661084 - pymain_run_file
at /usr/src/python/Modules/main.c:379
35: 0xffff81661084 - pymain_run_python
at /usr/src/python/Modules/main.c:633
36: 0xffff81661084 - Py_RunMain
at /usr/src/python/Modules/main.c:713
37: 0xffff81601b6c - Py_BytesMain
at /usr/src/python/Modules/main.c:767:12
38: 0xffff81277740 -
39: 0xffff81277818 - __libc_start_main
40: 0xaaaace890870 - _start
41: 0x0 -

thread '' panicked at crates/lib/src/rules/layout/lt06.rs:68:14:
called Option::unwrap() on a None value
stack backtrace:
0: 0xffff809e3b70 -
1: 0xffff800e4e04 -
2: 0xffff809e3768 -
3: 0xffff809e3a30 -
4: 0xffff809e3444 -
5: 0xffff80a093ec -
6: 0xffff80a0938c -
7: 0xffff80a09cac -
8: 0xffff80060228 -
9: 0xffff80060314 -
10: 0xffff80060454 -
11: 0xffff8028b3c4 -
12: 0xffff8022391c -
13: 0xffff802233b0 -
14: 0xffff8022360c -
15: 0xffff8022360c -
16: 0xffff8022360c -
17: 0xffff8022360c -
18: 0xffff8022360c -
19: 0xffff80220800 -
20: 0xffff8021dee4 -
21: 0xffff802df508 -
22: 0xffff802de484 -
23: 0xffff8008f9cc -
24: 0xffff8159fad8 - cfunction_call
at /usr/src/python/Objects/methodobject.c:537:18
25: 0xffff815717d4 - _PyObject_MakeTpCall
at /usr/src/python/Objects/call.c:240:18
26: 0xffff8157cd24 - _PyEval_EvalFrameDefault
at /usr/src/python/Python/bytecodes.c:2715:19
27: 0xffff8161c004 - PyEval_EvalCode
at /usr/src/python/Python/ceval.c:578:21
28: 0xffff81651b0c - run_eval_code_obj
at /usr/src/python/Python/pythonrun.c:1722:0
29: 0xffff8164a404 - run_mod
at /usr/src/python/Python/pythonrun.c:1743:0
30: 0xffff8166cb4c - pyrun_file
at /usr/src/python/Python/pythonrun.c:1643:0
31: 0xffff8166bb04 - _PyRun_SimpleFileObject
at /usr/src/python/Python/pythonrun.c:433:0
32: 0xffff8166af30 - _PyRun_AnyFileObject
at /usr/src/python/Python/pythonrun.c:78:0
33: 0xffff81661084 - pymain_run_file_obj
at /usr/src/python/Modules/main.c:360:0
34: 0xffff81661084 - pymain_run_file
at /usr/src/python/Modules/main.c:379
35: 0xffff81661084 - pymain_run_python
at /usr/src/python/Modules/main.c:633
36: 0xffff81661084 - Py_RunMain
at /usr/src/python/Modules/main.c:713
37: 0xffff81601b6c - Py_BytesMain
at /usr/src/python/Modules/main.c:767:12
38: 0xffff81277740 -
39: 0xffff81277818 - __libc_start_main
40: 0xaaaace890870 - _start
41: 0x0 -
== [/...myfile.sql] FAIL
L: 1 | P: 1 | ???? | Unexpected exception. Could you open an issue at
| https://github.com/quarylabs/sqruff
The linter processed 1 file(s).
All Finished 📜 🎉

Version

v0.29.3

Some settings:
[sqruff]
dialect = redshift
exclude_rules = AL01,AL03,AL04,AL09,AM02,AM04,AM05,CP01,CP02,CP03,CP05,CV02,CV08,CV11,LT01,LT02,LT08,LT09,RF02,RF04,RF05,RF06,ST01,ST02,ST04,ST06,ST09
rules = all
templater = placeholder
max_line_length = 457

[sqruff:templater:placeholder]
param_style = pyformat

Checked in Playground

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