Reading from rand: stalls the rest of the system in the meantime
-
I agree that I have searched opened and closed issues to prevent duplicates.
Description
Executing "less /dev/random" freezes Redox and even after 10 minutes it doesn't unfreeze.
Environment info
- Redox OS Release: 0.6.0
Steps to reproduce
- Open the terminal.
- Write "less /dev/random" and hit enter
Behavior
- Expected behavior: It should output random stuff to the shell.
- Actual behavior: The whole system freezed.
kernel::log:INFO -- Logger initialized.
kernel::arch::x86_64::start:INFO -- Redox OS starting...
kernel::arch::x86_64::start:INFO -- Kernel: 100000:A50BA8
kernel::arch::x86_64::start:INFO -- Stack: FFFF800000080000:FFFF80000009F000
kernel::arch::x86_64::start:INFO -- Env: FFFF80000009EFB0:FFFF80000009F000
kernel::arch::x86_64::start:INFO -- RSDPs: 0:0
kernel_end: A51000
bump_offset: 9F0000
MemoryArea { base: PhysicalAddress(0), size: 9F000 }
MemoryArea { base: PhysicalAddress(100000), size: 3FEDE000 }
Memory: 1024 MB
Table: A51000
256: A52003
511: 8000000000A51003
Permanently used: 12236 KB
kernel::acpi:INFO -- RSDP: RSDP { signature: [82, 83, 68, 32, 80, 84, 82, 32], checksum: 173, oemid: [66, 79, 67, 72, 83, 32], revision: 0, rsdt_address: 1073619526, length: 0, xsdt_address: 0, extended_checksum: 95, reserved: [83, 77, 95] }
RSDT:
FACP: 3FFE0040
APIC: FEE00000: 1
XAPIC 0: FFFF8000FEE00000
LocalApic(MadtLocalApic { processor: 0, id: 0, flags: 1 })
This is my local APIC
LocalApic(MadtLocalApic { processor: 1, id: 1, flags: 1 })
AP 1: IPI... SIPI... Wait... Trampoline... Ready
LocalApic(MadtLocalApic { processor: 2, id: 2, flags: 1 })
AP 2: IPI... SIPI... Wait... Trampoline... Ready
LocalApic(MadtLocalApic { processor: 3, id: 3, flags: 1 })
AP 3: IPI... SIPI... Wait... Trampoline... Ready
IoApic(MadtIoApic { id: 0, reserved: 0, address: 4273995776, gsi_base: 0 })
IntSrcOverride(MadtIntSrcOverride { bus_source: 0, irq_source: 0, gsi_base: 2, flags: 0 })
IntSrcOverride(MadtIntSrcOverride { bus_source: 0, irq_source: 5, gsi_base: 5, flags: 13 })
IntSrcOverride(MadtIntSrcOverride { bus_source: 0, irq_source: 9, gsi_base: 9, flags: 13 })
IntSrcOverride(MadtIntSrcOverride { bus_source: 0, irq_source: 10, gsi_base: 10, flags: 13 })
IntSrcOverride(MadtIntSrcOverride { bus_source: 0, irq_source: 11, gsi_base: 11, flags: 13 })
Unknown(4)
Unable to find DMAR
HPET: 0
DSDT: Parsed
HPET used as system timer
kernel:INFO -- AP 1: Ok(ContextId(1))
kernel:INFO -- AP 2: Ok(ContextId(4))
kernel:INFO -- AP 3: Ok(ContextId(3))
kernel:INFO -- BSP: Ok(ContextId(2)) 4
kernel:INFO -- Env: Ok("REDOXFS_BLOCK=0000000000000100\nREDOXFS_UUID=f0052344-6b8a-432e-9933-18c066acd791")
########## Redox OS ##########
# Login with the following: #
# `user` #
# `root`:`password` #
##############################
redox login: todo: clone grant using fmap: Grant { region: 0x40000010000..0x400001e5000 (0x1d5000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(18), number: 5, flags: 458752 }}, cloexec: true }) }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(18), number: 5, flags: 458752 }}, cloexec: true }
todo: clone grant using fmap: Grant { region: 0x40000152000..0x40000178000 (0x26000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 2, flags: 65956 }}, cloexec: true }) }
todo: clone grant using fmap: Grant { region: 0x40000178000..0x4000018b000 (0x13000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 3, flags: 65956 }}, cloexec: true }) }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 2, flags: 65956 }}, cloexec: true }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 3, flags: 65956 }}, cloexec: true }
todo: clone grant using fmap: Grant { region: 0x40000152000..0x40000178000 (0x26000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 2, flags: 65956 }}, cloexec: true }) }
todo: clone grant using fmap: Grant { region: 0x40000178000..0x4000018b000 (0x13000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 3, flags: 65956 }}, cloexec: true }) }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 2, flags: 65956 }}, cloexec: true }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 3, flags: 65956 }}, cloexec: true }
todo: clone grant using fmap: Grant { region: 0x40000071000..0x4000019d000 (0x12c000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }) }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }
todo: clone grant using fmap: Grant { region: 0x40000071000..0x4000019d000 (0x12c000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }) }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }
todo: clone grant using fmap: Grant { region: 0x40000071000..0x4000019d000 (0x12c000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }) }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }
todo: clone grant using fmap: Grant { region: 0x40000071000..0x4000019d000 (0x12c000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }) }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }
todo: clone grant using fmap: Grant { region: 0x40000071000..0x4000019d000 (0x12c000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }) }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }
todo: clone grant using fmap: Grant { region: 0x40000071000..0x4000019d000 (0x12c000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }) }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }
todo: clone grant using fmap: Grant { region: 0x40000071000..0x4000019d000 (0x12c000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }) }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 5, flags: 65956 }}, cloexec: true }
todo: clone grant using fmap: Grant { region: 0x40000152000..0x40000178000 (0x26000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 2, flags: 65956 }}, cloexec: true }) }
todo: clone grant using fmap: Grant { region: 0x40000178000..0x4000018b000 (0x13000 long), flags: PRESENT | WRITABLE | USER_ACCESSIBLE | NO_EXECUTE, mapped: true, owned: false, desc_opt: Some(FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 3, flags: 65956 }}, cloexec: true }) }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 2, flags: 65956 }}, cloexec: true }
Grant::unmap: close desc FileDescriptor { description: RwLock { data: FileDescription { namespace: SchemeNamespace(1), scheme: SchemeId(36), number: 3, flags: 65956 }}, cloexec: true }
The thing above is what qemu showed in the terminal
Optional extras
When I did "more /dev/random" it diden't freeze. Trying to open it with the file manager freezed it for 2~3 secounds but it unfreezed.