Flag GPU Nodes With Repeated Critical XID Errors

Last updated: November 29, 2026

Quick Overview

Given raw kernel log lines of the form `<timestamp> <node> <gpu> XID <code> <message>`, count critical XID errors per node and return nodes at or above a threshold, sorted by count descending then node name.

Fluidstack
Coding & Algorithms
Software Engineer
Fluidstack
November 29, 2026
Software Engineer
Technical Screen
Coding & Algorithms
Easy

0

0

0 solved


Given raw kernel log lines of the form `<timestamp> <node> <gpu> XID <code> <message>`, count critical XID errors per node and return nodes at or above a threshold, sorted by count descending then node name.

On a large H100 or B200 fleet, NVIDIA XID errors such as 79 (GPU fell off the bus) or 48 (double-bit ECC) are the first signal that a node should be drained before it kills a customer's training job. The interviewer is checking robust parsing of messy operational data and a clear ranking rule, the kind of glue code Fluidstack's fleet tooling is full of.

What the Interviewer Expects
  • Parse defensively and skip malformed lines instead of crashing
  • Use an explicit set of critical XID codes
  • Count per node, not per GPU
  • Sort with a deterministic tie-break
  • Explain how this would feed an automated drain decision
Key Topics to Cover
Log parsing
Hash map counting
Custom sort keys
GPU fleet health
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you restrict counts to a sliding 24-hour window?
  • Some XIDs are caused by user code (for example 13 or 31). How do you avoid draining nodes for customer bugs?
  • How would you run this over terabytes of logs from thousands of nodes?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Each line has whitespace-separated fields: timestamp, node, gpu, the literal XID, a numeric code, then free text. Only a configured set of hardware-indicative codes counts. Return [(node, count)] ...

High-Level Design

Single pass with a Counter. Validate field count, the XID marker and that the code parses as an int. Filter by the critical set, count by node, then filter and sort....


Submit Your Answer
Markdown supported

Related Questions