modus
Menu
On this page

Error kinds and units

The error record of a call that failed holds a kind, a unit, and values. 40 kinds and 62 units.

Kinds

What is wrong. The meaning of value, limit and found for each kind:

A kind names the class of the mistake, and the unit names what the values count. The comment of each member gives what value, limit and found hold, and which calls give it. A kind that is not in this list is "unknown" to a reader (kind_known). The page "Error kinds and units" of the site shows this table.

The comment above Kind in src/library/modus/contract/errors/errors.odin.

NumberKindWhat value, limit and found hold
0NoneNo error: the record of a call that did not fail is all zero.
1EmptyA text argument has no byte. limit: the most that it can have. Given by the storage service and by the HTTP server (src/modules/demonstrations/server) for an empty name, and by QUIC.
2Too_Longvalue: the size of the argument; limit: the most that it can have. The unit names what the size counts: Words for a word wait, Bytes for a name of the storage service or a frame of the frame service.
3Too_Smallvalue: the size of the argument; limit: the least that it must have. The kernel gives it for a report buffer below the size of its report (Inspect), and for a count of 0 where one is needed. The block, frame and network services give it for a buffer too small for one block or frame.
4Bad_Value

value: a value that the call refuses; limit: the largest value that it takes, or 0 when the sentence gives no range; found: 0, or the part of the argument that the call refuses, as the call numbers its parts (Thread_Control: op.Thread_Write_Refusal).

The general kind for a number out of its range or with no meaning: a level of the log, a weight of a thread, a setting that names no value, a command of the terminal ring.

