Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup fatal error, unreachable code #152

Closed
MathiasVDA opened this issue Sep 19, 2021 · 17 comments
Closed

Startup fatal error, unreachable code #152

MathiasVDA opened this issue Sep 19, 2021 · 17 comments

Comments

@MathiasVDA
Copy link

Hello,

I have an issue with starting up the docker image with tag v3.1.2. I see this in my docker console:

# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0xbece8564

Starting up worked fine in v3.1.1. I run docker on Raspberry Pi 4 (8GB ram) with raspbian buster. I have traced back the start of the issue to v3.1.1beta9. beta8 ran with no issue.

@svrooij
Copy link
Owner

svrooij commented Sep 19, 2021

Thanks Matthias for bringing this to my attention. May I ask if you’re running 64-bit or 32-bit?

My first guess is that there is an issue with crosscompiling the image (we use github actions on AMD64, to build the image for all architectures). Will give it a go tomorrow.

@MathiasVDA
Copy link
Author

It's 32bit

You just gave me the idea to try to built the docker image myself and I bumped into the same issue while building, during step 4 (npm ci):

pi@unifi:~/git $ git clone https://github.com/svrooij/sonos2mqtt.git
Cloning into 'sonos2mqtt'...
remote: Enumerating objects: 927, done.
remote: Counting objects: 100% (144/144), done.
remote: Compressing objects: 100% (96/96), done.
remote: Total 927 (delta 85), reused 82 (delta 45), pack-reused 783
Receiving objects: 100% (927/927), 864.76 KiB | 5.09 MiB/s, done.
Resolving deltas: 100% (543/543), done.
pi@unifi:~/git $ cd sonos2mqtt/
pi@unifi:~/git/sonos2mqtt $ git checkout v3.1.2
Note: checking out 'v3.1.2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 20cab50 Merge pull request #151 from svrooij/feature/beta-refres                                                                                                                                                                 h
pi@unifi:~/git/sonos2mqtt $ docker build -t sonos2mqtt:v3.1.2-localbuild .
Sending build context to Docker daemon  1.303MB
Step 1/18 : FROM node:current-alpine as build
current-alpine: Pulling from library/node
48fad15491f9: Already exists
31ee9768fce8: Already exists
96366830f49c: Already exists
fc67ac018bd6: Already exists
Digest: sha256:a2b99f95311def1095e5b9604a81956f4109d9a512a44c86fc382f472cad1d91
Status: Downloaded newer image for node:current-alpine
 ---> f9d300b5dcec
Step 2/18 : WORKDIR /usr/src/app
 ---> Running in 96c31b6922af
Removing intermediate container 96c31b6922af
 ---> 7daaa5d3b1bf
Step 3/18 : COPY package*.json tsconfig.json ./
 ---> 4c7de0b47bb1
Step 4/18 : RUN npm ci
 ---> Running in 3d4b8959d2a9


