Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Rust deps #4596

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Conversation

tiziano88
Copy link
Collaborator

No description provided.

@tiziano88 tiziano88 force-pushed the tzn_update_rust_2024_01_03 branch 2 times, most recently from 6069d7f to 18efdb2 Compare January 3, 2024 21:41
@tiziano88 tiziano88 marked this pull request as ready for review January 3, 2024 21:41
@tiziano88 tiziano88 force-pushed the tzn_update_rust_2024_01_03 branch 2 times, most recently from bb4c26e to 665f720 Compare January 3, 2024 22:11
@tiziano88
Copy link
Collaborator Author

This was quite painful, and still some crates were not updatable in the end, we need to do another pass soon...

@tiziano88 tiziano88 force-pushed the tzn_update_rust_2024_01_03 branch 3 times, most recently from 20f5b3b to a58eb99 Compare January 9, 2024 21:28
@tiziano88 tiziano88 force-pushed the tzn_update_rust_2024_01_03 branch 7 times, most recently from 6780e41 to 24117f8 Compare January 15, 2024 17:02
@tiziano88
Copy link
Collaborator Author

@andrisaar @conradgrobler tests seem to fail consistently after this update. Below are the logs. Can you think of anything that may be causing it?

stage0 INFO: starting...
stage0 INFO: Enabled SEV features: SevStatus(0x0)
stage0 INFO: starting...
stage0 INFO: Enabled SEV features: SevStatus(0x0)
stage0 INFO: starting...
stage0 INFO: Enabled SEV features: SevStatus(0x0)
stage0 DEBUG: early E820 entry: [0x0000000000000000-0x0000000000080000), len 524288, type RAM
stage0 DEBUG: early E820 entry: [0x0000000000080000-0x00000000000a0000), len 131072, type ACPI
stage0 DEBUG: early E820 entry: [0x0000000000000000-0x0000000000080000), len 524288, type RAM
stage0 DEBUG: early E820 entry: [0x00000000000a0000-0x00000000000f0000), len 327680, type RESERVED
stage0 DEBUG: early E820 entry: [0x0000000000080000-0x00000000000a0000), len 131072, type ACPI
stage0 DEBUG: early E820 entry: [0x0000000000000000-0x0000000000080000), len 524288, type RAM
stage0 DEBUG: early E820 entry: [0x00000000000f0000-0x0000000000100000), len 65536, type DISABLED
stage0 DEBUG: early E820 entry: [0x00000000000a0000-0x00000000000f0000), len 327680, type RESERVED
stage0 DEBUG: early E820 entry: [0x0000000000080000-0x00000000000a0000), len 131072, type ACPI
stage0 DEBUG: early E820 entry: [0x0000000000100000-0x0000000080000000), len 2146435072, type RAM
stage0 DEBUG: early E820 entry: [0x00000000000f0000-0x0000000000100000), len 65536, type DISABLED
stage0 DEBUG: early E820 entry: [0x00000000000a0000-0x00000000000f0000), len 327680, type RESERVED
stage0 DEBUG: early E820 entry: [0x00000000feffc000-0x00000000ff000000), len 16384, type RESERVED
stage0 DEBUG: early E820 entry: [0x0000000000100000-0x0000000080000000), len 2146435072, type RAM
stage0 DEBUG: early E820 entry: [0x00000000000f0000-0x0000000000100000), len 65536, type DISABLED
stage0 DEBUG: early E820 entry: [0x00000000feffc000-0x00000000ff000000), len 16384, type RESERVED
stage0 DEBUG: early E820 entry: [0x0000000000100000-0x0000000080000000), len 2146435072, type RAM
stage0 DEBUG: early E820 entry: [0x00000000feffc000-0x00000000ff000000), len 16384, type RESERVED
stage0 DEBUG: Kernel cmdline:  console=ttyS0 panic=-1 brd.rd_nr=1 brd.rd_size=1000000 brd.max_part=1 ip=10.0.2.15:::255.255.255.0::eth0:off quiet
stage0 DEBUG: Kernel image size 4883392
stage0 DEBUG: Kernel image start address 0x0000000002000000
stage0 DEBUG: Kernel cmdline:  console=ttyS0 panic=-1 brd.rd_nr=1 brd.rd_size=1000000 brd.max_part=1 ip=10.0.2.15:::255.255.255.0::eth0:off quiet
stage0 DEBUG: Kernel image size 4883392
stage0 DEBUG: Kernel cmdline:  console=ttyS0 panic=-1 brd.rd_nr=1 brd.rd_size=1000000 brd.max_part=1 ip=10.0.2.15:::255.255.255.0::eth0:off quiet
stage0 DEBUG: Kernel image start address 0x0000000002000000
stage0 DEBUG: Kernel image size 4883392
stage0 DEBUG: Kernel image start address 0x0000000002000000
stage0 DEBUG: Kernel entry point 0x0000000002000200
stage0 DEBUG: Kernel entry point 0x0000000002000200
stage0 DEBUG: Kernel entry point 0x0000000002000200
stage0 INFO: Using x2APIC for AP initialization.
stage0 INFO: Using x2APIC for AP initialization.
stage0 INFO: Using x2APIC for AP initialization.
stage0 DEBUG: Local APIC: ProcessorLocalApic { header: ControllerHeader { structure_type: 0, len: 8 }, processor_uid: 0, apic_id: 0, flags: LocalApicFlags(ENABLED) }
stage0 DEBUG: Local APIC: ProcessorLocalApic { header: ControllerHeader { structure_type: 0, len: 8 }, processor_uid: 0, apic_id: 0, flags: LocalApicFlags(ENABLED) }
stage0 DEBUG: uninteresting structure: 1
stage0 DEBUG: uninteresting structure: 1
stage0 DEBUG: uninteresting structure: 1
stage0 DEBUG: Local APIC: ProcessorLocalApic { header: ControllerHeader { structure_type: 0, len: 8 }, processor_uid: 0, apic_id: 0, flags: LocalApicFlags(ENABLED) }
stage0 DEBUG: uninteresting structure: 1
stage0 DEBUG: uninteresting structure: 4
stage0 DEBUG: uninteresting structure: 1
stage0 DEBUG: uninteresting structure: 4
stage0 DEBUG: uninteresting structure: 1
stage0 INFO: Expected number of APs: 0, started number of APs: 0
stage0 INFO: Expected number of APs: 0, started number of APs: 0
stage0 DEBUG: uninteresting structure: 4
stage0 DEBUG: Initial RAM disk size 2689644
stage0 DEBUG: Initial RAM disk size 2689644
stage0 INFO: Expected number of APs: 0, started number of APs: 0
stage0 DEBUG: Initial RAM disk address 0x000000003fd6f000
stage0 DEBUG: Initial RAM disk address 0x000000003fd6f000
stage0 DEBUG: Initial RAM disk size 2689644
stage0 DEBUG: Initial RAM disk address 0x000000003fd6f000
stage0 DEBUG: Kernel image digest: [57, 23, 144, 252, 111, 82, 111, 45, 166, 174, 162, 99, 81, 47, 143, 210, 192, 15, 69, 149, 9, 6, 8, 123, 236, 32, 132, 45, 220, 229, 232, 231]
stage0 DEBUG: Kernel image digest: [57, 23, 144, 252, 111, 82, 111, 45, 166, 174, 162, 99, 81, 47, 143, 210, 192, 15, 69, 149, 9, 6, 8, 123, 236, 32, 132, 45, 220, 229, 232, 231]
stage0 DEBUG: Kernel image digest: [57, 23, 144, 252, 111, 82, 111, 45, 166, 174, 162, 99, 81, 47, 143, 210, 192, 15, 69, 149, 9, 6, 8, 123, 236, 32, 132, 45, 220, 229, 232, 231]
stage0 DEBUG: Kernel setup data digest: [72, 106, 232, 116, 169, 250, 210, 45, 90, 44, 202, 153, 137, 11, 220, 229, 248, 7, 141, 105, 45, 136, 222, 229, 177, 47, 191, 129, 202, 52, 16, 73]
stage0 DEBUG: Kernel setup data digest: [72, 106, 232, 116, 169, 250, 210, 45, 90, 44, 202, 153, 137, 11, 220, 229, 248, 7, 141, 105, 45, 136, 222, 229, 177, 47, 191, 129, 202, 52, 16, 73]
stage0 DEBUG: Kernel setup data digest: [72, 106, 232, 116, 169, 250, 210, 45, 90, 44, 202, 153, 137, 11, 220, 229, 248, 7, 141, 105, 45, 136, 222, 229, 177, 47, 191, 129, 202, 52, 16, 73]
stage0 DEBUG: Kernel image digest: [224, 33, 235, 146, 18, 177, 54, 32, 157, 189, 199, 48, 212, 5, 25, 212, 4, 112, 152, 217, 90, 131, 122, 238, 186, 172, 214, 227, 179, 138, 126, 35]
stage0 DEBUG: Kernel image digest: [224, 33, 235, 146, 18, 177, 54, 32, 157, 189, 199, 48, 212, 5, 25, 212, 4, 112, 152, 217, 90, 131, 122, 238, 186, 172, 214, 227, 179, 138, 126, 35]
stage0 DEBUG: Kernel image digest: [224, 33, 235, 146, 18, 177, 54, 32, 157, 189, 199, 48, 212, 5, 25, 212, 4, 112, 152, 217, 90, 131, 122, 238, 186, 172, 214, 227, 179, 138, 126, 35]
stage0 DEBUG: Initial RAM disk digest: [45, 137, 13, 153, 92, 38, 195, 123, 78, 225, 125, 233, 49, 197, 78, 15, 206, 166, 253, 46, 29, 249, 81, 114, 223, 61, 98, 202, 85, 52, 91, 121]
stage0 DEBUG: Initial RAM disk digest: [45, 137, 13, 153, 92, 38, 195, 123, 78, 225, 125, 233, 49, 197, 78, 15, 206, 166, 253, 46, 29, 249, 81, 114, 223, 61, 98, 202, 85, 52, 91, 121]
stage0 DEBUG: Initial RAM disk digest: [45, 137, 13, 153, 92, 38, 195, 123, 78, 225, 125, 233, 49, 197, 78, 15, 206, 166, 253, 46, 29, 249, 81, 114, 223, 61, 98, 202, 85, 52, 91, 121]
stage0 DEBUG: ACPI table generation digest: [150, 109, 254, 55, 53, 214, 181, 102, 178, 244, 56, 56, 135, 108, 99, 113, 206, 212, 109, 174, 4, 24, 17, 77, 247, 218, 202, 102, 90, 67, 154, 93]
stage0 DEBUG: ACPI table generation digest: [150, 109, 254, 55, 53, 214, 181, 102, 178, 244, 56, 56, 135, 108, 99, 113, 206, 212, 109, 174, 4, 24, 17, 77, 247, 218, 202, 102, 90, 67, 154, 93]
stage0 DEBUG: ACPI table generation digest: [150, 109, 254, 55, 53, 214, 181, 102, 178, 244, 56, 56, 135, 108, 99, 113, 206, 212, 109, 174, 4, 24, 17, 77, 247, 218, 202, 102, 90, 67, 154, 93]
stage0 DEBUG: E820 table digest: [87, 31, 66, 95, 95, 74, 83, 36, 195, 194, 198, 187, 88, 248, 46, 189, 197, 211, 98, 202, 3, 228, 129, 8, 0, 193, 141, 100, 193, 65, 185, 26]
stage0 DEBUG: E820 table digest: [87, 31, 66, 95, 95, 74, 83, 36, 195, 194, 198, 187, 88, 248, 46, 189, 197, 211, 98, 202, 3, 228, 129, 8, 0, 193, 141, 100, 193, 65, 185, 26]
stage0 DEBUG: E820 table digest: [87, 31, 66, 95, 95, 74, 83, 36, 195, 194, 198, 187, 88, 248, 46, 189, 197, 211, 98, 202, 3, 228, 129, 8, 0, 193, 141, 100, 193, 65, 185, 26]
stage0 INFO: jumping to kernel at 0x0000000002000200
stage0 INFO: jumping to kernel at 0x0000000002000200
stage0 INFO: jumping to kernel at 0x0000000002000200
PCI: Fatal: No config space access function found
PCI: Fatal: No config space access function found
PCI: Fatal: No config space access function found
mke2fs 1.47.0 (5-Feb-2023)
Creating filesystem with 250000 4k blocks and 62592 inodes
Filesystem UUID: b47434fc-9d62-4e36-952f-cd277a5283ec
Superblock backups stored on blocks:
	32768, 98304, 163840, 229376