5Bad_Flagsvalue: the flags; limit: the flags that the call knows. The kernel gives it for Memory_Create, Memory_Map, Memory_Commit, Memory_Protect and Fault_Handler_Set with a flag or a kind that it does not know, or with two flags that do not go together.
6Bad_Bytevalue: the offset of the byte in the text; found: the byte. A name or a text holds a byte that the call refuses: the storage service for a byte 0 or / in a name, or a name . or .., the HTTP server for a byte that a name of a page cannot hold.
7Bad_Addressvalue: the address; limit: the count of bytes; found: 1 when the call writes there. The kernel gives it with the status Bad_Address: the process cannot read, or write, the bytes that an argument names.
8Handle_Absentvalue: a number that names no handle of the caller. With the unit Lent_Handles: in an isolated call, the handle did not come through the call ring.
9Handle_Endedvalue: the handle; found: an End. The handle named an object once: it was closed or revoked. The kernel gives it with Bad_Handle.
10Handle_Kindvalue: the handle; limit: the kind of object that the call needs; found: the kind of its object (op.Object_Kind). The kernel gives it with Bad_Handle: for example a memory handle given to Process_Start.
11Handle_Rightsvalue: the handle; limit: the rights that the call needs; found: the rights of the handle (op.Rights). The kernel gives it with No_Right. Both sets are op.Rights as integers.
12Budgetvalue: the handle of the budget; limit: what the call asks; found: what the budget holds. The kernel gives it with No_Budget when the handle has Read. The unit names the amount: Pages, Processes, Threads, Processor or Log_Records.
13Budget_Hiddenvalue: the handle of the budget; limit: what the call asks. The handle has no right Read: the budget is not described. The kernel gives it with No_Budget. The record depends on the call alone, so it tells nothing of a budget that another process shares.
14Over_Limitvalue: what the call makes; limit: the limit. Unit Blocks (the storage service): the blocks of the current objects with the change, with no earlier version kept. The kernel gives it for Log above the records of the second (Log_Records). The network service gives it with Bytes when a send passes the limit of the address check; the remote service with Milliseconds when a call passes its time limit.
15FullA table has no free place. limit: its capacity. The unit names the table: Handles, Mappings, Threads, Modules, Interrupts, Places, Connections, Principals, Commit_Blocks. Another try can pass after a place frees.
16Statevalue: the handle; found: the op.Process_State of its object, or 0 when the handle has no right Read. The kernel gives it with Bad_State: the process is stopped, or not started yet. A service gives it for a connection or a stream that is not in the state of the command.
17AbsentNo object has the name or the number of the argument. found: 0, or the number from 1 of the row of a table argument that names it. The unit names what is absent: Objects or Trees (a name of the storage service), Places, Versions, Principals, Region, a setting, a host of the network.
18DamagedThe object of the argument exists, and a block of it has a wrong check. The storage service gives it when a block of an object or of a tree does not match its hash. With the unit Counts: the counts of the blocks are not trusted after a fault of the service.
19DeviceA device reported an error. found: the status of the device. The storage service gives it when the block service failed a read or a write. With the unit Dropped_Writes, the device answered Ok and did not keep a write: the read back of the commit found it.
20No_GrantThe caller has no grant for this call: the unit says which grant. Given by a service: the storage service (Store, Changes), the root service (Root_Commands, Acts_For_Principal), the compositor (Display), the terminal (Terminal), the network service (Endpoint, Connection). The fix is a grant from the starter of the process, not another call.
21MalformedThe module of the argument breaks a rule of the module format. value: the kind of the problem; found: the byte of the file. Given by the loader of src/library/modus/system and by the process manual. Also by system.ring_open with argument 1: the header of a ring is not one that ring.open takes.
22No_Targetvalue: the handle of a memory object that names no one other process to receive the handle. The kernel gives it for Handle_Give whose target is a memory object that no one other process maps or holds.
23Overlapvalue: an address, or with the unit Region an offset in the call region of an isolated call; limit: the count of bytes. They overlap something that the process has, or another argument of the call that is written. The kernel gives it for Memory_Map at an address that another mapping holds, for Process_Module over another module record, and for Memory_Commit with ranges that overlap.
24Unknown_Operationvalue: the number of the operation. The kernel gives it for a command record whose kind is 0 or above the last op.Operation; limit is the last operation.
25RefusedThe call refused, and gives no more detail. found: the status (op.Status for the kernel, and with the unit Kernel_Status). The last resort of a callee that has no better kind: a reader names the status in words with the unit Kernel_Status, and keeps any other status on the detail lines. src/library/modus/system gives it for a kernel call whose answer has another tag than its command, or is absent.
26No_AnswerNo answer before the time limit. value: the IPv4 address that did not answer, or 0; limit: the milliseconds waited; found: the word of an Unanswered, what did not answer. The network service gives it, with the unit Milliseconds. The block service gives it with Device for each request in flight when the device did not answer one by its deadline or needs a reset; the storage service then refuses each call that needs the disk with the kind Device.
27UnsupportedThe receiver does not do this command. value: the command, or the field that it does not do. Given by the block and frame services for a command that the device does not have, by the network service, the root service and QUIC. The kernel gives it with Bad_Operation for Guest_Run on a machine whose processors have no virtualization support that it uses: value is the operation.
29BusyToo many requests are in flight. value: the requests in flight, or 0 when the receiver does not count them; limit: the most. The block, frame and network services give it, with the unit Requests. Another try can pass after a completion. src/library/modus/system gives it with Bad_Operation and limit 0 for a kernel call on a kernel ring that holds a command or a completion: its command does not run.
30Out_Of_RangeThe argument names units past the end. value: the end of what it names (its first unit and its count); limit: the units that exist; found: 0, or the number from 1 of the record of a table argument that names them (a record that names bytes of another argument by an offset). The services of rings give it for a place and a count past the end of their data region (the unit Bytes), and the storage service for a range past the end of an object. See: Module contract: Tables and bytes as parameters
31ReservedThe argument names a process of the system that the call does not act on: it starts at boot, or it is a device service. The root service gives it for Start or Stop of such a process.
32Not_Payervalue: the handle of a budget that does not pay for the memory object of the call. It says nothing of the budget. The kernel gives it for Memory_Commit with a budget that is not the budget of the object.
33Object_Sharedvalue: the handle of a memory object, or 0; the call needs an object that only this process names, with one mapping at most. The kernel gives it for a decommit (Memory_Commit) and for Memory_Protect on an object that another handle or another mapping names.
34Object_Markedvalue: the handle of a memory object; found: its pages with a protection of their own. The object is not mapped again and not given. The kernel gives it for Memory_Map and Handle_Give of an object that Memory_Protect changed.
35Whole_Onlyvalue: an address; limit: the bytes of the range. The range is a part of a mapping whose protection changes only whole (device memory, large pages), or of an area that the system keeps (a thread area). The kernel gives it for Memory_Protect.
36Not_Multiplevalue: the argument; limit: the number that it must be a multiple of; found: the rest. The kernel gives it for Memory_Create with Large_Pages and a count that is not a multiple of 512.
37Not_AuthenticThe bytes of the argument do not prove what they must: the tag of a sealed text, or a signature, does not verify. No byte of the result is given. The cryptography module gives it for an open of a sealed text, and QUIC for a packet or a handshake that does not verify. See not authentic.
38Seed_Too_WeakThe random seed of the process is weaker than the least strength that the caller accepts. value: the word of the op.Seed_Strength of the seed; limit: the word of the least strength asked. Nothing is made. random.fill_for_a_key gives it when the seed of the generator has a lower Seed_Strength than the call asks. A plain draw (random.fill) never gives it.
39ExistsThe name of the argument names something that exists already, and the call makes a new one. found: 0, or the number from 1 of the row of a table argument that names it. The storage service gives it for a new tree or object at a name in use.
40Starter_Modulevalue: the address that the call names; limit: the base of a module record that the starter of the process wrote (op.Module_Writer.Starter); found: its size in bytes. The kernel gives it with No_Right for Process_Module, Memory_Map and Memory_Unmap of a process in itself over that record: only a holder of its process handle changes it.

