Git Product home page Git Product logo

Comments (7)

jwoertink avatar jwoertink commented on June 10, 2024 1

Confirmed, taking off the -alpine fixed it 👍

from ameba.

Sija avatar Sija commented on June 10, 2024

Perhaps using alpine (musl) might have sth to do with it?

from ameba.

sanks02 avatar sanks02 commented on June 10, 2024

Probably so. Never had it happen on Arch with glibc.

from ameba.

Sija avatar Sija commented on June 10, 2024

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.

Sija avatar Sija commented on June 10, 2024

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.

jwoertink avatar jwoertink commented on June 10, 2024

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.

daliborfilus avatar daliborfilus commented on June 10, 2024

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)

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.