Allocating group tables: done
mke2fs 1.47.0 (5-Feb-2023)
Creating filesystem with 250000 4k blocks and 62592 inodes
Filesystem UUID: 75f5145a-5d13-4618-b009-28eb2d1ca42e
Superblock backups stored on blocks:
	32768, 98304, 163840, 229376

mke2fs 1.47.0 (5-Feb-2023)
Allocating group tables: done
Creating filesystem with 250000 4k blocks and 62592 inodes
Filesystem UUID: 3edb89d6-f531-45b7-a5c4-a9d7cf7d9c91
Superblock backups stored on blocks:
Writing inode tables: done
	32768, 98304, 163840, 229376

Allocating group tables: done
Writing superblocks and filesystem accounting information: done

Error: EBADF: Bad file number
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
Writing inode tables: done
Kernel Offset: 0xd400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
Writing superblocks and filesystem accounting information: done

Error: EBADF: Bad file number
Writing inode tables: done
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
Kernel Offset: 0x2d000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
Writing superblocks and filesystem accounting information: done

Error: EBADF: Bad file number
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
Kernel Offset: 0x5400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
test test_launcher_echo has been running for over 60 seconds
test test_launcher_key_value_lookup has been running for over 60 seconds
test test_launcher_weather_lookup has been running for over 60 seconds

@andrisaar
Copy link
Collaborator

The error suggests it happens rather early in the boot process (we're creating file systems and whatnot), so I'd suspect the change to oak_containers_stage1 is the culprit here.

@@ -109,7 +106,7 @@ fn read_stage0_dice_data(start: PhysAddr) -> anyhow::Result<Stage0DiceData> {
length.try_into()?,
ProtFlags::PROT_READ | ProtFlags::PROT_WRITE,
MapFlags::MAP_SHARED,
dice_file.as_raw_fd(),
Some(dice_file),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be something like Some(dice_file.as_fd()) or Some(&dice_file). The current implementation consumes dice_file, which I think means that it is closed by the time we try to access it by reading from the mmaped memory range.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Conrad, great catch, that seems to be exactly the problem! 💯

@tiziano88 tiziano88 force-pushed the tzn_update_rust_2024_01_03 branch 2 times, most recently from 90f1cd6 to 2f6a8f7 Compare January 16, 2024 12:13
@tiziano88 tiziano88 merged commit b59e8b8 into project-oak:main Jan 16, 2024
17 checks passed
@tiziano88 tiziano88 deleted the tzn_update_rust_2024_01_03 branch January 16, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants