Removing LLD breaks kernel #23

Closed
opened 2020-06-29 16:53:29 +08:00 by pca006132 · 1 comment

Removing the dependency for lld would break the kernel for some functions and exception.
From what I've tested, it breaks when delay is called or an exception is raised.
Adding lld_9 back to shell.nix as dependency would fix it.

Minimal example with the latest master:

from artiq.experiment import *


class BlinkForever(EnvExperiment):
    def build(self):
        self.setattr_device("core")
        self.setattr_device("led0")

    @kernel
    def run(self):
        self.core.reset()
        print("OK!")
        delay(100*ms)

With lld_9 in shell.nix:

OK!
(terminated)

Log:

[     9.137520s] DEBUG(runtime::comms): received connection
[     9.152439s] DEBUG(runtime::kernel): Core1 started
[     9.157213s] DEBUG(runtime::kernel): FPU enabled on Core1
[     9.162800s] DEBUG(dyld): ELF target: 12336 bytes, align to 1000, allocated at 00161000
[     9.170824s] DEBUG(dyld): Relocating 0 rela, 0 rel, 64 pltrel
[     9.176592s] DEBUG(runtime::kernel): kernel loaded
[     9.182102s] DEBUG(runtime::kernel): kernel starting
[     9.187052s] DEBUG(runtime::rpc): send<2>(String)->None
[     9.193567s] DEBUG(runtime::rpc): recv ...->None
[     9.198178s] DEBUG(runtime::rpc): send<1>(None)->None
[     9.203216s] DEBUG(runtime::kernel): kernel finished
[     9.208976s] DEBUG(runtime::comms): peer closed connection

Without lld_9:

OK!
(not terminated)

Log:

[     7.110199s] DEBUG(runtime::comms): received connection
[     7.124930s] DEBUG(runtime::kernel): Core1 started
[     7.129706s] DEBUG(runtime::kernel): FPU enabled on Core1
[     7.135351s] DEBUG(dyld): ELF target: 16388 bytes, align to 1000, allocated at 00161000
[     7.143430s] DEBUG(dyld): Relocating 0 rela, 0 rel, 64 pltrel
[     7.149196s] DEBUG(runtime::kernel): kernel loaded
[     7.154518s] DEBUG(runtime::kernel): kernel starting
[     7.159466s] DEBUG(runtime::rpc): send<2>(String)->None
Removing the dependency for lld would break the kernel for some functions and exception. From what I've tested, it breaks when `delay` is called or an exception is raised. Adding `lld_9` back to `shell.nix` as dependency would fix it. Minimal example with the latest master: ```python from artiq.experiment import * class BlinkForever(EnvExperiment): def build(self): self.setattr_device("core") self.setattr_device("led0") @kernel def run(self): self.core.reset() print("OK!") delay(100*ms) ``` With `lld_9` in `shell.nix`: ``` OK! (terminated) ``` Log: ``` [ 9.137520s] DEBUG(runtime::comms): received connection [ 9.152439s] DEBUG(runtime::kernel): Core1 started [ 9.157213s] DEBUG(runtime::kernel): FPU enabled on Core1 [ 9.162800s] DEBUG(dyld): ELF target: 12336 bytes, align to 1000, allocated at 00161000 [ 9.170824s] DEBUG(dyld): Relocating 0 rela, 0 rel, 64 pltrel [ 9.176592s] DEBUG(runtime::kernel): kernel loaded [ 9.182102s] DEBUG(runtime::kernel): kernel starting [ 9.187052s] DEBUG(runtime::rpc): send<2>(String)->None [ 9.193567s] DEBUG(runtime::rpc): recv ...->None [ 9.198178s] DEBUG(runtime::rpc): send<1>(None)->None [ 9.203216s] DEBUG(runtime::kernel): kernel finished [ 9.208976s] DEBUG(runtime::comms): peer closed connection ``` ----- Without `lld_9`: ``` OK! (not terminated) ``` Log: ``` [ 7.110199s] DEBUG(runtime::comms): received connection [ 7.124930s] DEBUG(runtime::kernel): Core1 started [ 7.129706s] DEBUG(runtime::kernel): FPU enabled on Core1 [ 7.135351s] DEBUG(dyld): ELF target: 16388 bytes, align to 1000, allocated at 00161000 [ 7.143430s] DEBUG(dyld): Relocating 0 rela, 0 rel, 64 pltrel [ 7.149196s] DEBUG(runtime::kernel): kernel loaded [ 7.154518s] DEBUG(runtime::kernel): kernel starting [ 7.159466s] DEBUG(runtime::rpc): send<2>(String)->None ```

OK this is due to incorrect version of the artiq compiler, updating the nix channel solves the issue.

OK this is due to incorrect version of the artiq compiler, updating the nix channel solves the issue.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#23
There is no content yet.