This directory contains code which can be used as a base code to debug the core issues by generating core dump files and gdb tool.
php: version 8.3.7OS: Docker / Apache on Linuxgoogle/cloud-firestore: version 1.47.3grpc: version 1.69.0
Clone this repository core-dump-debug-base.
$ git clone https://github.com/ajinkyakulkarni75/core-dump-debug-base.git
$ cd core-dump-debug-baseAfter cloning the core-dump-base repo check the local credentials file, copy that into the /app folder and rename the credential file to application_default_credentials.json. Also make sure you have a GCP Project and firestore database named firestore-mock is created along with the collection with collection ID schedules.
Run the below command on you host machine (outside docker)
$ sudo sh -c 'echo "/tmp/core.%e.%p" > /proc/sys/kernel/core_pattern'Build the docker container and run the container to open a docker container shell
$ docker build -t firestore-grpc-new .
$ docker run -it --ulimit core=-1 --security-opt seccomp=unconfined -v /tmp:/tmp -v "$(pwd)/logs/":/var/log/mylogs/ --entrypoint bash firestore-grpc-newOnce inside the container shell check the grpc installation version and then run PHP script.
$ php -i | grep grpc
$ php /var/www/html/index.php 2> /var/log/mylogs/grpc.log$ ls -l /tmp/core.*
$ gdb /usr/local/bin/php /tmp/core.*