metacall / faas

Reimplementation of MetaCall FaaS platform written in TypeScript.
https://dashboard.metacall.io
Apache License 2.0
13 stars 20 forks source link

Segmentation fault when testing autoDeploy. #49

Closed viferga closed 1 month ago

viferga commented 1 month ago

Here we can see that when MetaCall is initialized again it segfaults:

https://github.com/metacall/faas/actions/runs/9354850549/job/25748642166

We should debug what is happening.

 Network faas_default  Creating
 Network faas_default  Created
 Container metacall_faas  Creating
 Container metacall_faas  Created
 Container metacall_faas_test  Creating
 Container metacall_faas_test  Created
Attaching to metacall_faas, metacall_faas_test
metacall_faas_test  | + BASE_URL=http://localhost:9000
metacall_faas_test  | ++ curl -s -o /dev/null -w '%{http_code}' http://localhost:9000/readiness
metacall_faas_test  | + [[ ! 000 = \2\0\0 ]]
metacall_faas_test  | + sleep 1
metacall_faas       | Server is running on the port 9000
metacall_faas_test  | ++ curl -s -o /dev/null -w '%{http_code}' http://localhost:9000/readiness
metacall_faas_test  | + [[ ! 200 = \2\0\0 ]]
metacall_faas_test  | FaaS ready, starting tests.
metacall_faas_test  | + echo 'FaaS ready, starting tests.'
metacall_faas_test  | + app=python-base-app
metacall_faas_test  | + pushd data/python-base-app
metacall_faas_test  | + deploy
metacall_faas_test  | + [[ false != \t\r\u\e ]]
metacall_faas_test  | + metacall-deploy --dev
metacall_faas_test  | /metacall/data/python-base-app /metacall
metacall_faas_test  | i Deploying /metacall/data/python-base-app...
metacall_faas_test  | 
metacall_faas_test  | i Repository deployed, Use command $ metacall-deploy --inspect, to know more about deployment
metacall_faas_test  | ++ getPrefix python-base-app
metacall_faas_test  | +++ metacall-deploy --dev --inspect Raw
metacall_faas_test  | +++ jq -r '.[] | select(.suffix == "python-base-app") | .prefix'
metacall_faas       | python-base-app          | Warning: CLI Arguments Parser was not loaded, using fallback argument parser with positional arguments only
metacall_faas       | python-base-app          | 
metacall_faas       | python-base-app          | Any command line option like '--help' will result into error
metacall_faas       | python-base-app          | Only files are allowed: $ metacall a.py b.js c.rb
metacall_faas       | python-base-app          | Error in sitecustomize; set PYTHONVERBOSE for traceback:
metacall_faas       | python-base-app          | ValueError: '/gnu/store/32mapv0zb93vz84m8zl517m15nzs4x9k-profile/bin/../../c81i9i54fgc2gya6948dxs4b61c86f9g-python-3.10.7R/lib/python3.10/site-packages' is not in list
metacall_faas_test  | ++ prefix=7584f8dbe6e8
metacall_faas_test  | ++ echo 7584f8dbe6e8
metacall_faas_test  | + prefix=7584f8dbe6e8
metacall_faas_test  | + url=http://localhost:9000/7584f8dbe6e8/python-base-app/v1/call
metacall_faas_test  | ++ curl -s http://localhost:9000/7584f8dbe6e8/python-base-app/v1/call/number
metacall_faas_test  | + [[ 100 = 100 ]]
metacall_faas_test  | ++ curl -s http://localhost:9000/7584f8dbe6e8/python-base-app/v1/call/text
metacall_faas_test  | + [[ "asd" = \"\a\s\d\" ]]
metacall_faas_test  | /metacall
metacall_faas_test  | + popd
Aborting on container exit...
metacall_faas_test exited with code 0
 Container metacall_faas_test  Stopping
 Container metacall_faas_test  Stopped
 Container metacall_faas  Stopping
 Container metacall_faas  Stopped
 Container metacall_faas  Created
 Container metacall_faas_test  Recreate
 Container metacall_faas_test  Recreated
Attaching to metacall_faas, metacall_faas_test
metacall_faas_test  | + BASE_URL=http://localhost:9000
metacall_faas_test  | ++ curl -s -o /dev/null -w '%{http_code}' http://localhost:9000/readiness
metacall_faas_test  | + [[ ! 000 = \2\0\0 ]]
metacall_faas_test  | + sleep 1
metacall_faas       | Previously deployed applications deployed successfully
metacall_faas       | Server is running on the port 9000
metacall_faas       | python-base-app          | Warning: CLI Arguments Parser was not loaded, using fallback argument parser with positional arguments only
metacall_faas       | python-base-app          | 
metacall_faas       | python-base-app          | Any command line option like '--help' will result into error
metacall_faas       | python-base-app          | Only files are allowed: $ metacall a.py b.js c.rb
metacall_faas       | python-base-app          | Segmentation fault (core dumped)
metacall_faas_test  | ++ curl -s -o /dev/null -w '%{http_code}' http://localhost:9000/readiness
metacall_faas_test  | + [[ ! 200 = \2\0\0 ]]
metacall_faas_test  | FaaS ready, starting tests.
metacall_faas_test  | + echo 'FaaS ready, starting tests.'
metacall_faas_test  | + app=python-base-app
metacall_faas_test  | + pushd data/python-base-app
metacall_faas_test  | + deploy
metacall_faas_test  | + [[ true != \t\r\u\e ]]
metacall_faas_test  | /metacall/data/python-base-app /metacall
metacall_faas_test  | ++ getPrefix python-base-app
metacall_faas_test  | +++ metacall-deploy --dev --inspect Raw
metacall_faas_test  | +++ jq -r '.[] | select(.suffix == "python-base-app") | .prefix'
metacall_faas_test  | ++ prefix=
metacall_faas_test  | ++ echo
metacall_faas_test  | + prefix=
metacall_faas_test  | + url=http://localhost:9000//python-base-app/v1/call
metacall_faas_test  | ++ curl -s http://localhost:9000//python-base-app/v1/call/number
metacall_faas_test  | + [[ Can't find //python-base-app/v1/call/number on this server! = 100 ]]
metacall_faas_test  | + exit 1
Aborting on container exit...
metacall_faas_test exited with code 1
 Container metacall_faas_test  Stopping
 Container metacall_faas_test  Stopped
 Container metacall_faas  Stopping
 Container metacall_faas  Stopped
viferga commented 1 month ago

Solved: https://github.com/metacall/faas/commit/75413990e1bf97db786c5b87b67c3993ffe5d0e1