Comments (7)
Confirmed, taking off the -alpine
fixed it 👍
from ameba.
Perhaps using alpine (musl) might have sth to do with it?
from ameba.
Probably so. Never had it happen on Arch with glibc.
from ameba.
I'd suggest trying with a regular crystal:latest
image and checking whether it exhibits the same behaviour to begin with.
Regardless, this is most likely Crystal bug, not ameba's.
from ameba.
In any case it would be good to debug it further and eventually report the buggy behaviour to the crystal's issue tracker instead.
from ameba.
Just got this issue on Cable https://github.com/cable-cr/cable/actions/runs/4774224693/jobs/8487769812?pr=69
Postinstall of ameba: make bin && make run_file
Failed postinstall of ameba on make bin && make run_file:
shards build -Dpreview_mt
Dependencies are satisfied
Building: ameba
Error target ameba failed to compile:
Showing last frame. Use --error-trace for full trace.
In src/ameba/rule/base.cr:142:10
142 | {{ run("../../contrib/read_type_doc",
^--
Error: Error executing run (exit code: 11): ../../contrib/read_type_doc QueryBoolMethods /__w/cable/cable/lib/ameba/src/ameba/rule/style/query_bool_methods.cr
stderr:
Error while trying to determine if a stack overflow has occurred. Probable memory corruption
Invalid memory access (signal 11) at address 0x38
[0x55caacd58e56] ?? +94328971431510 in /github/home/.cache/crystal/__w-cable-cable-lib-ameba-src-contrib-read_type_doc.cr/macro_run
[0x55caacd58e1a] ?? +94328971431450 in /github/home/.cache/crystal/__w-cable-cable-lib-ameba-src-contrib-read_type_doc.cr/macro_run
[0x7ff58ba73c9f] ?? +140692586708127 in /lib/ld-musl-x86_64.so.1
make: *** [Makefile:9: build] Error 1
Error: Process completed with exit code 1.
Seems it only happened on Crystal 1.6. I'm also using crystallang/crystal:${{ matrix.crystal_version }}-alpine
, so I'll give that a shot to try not using alpine.
from ameba.
Using ameba (alpine base) build crashes on our CI too, this is our latest crash:
$ ameba
Error while trying to determine if a stack overflow has occurred. Probable memory corruption
Invalid memory access (signal 11) at address 0x38
[0x55c44399fd36] *Exception::CallStack::print_backtrace:Nil +118 in /usr/bin/ameba
[0x55c4439845f6] ~procProc(Int32, Pointer(LibC::SiginfoT), Pointer(Void), Nil) +310 in /usr/bin/ameba
[0x7f10416735f0] ?? +139707793487344 in /lib/ld-musl-x86_64.so.1
but only once in a week. 99% of the time it works.
We have our own ameba docker alpine image built using:
FROM alpine:edge as builder
RUN apk add --update crystal shards yaml-dev musl-dev make
RUN mkdir /ameba
WORKDIR /ameba
COPY . /ameba/
RUN make clean && make
FROM alpine:latest
RUN apk add --update yaml pcre2 gc libevent libgcc
RUN mkdir /src
WORKDIR /src
COPY --from=builder /ameba/bin/ameba /usr/bin/
RUN ameba -v
ENTRYPOINT [ "/usr/bin/ameba" ]
The image is rebuilt every day using these:
build:
stage: build
script:
# clone to subdirectory "ameba"
- git clone --depth=1 https://github.com/crystal-ameba/ameba.git ameba
# add our patched Dockerfile
- cp Dockerfile ameba/Dockerfile
- cd ameba
# build
- docker build --pull -t "${CI_REGISTRY_IMAGE}:latest" .
# push
- docker push "${CI_REGISTRY_IMAGE}:latest"
(The Dockerfile is based of ameba's Dockerfile.)
from ameba.
Related Issues (20)
- `--only` CLI flag appears to ignore excluded files within config HOT 1
- BUG: trying to downcast (Slice(UInt8) | Nil) (Crystal::MixedUnionType) <- Slice(UInt8) (Crystal::GenericClassInstanceType) (Exception) HOT 2
- `Lint/LiteralsComparison`: false positive when comparing tuple
- Failing spec on crystal master
- Replace `Performance/AnyInsteadOfEmpty` with `Style/EmptyInsteadOfPresent` HOT 9
- Regression in `Lint/ShadowingOuterLocalVar`
- Configure skipping directories HOT 3
- warn on redundant use of `.try` HOT 3
- Recognize unused variable from type declaration HOT 2
- ComparisonToBoolean with Bool unions HOT 2
- exception names are too limited HOT 7
- A dedicated `rules` command HOT 1
- `Lint/UselessAssign` reports type declarations within `lib` definitions
- Add lsp server option HOT 1
- `Lint/UselessAssign` when using generics HOT 9
- `Lint/UselessAssign` reports macros accepting `Crystal::Macros::TypeDeclaration` HOT 16
- Avoid annoyance from new rules HOT 4
- Naming/BlockParameterName + stdlib methods like sort HOT 4
- spec helpers getting flagged HOT 1
- Custom macro generates "Useless assignment to variable" HOT 3
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 ameba.