Skillpedia
واجهات API والخوادم (backend)42k · #6445

competition-race-condition-state-drift

ما الذي تفعله

هذه المهارة تساعد على إعادة إنتاج المشكلات التي تحدث عندما تقع إجراءات متعددة في الوقت نفسه. تركز على كيف يمكن لترتيب الإجراءات وتوقيتها أن يسببا أخطاء غير متوقعة، مثل بيانات غير صحيحة أو إجراءات مكررة.

متى تستخدمها

  • ✓عندما تشك في أن ترتيب الإجراءات يسبب خطأ.
  • ✓عندما تريد اختبار ما يحدث إذا حاول شيئان تغيير البيانات نفسها في الوقت نفسه.
  • ✓عندما تريد فهم كيف يمكن لأعطال مؤقتة أن تؤدي إلى نتائج مختلفة.

رابط المهارة

https://github.com/zhaoxuya520/reverse-skill/blob/main/CTF-Sandbox-Orchestrator/competition-race-condition-state-drift/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/zhaoxuya520/reverse-skill/blob/main/CTF-Sandbox-Orchestrator/competition-race-condition-state-drift/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أريد اختبار ما يحدث إذا حاول شخصان سحب المال من الحساب نفسه في الوقت نفسه.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تحدد المهارة أجزاء النظام التي يمكن تغييرها، مثل البيانات في قاعدة البيانات أو الذاكرة المؤقتة. ثم تحاكي إجراءات متزامنة، مع تغيير الترتيب أو التوقيت فقط، لترى هل يسبب ذلك نتيجة مختلفة عن المتوقع.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Competition Race Condition State Drift

Use this skill only as a downstream specialization after $ctf-sandbox-orchestrator is already active and has established sandbox assumptions, node ownership, and evidence priorities. If that has not happened yet, return to $ctf-sandbox-orchestrator first.

Use this skill when the decisive behavior depends on request timing, async ordering, lock gaps, or stale state.

Reply in Simplified Chinese unless the user explicitly requests English.

Quick Start

  1. Identify mutable state first: rows, cache keys, queue payloads, session fields, counters, or files.
  2. Reproduce with smallest concurrent sequence and fixed timing assumptions.
  3. Capture one baseline run and one racing run with only one variable changed.
  4. Track read, check, write, enqueue, and commit boundaries separately.
  5. Prove final state drift from a clean reset.

Workflow

1. Map Mutable Boundaries

  • Record transaction scope, lock behavior, retry logic, idempotency keys, cache invalidation, and queue handoff.
  • Note where read-check-write is split across requests, workers, or services.
  • Keep each boundary tied to exact timestamps or sequence numbers.

2. Reproduce Timing Window

  • Build deterministic concurrent inputs with controlled delay, duplicate requests, or reordered worker execution.
  • Compare accepted and rejected paths under identical payloads.
  • Record which condition flips when ordering changes.

3. Reduce To Decisive Race Chain

  • Compress to: request A and B ordering -> stale check or lock gap -> conflicting writes -> resulting capability or artifact.
  • State whether root cause is missing lock, weak idempotency, stale cache read, delayed async commit, or retry side effect.
  • If the path becomes queue-dominant, hand off to queue worker drift skill.

Read This Reference

  • Load references/race-condition-state-drift.md for race harness ideas, evidence blocks, and parity checks.

What To Preserve

  • Mutable keys, transaction boundaries, lock behavior, and idempotency markers
  • Timestamped or sequenced traces for baseline and race runs
  • One minimal replayable concurrent sequence proving drift
الأسئلة الشائعة

ما هي «الحالة» (state)؟

الحالة هي المعلومات التي يحتفظ بها النظام في لحظة معينة، مثل رصيد الحساب البنكي أو حالة الطلب.

ما هي «حالة السباق» (race condition)؟

هي مشكلة تحدث عندما تعتمد نتيجة عملية على الترتيب الدقيق الذي تُنفذ به إجراءات متزامنة متعددة.

لماذا يهم «الترتيب»؟

في الأنظمة التي تحدث فيها إجراءات كثيرة في وقت واحد، يمكن لترتيب معالجتها أن يغيّر النتيجة النهائية. وإذا لم يُضبط الترتيب، قد تقع أخطاء.

التفاصيل

الوصف الأصلي من المؤلف

Internal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for race windows, ordering bugs, idempotency failures, lock gaps, concurrent worker drift, and state inconsistencies that produce decisive effects. Use when the user asks to reproduce timing-sensitive bugs, concurrent state corruption, duplicate actions, stale reads, or privilege or balance drift caused by request orderin

repo: zhaoxuya520/reverse-skill

الشعبية

نجوم GitHub
42k
الترتيب
#6445
الترخيص
MIT
آخر تحديث
22‏/9‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة