fix(standalone): hot-patch UUID parser in memory to resolve startup crash#21
Draft
simonfr wants to merge 1 commit into
Draft
fix(standalone): hot-patch UUID parser in memory to resolve startup crash#21simonfr wants to merge 1 commit into
simonfr wants to merge 1 commit into
Conversation
…D startup crash loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Walkthrough - Résolution définitive du crash UUID au démarrage de Plex
Nous avons résolu le crash de Plex Media Server qui survenait au démarrage lors de l'initialisation des agents/plug-ins (erreur Boost/C++
std::domain_error: Invalid uuid length).Cause racine identifiée
0x104a6cc) :std::domain_error("Invalid uuid length").Modifications apportées
1. Hot-patching en mémoire du validateur d'UUID
Pour neutraliser la levée d'exception sans altérer le reste de l'exécution, nous modifions directement en mémoire la fonction de validation au démarrage du shim :
dl_iterate_phdr(index 0) pour récupérer de manière stable l'adresse de base du processus principalPlex Media Serversous Alpine/musl./proc/self/mem: Pour contourner les restrictions strictes de protection de page (mprotect/ W^X) imposées par certains noyaux dans Docker, nous écrivons le patch directement dans l'espace d'adressage virtuel via/proc/self/mem.__clear_cache.2. Alignement de
Preferences.xmlet PostgreSQLMachineIdentifieretAnonymousMachineIdentifierde 32 à 36 caractères (format UUID standard).devicespour synchroniser leMachineIdentifiervalide au démarrage.Vérifications et Résultats
Application du patch au démarrage :
Stabilité et Santé de Plex :
plex-postgresql-standalonedémarre maintenant parfaitement et passe au statuthealthysans planter.