Sampler: KeyError: 1158025688 #272

Closed
opened 2022-04-22 13:06:54 +08:00 by mwojcik · 6 comments
Member

On testing Sampler with or without power source connected

*** Testing Sampler ADCs.
Testing:  sampler0
Apply 1.5V to channel 0. Press ENTER when done.

Traceback (most recent call last):
  File "/nix/store/38wk05jhdcg8nnsb1m15m3n38ana5f9l-python3.9-artiq-8.0.unknown.beta/bin/.artiq_sinara_tester-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 808, in main
    experiment.run(tests)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 759, in run
    getattr(self, f"test_{name}")()
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 493, in test_samplers
    self.get_sampler_voltages(card_dev)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/language/core.py", line 79, in run_on_core
    self.core.run(fake_method, args, kwargs)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/core.py", line 92, in run
    self.comm.serve(embedding_map, symbolizer)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 819, in serve
    self._serve_rpc(embedding_map)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 667, in _serve_rpc
    args, kwargs = self._receive_rpc_args(embedding_map)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 511, in _receive_rpc_args
    value = self._receive_rpc_value(embedding_map)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 504, in _receive_rpc_value
    return receivers.get(tag)(self, embedding_map)
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 152, in <lambda>
    embedding_map.retrieve_object(kernel._read_int32()),
  File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/language/embedding_map.py", line 57, in retrieve_object
    return self.object_map[key]
KeyError: 1158025688

Will look into it later.

On testing Sampler with or without power source connected ``` *** Testing Sampler ADCs. Testing: sampler0 Apply 1.5V to channel 0. Press ENTER when done. Traceback (most recent call last): File "/nix/store/38wk05jhdcg8nnsb1m15m3n38ana5f9l-python3.9-artiq-8.0.unknown.beta/bin/.artiq_sinara_tester-wrapped", line 9, in <module> sys.exit(main()) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 808, in main experiment.run(tests) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 759, in run getattr(self, f"test_{name}")() File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/frontend/artiq_sinara_tester.py", line 493, in test_samplers self.get_sampler_voltages(card_dev) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/language/core.py", line 79, in run_on_core self.core.run(fake_method, args, kwargs) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/core.py", line 92, in run self.comm.serve(embedding_map, symbolizer) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 819, in serve self._serve_rpc(embedding_map) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 667, in _serve_rpc args, kwargs = self._receive_rpc_args(embedding_map) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 511, in _receive_rpc_args value = self._receive_rpc_value(embedding_map) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 504, in _receive_rpc_value return receivers.get(tag)(self, embedding_map) File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 152, in <lambda> embedding_map.retrieve_object(kernel._read_int32()), File "/nix/store/zxbwijgrf9kr0xqkjqgk1gyl83l6a1jq-python3-3.9.11-env/lib/python3.9/site-packages/artiq/language/embedding_map.py", line 57, in retrieve_object return self.object_map[key] KeyError: 1158025688 ``` Will look into it later.
sb10q added this to the Alpha milestone 2022-04-22 15:32:09 +08:00
sb10q added the
high-priority
label 2022-04-22 15:35:48 +08:00
Author
Member

I think it's an issue with RPC in general:

I was also checking the Urukul 9910 EEPROM (which writes/reads fine), I was trying to communicate with the PC somehow... and got to this basic case which causes the issue:

from artiq.experiment import *

from artiq.coredevice.core import Core

@nac3
class KeyError(EnvExperiment):
    core: KernelInvariant[Core]

    def build(self):
        self.setattr_device("core")

    @rpc
    def yes(self):
        pass

    @kernel
    def run(self):
        self.core.reset()
        self.yes()

I think it's an issue with RPC in general: I was also checking the Urukul 9910 EEPROM (which writes/reads fine), I was trying to communicate with the PC somehow... and got to this basic case which causes the issue: ``` from artiq.experiment import * from artiq.coredevice.core import Core @nac3 class KeyError(EnvExperiment): core: KernelInvariant[Core] def build(self): self.setattr_device("core") @rpc def yes(self): pass @kernel def run(self): self.core.reset() self.yes() ```
ychenfo was assigned by sb10q 2022-04-27 10:57:02 +08:00
Owner

Looks like a regression. ARTIQ be3f05a4c0b9ce726dbbe83a7d237d2327725c93 does not have the bug.

Looks like a regression. ARTIQ be3f05a4c0b9ce726dbbe83a7d237d2327725c93 does not have the bug.
Owner
2f55f578035ca2d65a5b05eed4b1f8db85d138b9 is the first bad commit
commit 2f55f578035ca2d65a5b05eed4b1f8db85d138b9
Author: Sebastien Bourdeauducq <sb@m-labs.hk>
Date:   Thu Mar 10 17:31:02 2022 +0800

    update dependencies
