REST updates can deadlock with activation or uploads on NetBox v4.7.4
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
Start by tracing the update hooks for Script Projects and Script Files alongside the activation and upload paths; the issue does not name specific files or tests. Reproduce the overlapping requests in two sessions, including the reported Project PATCH and activation case, then inspect how each path acquires row and advisory locks. Done means concurrent updates, activation, and uploads wait without deadlocking while validation, permissions, and If-Match behavior still apply.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Plugin Version
v0.0.1
NetBox Version
v4.7.4
Python Version
3.12
Steps to Reproduce
The operations must overlap; the timing window is narrow.
- Create a Script Project with a valid revision available for activation.
- Start activating that revision.
- At the same time, send
PATCH /api/plugins/netbox-scripts/projects/<id>/for that Project with{"description": "edited"}.
The same lock-order conflict exists for Script Files: upload a file that re-enables an existing disabled Script File while another request updates that file through PATCH /api/plugins/netbox-scripts/script-files/<id>/.
Single and bulk PUT/PATCH updates are affected. The conflict does not require If-Match.
Expected Behavior
Concurrent operations use a consistent lock order and wait for each other without deadlocking. Normal validation, permission checks, and If-Match handling still apply.
Observed Behavior
NetBox v4.7.4 locks the updated rows before the plugin's update hooks acquire the Project's advisory lock. Activation and uploads acquire these locks in the opposite order. If the operations overlap at these points, each can hold the lock the other needs.
The Project PATCH/activation case was reproduced in a controlled two-session test, both with and without If-Match. PostgreSQL raised deadlock detected (SQLSTATE 40P01) for PATCH while activation completed.
- Lenguaje dominante
- Python
- Estrellas
- 8
- Forks
- 0
- Merge medio
- 11 h 35 min
- PR fusionados (30 d)
- 20
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de netbox-community/netbox-scripts
-
app: scripts severity: medium status: backlog type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
netbox-community/netbox-scripts#83 ·
Los mantenedores suelen responder en 1 día
-
app: scripts status: backlog type: documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
netbox-community/netbox-scripts#80 ·
Los mantenedores suelen responder en 1 día
-
app: scripts severity: medium status: backlog type: bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
netbox-community/netbox-scripts#79 ·
Los mantenedores suelen responder en 1 día
-
app: scripts severity: medium status: backlog type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
netbox-community/netbox-scripts#77 ·
Los mantenedores suelen responder en 1 día
-
app: scripts severity: low status: backlog type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
netbox-community/netbox-scripts#76 ·
Los mantenedores suelen responder en 1 día
Todos los issues de netbox-community/netbox-scripts
Issues similares
-
ai_p2 bug comp-datalake
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
ClickHouse/ClickHouse#128306 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
[Bug] PROPOSE docs promise approval before saving, but save_learning has no confirmation flagAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
[bug] openlit: LLM spans from openlit 1.37+ get no OpenInference attributes, and cache and reasoning token counts are droppedPosiblemente ocupada @sohom-cs la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Arize-ai/openinference#4199 · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
MichaelYcJo/SpecSeal#1192 ·