patches and low-level development discussion
 help / color / mirror / code / Atom feed
d34229436cc35639106b2d87c506c50c9d949a5f blob 933 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
= Debugging
:page-parent: Development
:page-nav_order: 3

// SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
// SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later OR CC-BY-SA-4.0

== Extracting core dumps when running Spectrum in a VM

When using a VM to run the Spectrum host system, a special mechanism
is available to enable easy introspection of core files.

When a program on the Spectrum host system dumps core, the system will
attempt to upload the core file to _its_ host (i.e. the system running
Spectrum in a VM) using the vsock(7) protocol, on port 1129271877.

For example, when running Spectrum in a VM using `make run` in the
host/rootfs directory (which automatically sets up a virtio-vsock
device), the running this command on the development Linux system will
listen for a core file from Spectrum, and write it to a file:

[source,shell]
----
socat -u VSOCK-LISTEN:1129271877 CREATE:spectrum.core
----
debug log:

solving d342294 ...
found d342294 in https://spectrum-os.org/lists/archives/spectrum-devel/20221028110558.205351-1-evgeniia.nikolaenko@unikie.com/
found 3871a7c in https://spectrum-os.org/git/spectrum
preparing index
index prepared:
100644 3871a7c9fd523fb407bb7b3905e1b3442fe20c1d	Documentation/debugging.adoc

applying [1/1] https://spectrum-os.org/lists/archives/spectrum-devel/20221028110558.205351-1-evgeniia.nikolaenko@unikie.com/
diff --git a/Documentation/debugging.adoc b/Documentation/development/debugging.adoc
similarity index 79%
rename from Documentation/debugging.adoc
rename to Documentation/development/debugging.adoc
index 3871a7c..d342294 100644

Checking patch Documentation/debugging.adoc => Documentation/development/debugging.adoc...
Applied patch Documentation/debugging.adoc => Documentation/development/debugging.adoc cleanly.

index at:
100644 d34229436cc35639106b2d87c506c50c9d949a5f	Documentation/development/debugging.adoc

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).