Segfault during schema parsing
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- python
- Domaine
- backend-api-design
Piste de recherche
Commencez par les frames de pile signalés dans graphql/language/ast.py et graphql/language/parser.py, puis examinez gql/client.py, où commence l’analyse du schéma. Reproduisez l’analyse d’une chaîne de schéma volumineuse avec faulthandler et comparez le comportement du parser et de l’AST. C’est terminé lorsqu’une cause reproductible est identifiée et que le fix est documenté ou testé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Hey there,
The package is great and has been super reliable for us so far. However, we're running into an intermittent issue where the python exits with code 139 (segfault).
The relevant part of the stack trace, obtained with Python's builtin faulthandler:
main Fatal Python error: Segmentation fault
│ main
│ main Current thread 0x00007f9672f54740 (most recent call first):
│ main Garbage-collecting
│ main File "/usr/local/lib/python3.11/site-packages/graphql/language/ast.py", line 361 in __setattr__
│ main File "/usr/local/lib/python3.11/site-packages/graphql/language/ast.py", line 332 in __init__
│ main File "/usr/local/lib/python3.11/site-packages/graphql/language/parser.py", line 730 in parse_field_definition
│ main File "/usr/local/lib/python3.11/site-packages/graphql/language/parser.py", line 1134 in optional_many
│ main File "/usr/local/lib/python3.11/site-packages/graphql/language/parser.py", line 717 in parse_fields_definition
│ main File "/usr/local/lib/python3.11/site-packages/graphql/language/parser.py", line 697 in parse_object_type_definition
│ main File "/usr/local/lib/python3.11/site-packages/graphql/language/parser.py", line 288 in parse_definition
│ main File "/usr/local/lib/python3.11/site-packages/graphql/language/parser.py", line 1153 in many
│ main File "/usr/local/lib/python3.11/site-packages/graphql/language/parser.py", line 241 in parse_document
│ main File "/usr/local/lib/python3.11/site-packages/graphql/language/parser.py", line 113 in parse
│ main File "/usr/local/lib/python3.11/site-packages/gql/client.py", line 105 in __init__
- This happens when trying to parse a GraphQL schema as a string, loaded from a network request.
- The schema is around 2800 lines, which I presume is considered fairly large.
- The entry point is through the
gqllibrary, but the issue seems to be insidegraphql-core - I couldn't find what could go wrong based on some digging through the stack trace.
- The package version we're using is 3.2.3.
Could this be a mislabeled OOM error? I don't think so, but worth considering. Is there anything I could do to profile this better? It's a bit hard as it's running inside a Kubernetes pod and we can't reproduce locally, but I can try.
- Langage dominant
- Python
- Étoiles
- 531
- Forks
- 147
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de graphql-python/graphql-core
-
Difficulté 4/5 3-5 jours Accessibilité débutants 50/100
graphql-python/graphql-core#272 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
graphql-python/graphql-core#269 · 1 commentaire ·
-
Publish a major version Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
graphql-python/graphql-core#267 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
graphql-python/graphql-core#257 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
graphql-python/graphql-core#247 · 8 commentaires ·
Toutes les issues de graphql-python/graphql-core
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
stephrobert/dsoxlab#238 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
sublimehq/package_control#1780 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
nwg-piotr/nwg-displays#145 ·