Read from src/library/modus/contract/errors/errors.odin.

Units

What value, limit and found count.

With the kinds No_Grant, Absent, Damaged and Handle_Absent the unit names instead the grant, the table or the thing that the kind is about: the comment of each member says so. UNIT_NAMES gives the words that a sentence uses for each unit.

The comment above Unit in src/library/modus/contract/errors/errors.odin.

NumberUnitIn a sentenceWhat the contract says
0NoneThe values are plain numbers, or the kind gives them their meaning.
1BytesbytesBytes of memory, of a file or of a text.
2PagespagesPages of 4096 bytes.
3BlocksblocksBlocks of a disk or of a store.
4ObjectsobjectsObjects of a store.
5StoresstoresStores of the storage service.
6ProcessesprocessesProcess slots of a budget.
7ThreadsthreadsThread slots of a budget, or the threads of a process.
8HandleshandlesThe handle table of a process.
9MappingsmappingsThe mappings of a process (op.MAPPING_REPORT_CAPACITY).
10ModulesmodulesModule records of a process.
11WordswordsThe words of one word wait.
12Log_Recordslog records in one secondLog records in one second.
13Processormicroseconds of processor time in one secondMicroseconds of processor time in one second.
14BudgetsbudgetsBudgets of the kernel.
15InterruptsinterruptsMessage interrupts (op.MESSAGE_CAPACITY).
16Memorymemory objectsMemory objects of the machine.
17Storea private storeNo_Grant: a private store.
18Acts_For_Principalto act for the principalNo_Grant: to act for the principal whose session the caller belongs to.
19RecordsrecordsRecords of a table argument: ranges, rules, rows.
20Connectiona connection to this serviceNo_Grant: a connection to the service.
21MillisecondsmillisecondsA time: a time limit or a time waited.
22ConnectionsconnectionsThe records of a TCP connection table (src/library/modus/tcp).
23Tcp_Portslocal TCP portsThe local TCP ports of a client grant.
24Requestsrequests in flightRequests in flight.
25Endpointa remote address and portA remote of the network: an IPv4 address and a port, in one value (endpoint_pack). No_Grant: value the remote that the call names, limit the remote of the grant (0: none), found the local port when it is not a port of the endpoint.
26Regiona data regionAbsent: the data region of a ring. Overlap: bytes of the call region of an isolated call; value is their offset, limit their count.
27Root_Commandsthe commands of the root ring that change other processesNo_Grant: the commands of the root ring that change other processes.
28Servicesservices that runServices that run.
29Grantsgrants of the processThe grants of a process (system.Root_Grant).
30Displaya surface on the screenNo_Grant: a surface on the screen (the ring to the compositor).
31Terminala terminalNo_Grant: a terminal (the terminal ring and the text region).
32Lent_Handleshandles lent for this callHandle_Absent: the handle did not come through the call ring for this call (an isolated call).
33Versionsversions of the objectAbsent: the versions of an object (value: the generation that the argument named).
34Countsthe counts of the blocks of the storeDamaged: the counts of the blocks of a store are not trusted after a fault of the service; it makes no change in the store.
35Referencesnames of one blockOver_Limit: the names of one block, which a count holds.
36Commit_Blocksblocks that one commit can changeFull: the blocks that one commit can change or write.
37Principalsnamed principalsThe named principals of the root service. Full: limit the named principals that it holds; Absent: no such principal, or no session runs. See: Principals
38Placesplaces of the connectionThe places of a connection to the storage service: Absent, the number names no place of the connection, or the tree of the place was removed or renamed; Full, the table of places. See: Storage
39TreestreesAbsent: the name names no tree. Bad_Value: a tree would move inside itself.
40Changesa change of the store (the connection reads only)No_Grant: a change of a store; the connection reads only.
41Pendingpending changes of the objectThe pending changes of an object in the storage service. Full: limit the blocks that the service holds for them. Absent: the object has no pending change on this connection; found 1: another change of the object came first, and its pending changes are dropped. See: Storage: Ranges
42Debug_Objectsdebug objects of the modules of the processAbsent: the debug objects of the modules of a debugged process; no one describes the module of the address. See: Developer tools: The debugger
43Breakpointsbreakpoints of a threadThe breakpoints of a thread. Full: limit the breakpoints that a thread has (op.THREAD_BREAKPOINT_CAPACITY). Absent: the number names no breakpoint of the debugger.
44Held_Threadsthreads that the debugger holdsAbsent: the threads that the debugger holds; the thread of the argument runs, or the process has no thread with this number.
45Debugged_Processesprocesses that the debugger service debugs for this callerThe processes that the debugger service debugs. Absent: the caller attached to none. Full: the service debugs a process for another caller; limit the processes that it debugs at one time.
46Readable_Variablesvariables that are readable at this instructionAbsent: the variables that are visible and readable at the instruction of a frame; the name of the argument is none of them, or its location is not readable there.
47Debug_Accessthe debug access to this processNo_Grant: the debug access to a process. found: 0, or 1 + the number of the start grant of the process that refuses it (start_grant.Grant); a sentence writes the name of that grant.
48Stack_Framesframes of the stack of the threadAbsent: the frames of the stack of a held thread; the number of the argument is past the last frame.
49Source_Placesprocedures and source lines of the debug objectsAbsent: the procedures and the source lines of the debug objects; the place of the argument names none.
50Stop_Reportsstop reports of disk processes that the root service keepsAbsent: the stop reports of disk processes that the root service keeps; no disk process of the principal of the caller with this nickname stopped on a fault, or newer reports took its place. See: The debug object of a disk process in the repository
51Versions_Erasethe erase of the versions of an objectNo_Grant: the erase of the versions of an object (the start grant Versions_Erase). See: Storage: The erase of versions
52Dropped_Writesblocks that the disk did not keepDevice: the blocks of a commit that the disk answered with Ok and did not keep; found: their count. The storage service refused the commit. See: Storage: The commit and the open
53NanosecondsnanosecondsA time of the system clock, or a span of it, in nanoseconds: the time of a record of a timed stream (src/library/modus/contract/timed_stream).
54FramesframesFrames of a timed stream: one sample of each channel (src/library/modus/contract/timed_stream).
55Record_Typesrecord types of the two ends of a wiringBad_Value: the record descriptions of the two ends of a wiring differ (src/library/modus/contract/output, record_descriptions_compare). value: the Description_Difference; limit: the first field that differs, from 1, or 0 for the record; found: the row of the wiring list.
56Wiring_Rowsrows of the wiring listBad_Value: a row of a wiring list. argument: the field, from 1 (output.Wiring_Field); value: the word; limit: the largest word there; found: the row from 1, or 0 for the list as a whole.
57Wiring_Termsbytes of the wiring termsBad_Value or Out_Of_Range: the wiring terms of a row. value: their count of bytes; limit: the size of their description, 0 for a record input that takes none; found: the row.
58Wiringswirings of the root serviceThe wirings of the root service. No_Grant: the asker did not start the process of the end, or does not act for the principal of the connection. Busy: the wiring ring of a process has no room, limit its capacity. Bad_Value: one process at both ends. found: the row.
59Input_Historiesinput history of the debugged processThe input history of the process that the debugger service debugs. Absent: the debugger started no record of it, or no record runs. Full: a record or a replay of it runs already. Out_Of_Range: value the input points of a step back, or the point before which a watch back looks, limit the input points of the history. Bad_Value: the module of the boot image is not the module of the history. Damaged: the header of the history is not a valid header. See: Record and replay of a process in the repository
60Checkpointscheckpoints of the recorded processThe checkpoints that the debugger service keeps of a recorded process. Absent: no checkpoint is at or before the input point that a step back names. Exists: a checkpoint is at this input point, or at a later one, already. See: Record and replay of a process in the repository
61Recorded_Writeswrites of the input historyAbsent: no input of the history before the point wrote a byte of the range of a watch back. value: the address; limit: the count of bytes; found: the point, 0 for the whole history. See: Record and replay of a process in the repository
62Kernel_Statusstatus of the kernelRefused: a kernel operation inside the call refused, and found is its op.Status, which a sentence names in words.

