firebase / firebase/firebase-tools
In an M1 environment, malloc():unaligned tcache chunk detected error occurs when many requests are sent using firebase-emulator inside the Docker.
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools:**
firebase-tools: 11.9.0
**Platform:**
masOS 12.5 (M1 Pro)
### [REQUIRED] Test case
```
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg && \
curl -sLf --retry 3 --tlsv1.2 --proto "=https" 'https://packages.doppler.com/public/cli/gpg.DE2A7741A397C129.key' | apt-key add - && \
echo "deb https://packages.doppler.com/public/cli/deb/debian any-version main" | tee /etc/apt/sources.list.d/doppler-cli.list && \
apt-get update && \
apt-get -y install doppler
RUN apt-get install -y curl wget openjdk-17-jre-headless
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt install -y nodejs \
&& apt install lsof
RUN apt-get -y install openssl
RUN npm install -g firebase-tools
RUN npm install -g yarn
```
### [REQUIRED] Steps to reproduce
Hasura remote schema <-> This occurs when many requests (graphql queries) are sent after connecting to functions within the firebase emulator.
Hasura version hasura/graphql-engine:v2.9.0.cli-migrations-v3 It is.
### [REQUIRED] Expected behavior
Hasura remote-schema<-> The firebase-emulator (in the docker) does not seem to respond normally.
Starting the firebase-emulator from the CLI makes it smooth, but using Docker's M1 image (ubuntu) causes problems.
(It works with AMD64/ubuntu images, but it is too slow to run AMD64 images on M1)
### [REQUIRED] Actual behavior
```
Beginning execution of \"graphql\"
malloc():unaligned tcache chunk detected <- (debug mode)
```
Contributor guide
Research direction
Start by reproducing the failure with the supplied Ubuntu Docker setup, firebase-tools 11.9.0, an M1 environment, and Hasura GraphQL queries. Compare the Docker behavior with running the Firebase emulator directly and with the AMD64 image. Done means repeated requests complete without the malloc error and the emulator responds normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, graphql, nodejs, typescript
- Domain
- api, backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100