REST updates can deadlock with activation or uploads on NetBox v4.7.4
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 8
- フォーク
- 0
- 平均マージ
- 11時間 23分
- マージ済み PR(30日)
- 24
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
netbox-community/netbox-scripts のほかの issue
-
app: scripts severity: low status: backlog type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
netbox-community/netbox-scripts#94 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts severity: medium status: backlog type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
netbox-community/netbox-scripts#83 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts status: backlog type: documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
netbox-community/netbox-scripts#80 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts severity: medium status: backlog type: bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
netbox-community/netbox-scripts#79 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts severity: medium status: backlog type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
netbox-community/netbox-scripts#77 ·
メンテナーはふだん 1 日以内に返信
netbox-community/netbox-scripts の issue をすべて見る
似ている issue
-
_chunk_scan_fwd launches its Triton kernel without a device guard: NaN when a model is split across GPUs対応中かも @toddwbucy が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
state-spaces/mamba#1072 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
loopj/aiovantage#414 ·
メンテナーはふだん 1 日以内に返信
-
power_mismatch_deline docstring: the rear-to-total RMAD conversion has an extra bifaciality factorオープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
pvlib/pvlib-python#2929 ·
メンテナーはふだん 1 日以内に返信
-
data good first issue launch-day unverified
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BradGroux/wow-forever-mission-control#8 ·
メンテナーはふだん 1 日以内に返信
-
check bilibili falsely reports read/subtitle as broken: live_test fixture BV1GJ411x7h7 is gone (404)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Panniantong/Agent-Reach#889 ·
メンテナーはふだん 2 日以内に返信