Read from src/library/modus/contract/errors/errors.odin.

Error_Record struct

A struct of the package errors: 56 bytes, aligned on 8 bytes, 0 bytes of padding. The error record: what a call that failed says about why, as seven integers.

  • kindi6408 bytes
  • uniti6488 bytes
  • operationi64168 bytes
  • argumenti64248 bytes
  • valuei64328 bytes
  • limiti64408 bytes
  • foundi64488 bytes

Pages type of the package manual_pages

Pages :: struct {...}

A valid file: the reads below take it.

src/library/modus/contract/manual_pages/manual_pages.odin:78

Region type of the package kernel

Region :: struct {...}

A type with no comment in its source.

src/modulus/process.odin:45

Terminal type of the package terminal_records

Terminal :: struct {...}

A terminal, as the process that writes sees it.

src/library/modus/terminal/terminal.odin:322

ring_open procedure of the package system

ring_open :: proc "contextless" (memory: Handle, error: ^errors. = nil, receive_handles := false) -> (mapped: ring.Ring, status: Status)

ring_open maps the memory of a ring in this process.

src/library/modus/system/system.odin:936

open procedure of the package ring

open :: proc "contextless" (memory: rawptr, page_count: u64) -> (ring: Ring, ok: bool)

open gives the ring in mapped memory of page_count pages.

src/library/modus/contract/ring/ring.odin:141

fill_for_a_key procedure of the package random

fill_for_a_key :: proc "contextless" (generator: ^Generator, output: []u8, least_strength: Seed_Strength, error: ^errors.) -> bool

fill_for_a_key writes random bytes in output for a key, a nonce or.

src/library/modus/random/generator.odin:162

fill procedure of the package random

fill :: proc "contextless" (generator: ^Generator, output: []u8)

fill writes random bytes in output.

src/library/modus/random/generator.odin:123

UNIT_NAMES global variable of the package errors

UNIT_NAMES := [Unit]string {...}

The words of each unit in a sentence: "the budget holds 10 pages".

src/library/modus/contract/errors/errors.odin:521