``` 2f55f578035ca2d65a5b05eed4b1f8db85d138b9 is the first bad commit commit 2f55f578035ca2d65a5b05eed4b1f8db85d138b9 Author: Sebastien Bourdeauducq <sb@m-labs.hk> Date: Thu Mar 10 17:31:02 2022 +0800 update dependencies ```
Owner

NAC3 60b3807ab3 -> 8fd868a673

(That's only 5 revisions)

NAC3 60b3807ab325bee3252bc0c451f0dcd5c4633ab7 -> 8fd868a673ffaf89f809bacb95733ca00eba85c9 (That's only 5 revisions)
Owner

The culprit is 94aac16cc5, reverting it works around the problem. Remove -pgo to reduce compilation time.

The culprit is 94aac16cc5b097333476e84622321abe74a4dbae, reverting it works around the problem. Remove ``-pgo`` to reduce compilation time.
sb10q closed this issue 2022-04-27 15:42:32 +08:00
Owner

Seems we're not out of the woods with this one...

from artiq.experiment import *
from artiq.coredevice.core import Core

@nac3
class RPCFail(EnvExperiment):
    core: KernelInvariant[Core]

    def build(self):
        self.setattr_device("core")
       
    @kernel
    def xxx(self):
        pass
    
    @rpc
    def report(self):
        print("OK")

    @kernel
    def run(self):
        self.xxx()
        self.report()
  File "/home/sb/artiq/artiq/language/core.py", line 79, in run_on_core
    self.core.run(fake_method, args, kwargs)
  File "/home/sb/artiq/artiq/coredevice/core.py", line 92, in run
    self.comm.serve(embedding_map, symbolizer)
  File "/home/sb/artiq/artiq/coredevice/comm_kernel.py", line 819, in serve
    self._serve_rpc(embedding_map)
  File "/home/sb/artiq/artiq/coredevice/comm_kernel.py", line 667, in _serve_rpc
    args, kwargs = self._receive_rpc_args(embedding_map)
  File "/home/sb/artiq/artiq/coredevice/comm_kernel.py", line 511, in _receive_rpc_args
    value = self._receive_rpc_value(embedding_map)
  File "/home/sb/artiq/artiq/coredevice/comm_kernel.py", line 504, in _receive_rpc_value
    return receivers.get(tag)(self, embedding_map)
  File "/home/sb/artiq/artiq/coredevice/comm_kernel.py", line 152, in <lambda>
    embedding_map.retrieve_object(kernel._read_int32()),
  File "/home/sb/artiq/artiq/language/embedding_map.py", line 57, in retrieve_object
    return self.object_map[key]
KeyError: 1158022160

NB: 1158022160 is 0x45060410 so this looks suspiciously like another core device pointer.

Seems we're not out of the woods with this one... ``` from artiq.experiment import * from artiq.coredevice.core import Core @nac3 class RPCFail(EnvExperiment): core: KernelInvariant[Core] def build(self): self.setattr_device("core") @kernel def xxx(self): pass @rpc def report(self): print("OK") @kernel def run(self): self.xxx() self.report() ``` ``` File "/home/sb/artiq/artiq/language/core.py", line 79, in run_on_core self.core.run(fake_method, args, kwargs) File "/home/sb/artiq/artiq/coredevice/core.py", line 92, in run self.comm.serve(embedding_map, symbolizer) File "/home/sb/artiq/artiq/coredevice/comm_kernel.py", line 819, in serve self._serve_rpc(embedding_map) File "/home/sb/artiq/artiq/coredevice/comm_kernel.py", line 667, in _serve_rpc args, kwargs = self._receive_rpc_args(embedding_map) File "/home/sb/artiq/artiq/coredevice/comm_kernel.py", line 511, in _receive_rpc_args value = self._receive_rpc_value(embedding_map) File "/home/sb/artiq/artiq/coredevice/comm_kernel.py", line 504, in _receive_rpc_value return receivers.get(tag)(self, embedding_map) File "/home/sb/artiq/artiq/coredevice/comm_kernel.py", line 152, in <lambda> embedding_map.retrieve_object(kernel._read_int32()), File "/home/sb/artiq/artiq/language/embedding_map.py", line 57, in retrieve_object return self.object_map[key] KeyError: 1158022160 ``` NB: 1158022160 is 0x45060410 so this looks suspiciously like another core device pointer.
sb10q reopened this issue 2022-04-27 18:21:58 +08:00
sb10q closed this issue 2022-05-17 11:53:14 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
2 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/nac3#272
No description provided.