prisma: Prisma CLI installation hangs indefinitely inside of docker (Kernel 5.10)
Bug description
@prisma/cli installation hangs indefinitely inside of docker
How to reproduce
REPRO: https://github.com/svelters/prisma-poc
Expected behavior
It should install without container discrimination
Prisma information
@prisma/cli
version: “2.15.0”
Environment & setup
- OS: Linux - Docker (alpine, debian etc…)
- Database: doesn’t matter
- Node.js version: 15.6.0 but it seems to fail on any version we tried
- Prisma version: doesn’t matter as it fails because of the cli
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 18
- Comments: 69 (24 by maintainers)
With
@prisma/client
v2.24.0
I’m again experiencingyarn install
hanging on docker at:Anyone else facing the same?
I’m having a similar issue running npm i in a codebuild project… any official workaround?
I can reproduce this in a debian vm which I manually upgraded to linux kernal 5.10 on digitalocean. I can’t reproduce this on windows or mac so the kernel version hunch is correct.
This will need more investigation. @pimeys should look into this as @Jolg42 pointed out this might be build related.
Just checked and it appears we changed build images used to produce the binaries one day before that specific commit https://github.com/prisma/engine-images/commits/master
Likely related I guess.
2.24.0 works for me as well!
2.24.0 worked for me. I did run into an issue but that was my fault. I should have done
yarn upgrade @prisma/client@2.24.0
vs updating package.json then running yarn, then removing myyarn.lock
file and rerunning yarn 😬.uname -a
first time
pnpm install --filter="{.}..."
:after:
and then the kicker:
pnpx prisma generate
Entrypoint for node download/index.js
@prisma/fetch-engine “prisma:download copying … to …”
Perhaps copy or getHash never return?
…
I have managed to get past it by calling
rm -rf /root/.cache/prisma/
before eachnpm install
/pnpx prisma generate
Hey sorry for the delay here. I was busy with my exams. I will look into this today 😃
in order to reproduce the issue, you have to use a 5+ linux kernel. It doesn’t surprise me it works fine on mac as the hypervisor does a different job.
My network is quiet normal, no special stuff going on. The issue is just the same at work too.
Regarding the logs, there isn’t much more going on.
Could someone at prisma try with a debian “unstable” VM?
This is the one I used to pinpoint the kernel issue: https://cdimage.debian.org/cdimage/weekly-builds/amd64/iso-cd/debian-testing-amd64-netinst.iso
Thank’s for the notes, good to know!
All good. I also had to bump
prisma
package along with@prisma/client
. It’s working now.On this debian 10.9 machine I noticed that using <= node:13-alpine works:
With Debian Buster based images:
Yes it does but it shouldn’t be needed.
@alechp
Nice find, the latest working version is the 10.0.0 The 10.0.1 is the culprit! @Jolg42 https://github.com/prisma/prisma/commit/ad8506c1e01d52f574484461055aeb4599c2b929 It seems indeed related to the @prisma/engine
Yup but I am only at the bootstrap stage so far on my project (looking into authentication workflow with nexus)
@Jolg42 Would it be possible to include this issue in the 2.18.0 Milestone?
the repro has been updated and still failing on 2.17.0.
Both prisma (cli) and @prisma/client have been updated.
just tried it, it’s still broken.
I’ve updated the repro though.
It’s the same by using the
prisma
package btw2.24.0 is out 👍
2.24.0-dev.34
did not work for me. I tried to doyarn install
for a repo where"@prisma/client": "^2.24.0-dev.34"
is included in itspackage.json
file. I usednode:15.14.0-alpine3.13
docker image for this. Andyarn install
still continues to hang forever. I’m using Docker Desktop 3.3.3.@janpio The workaround release works for me! Upgraded docker desktop back up to 3.3.3. Thanks so much!
Having the same issue inside an Ubuntu container (tried debian, alpine, too) in an Ubuntu VM with Linux 5.8 (for Gitlab CI) …
Example:
yarn install
hangs until I manually remove /root/.cache/prisma/, which is pretty annoying. I wasted a whole day trying to find the problem (until I found this issue).The exact same thing works on my laptop running Arch Linux
Hope this gets resolved soon.
@JacobMuchow
Did you try adding
rm -rf /root/.cache/prisma/
beforeboth:
yarn
, andnpx prisma generate
You should be finding that:
It’s the COPY, that is falling over.
@ywada526 you should run uname in your container. As far as I know docker containers run in a virtualized linux on macos
Hi all,
I’m reproducing the issue on a debian 10.9 machine. I’m using the latest version of the reproduction https://github.com/svelters/prisma-poc/commit/a21cf21b1172670c0222b5130c69428c7438e04d . Removing
-T
does not work for me.docker-compose run api yarn install
is stuck and here is what’s happening in the container:Notice 100% cpu, strace shows 0 syscall activity.
The exact same thing works on another Arch Linux machine (updated ~a week ago).
very weird
Same issue while running
prisma generate
in anode:lts-alpine
container. It works on the first build in anode:lts
container, but fails with the next oneI have a good workaround:
https://github.com/svelters/prisma-poc/commit/a21cf21b1172670c0222b5130c69428c7438e04d
It seems like the problem is tty related.
I added the candidate label so we don’t forget about it, I think @pantharshit00 has this on his list to try but I think he’s quite busy right now. 🤞
I’m noticing the same (or related) issue. Hopefully helpful context:
I currently have a successfully deployed prisma@2.6.1 service running in the wild. Works locally (both node & docker), passes CI/CD build step and is successfully running in production (docker)
I have a new prisma service that runs locally (both node & docker), but fails when compiling in GitHub Actions
These services are very similar.
The only differences:
My local environment is a mac The GitHub Actions environment where this fails is a Linux box
Ok, so the issue comes from the kernel version used.
4.19.0-13
.5.10.0-2
. As is it linked to the kernel, it does affect any linux distribution.I can confirm the culprit is https://github.com/prisma/prisma/blob/master/src/packages/client/scripts/postinstall.js
Thank you @dickfickling
I spent a lot of time trying to pinpoint the issue.
Maybe someone working on
@prisma/cli
could take a look?Maybe worth trying
docker-compose build --no-cache
?