#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0xbe8eb644
The command '/bin/sh -c npm ci' returned a non-zero code: 133
pi@unifi:~/git/sonos2mqtt $ cat /etc/*release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@unifi:~/git/sonos2mqtt $ uname -m
armv7l

@MathiasVDA
Copy link
Author

I just checked out tag v3.1.1 and tried to built it. Gives me the same error. So I guess the issue is not related to the project directely but to some dependency that got updated in between your built of beta8 and beta9.

I did some more testing and made the same built test on another pi4 8GB and a pi3 model B. Both also running raspbian buster with a very similar setup (minimal install enough to run docker containers). It seems that both builts went fine.

So this might actually be a device related issue. Although I can't image the difference (except the docker containers they are running) between both Pi4's.

@MathiasVDA
Copy link
Author

I updated the pi4 with the issue but the issue persists. Since this seems to be device related, I guess this github issue can be closed? I'll run your super app on one of my other pi's. Many thanks!

@svrooij
Copy link
Owner

svrooij commented Sep 19, 2021

There goes my guess that is was related to the builds (and the easy fix).

Maybe it's related to 32-bit and alpine node container.

Will try a different Dockerfile tomorrow, one that doesn't build the app but instead just installs the npm version of the tagged release.

@svrooij
Copy link
Owner

svrooij commented Sep 19, 2021

I updated the pi4 with the issue but the issue persists. Since this seems to be device related, I guess this github issue can be closed? I'll run your super app on one of my other pi's. Many thanks!

Just leave it open, someone else also reported something similar already (on another channel). So I still have to look into.

Since you're enjoying it so much may I be blunt and direct you to this page 🤩

@svrooij
Copy link
Owner

svrooij commented Sep 20, 2021

@VBP8501 do you by any change have the following versions for me?

  • Docker
  • Raspbian
  • kernel

Then I'm going to see if I can see anything similar on this side

@MathiasVDA
Copy link
Author

Since you're enjoying it so much may I be blunt and direct you to this page 🤩

Well since you ask so nicely ^^. You should have a 10€ (onetime) option though.

  • Docker: 20.10.8
  • Raspbian: Raspbian GNU/Linux 10 (buster)
  • kernel: 5.10.60-v7l+

@svrooij
Copy link
Owner

svrooij commented Sep 21, 2021

I’m trying to create a new github action for a different way of building the app. See here. This should skip the compiling in every image. And should make the builds faster and more stable.

my guess is that once I have the builds worked out, we should give it a go with the new image on your “broken” pi.

You should have a 10€ (onetime) option though.

I’ve just updated my sponsoring profile, to now include one-time tiers and summarizing my next project.

svrooij added a commit that referenced this issue Sep 22, 2021
@github-actions
Copy link

🎉 This issue has been resolved in version 3.1.3-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

svrooij added a commit that referenced this issue Sep 22, 2021
@svrooij
Copy link
Owner

svrooij commented Sep 22, 2021

@VBP8501 could you try starting the new package on your "broken" pi? I've also double published to Github container registry because of the pricing changes at Dockerhub. See https://github.com/svrooij/sonos2mqtt/pkgs/container/sonos2mqtt

Or just change the image name to ghcr.io/svrooij/sonos2mqtt:3.1.3-beta.2 or ghcr.io/svrooij/sonos2mqtt:beta

I'm running the latest beta on my device (Raspberry Pi 3 Model B Plus Rev 1.3) with these versions, they seem comparable with yours, though slightly lower versions.

uname -a
# Linux ubuntu 5.4.0-1038-raspi #41-Ubuntu SMP PREEMPT Thu Jun 17 14:17:21 UTC 2021 armv7l armv7l armv7l GNU/Linux

lsb_release -a
# Distributor ID: Ubuntu
# Description:    Ubuntu 20.04.2 LTS
# Release:        20.04
# Codename:       focal

docker --version
# Docker version 20.10.7, build f0df350

@MathiasVDA
Copy link
Author

I'm afread that the new package also gives me the error:

#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0xbed50564

When I try to run the image ghcr.io/svrooij/sonos2mqtt:beta

@svrooij
Copy link
Owner

svrooij commented Sep 22, 2021

Since this seems to be device related

I guess you where right all along. I'm running that specific image on the same hardware as you.

@MathiasVDA
Copy link
Author

I stumbled across this issue: Koenkk/zigbee2mqtt#7662 (comment)

Ironically it's also a 2mqtt project. They have a similar issue. I changed the dockerfile to
FROM node:current-alpine3.12 as build
and
FROM node:current-alpine3.12 as prod
Built and run the project and that seems to work

So it must be related to some change in node:alpine

svrooij added a commit that referenced this issue Sep 22, 2021
@github-actions
Copy link

🎉 This issue has been resolved in version 3.1.3-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@svrooij
Copy link
Owner

svrooij commented Sep 22, 2021

@VBP8501 Koen is right a lot of times.... I also published container that has the same fix. ghcr.io/svrooij/sonos2mqtt:beta or ghcr.io/svrooij/sonos2mqtt:3.1.3-beta.3

@github-actions
Copy link

🎉 This issue has been resolved in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants