https://toitlang.org/ logo
Hangs in Bucket
# help
t
Hi guys I am experiencing an issue with the Bucket class. Usually it works fine, but in one case trying to access the bucket will hang the task accessing it. This happens when our device has lost its WiFi connection. It doesn't matter if I try to access a global Bucket object, a member of a class, or a local object. My next move is to make a centralized class that handles a Bucket object and thus hopefully minimize the Bucket activity. Can you see what can make the task hang like that?
f
@kasperl any idea how the wifi could interfere with buckets?
k
I guess they are both serviced from the system process, but it's hard to imagine a way for the bucket rpcs to get blocked - unless something else is truly stuck in the system.
t
Could it be a service issue? Because after some debugging, it looks like it happens when invoking some service. I tried to avoid using bucket by hard coding some values, and instead it got stuck in a call to wifi.scan.
Additional info: we are running alpha.117 😄
k
We did have issues with deadlocks in the system process in the past. I can check when we fixed them.
There was a limit on the number of tasks we could use for processing rpcs and that could lead to deadlocks when the wifi needed flash bucket access.
Smells a bit like what you see 🙈
t
It does. I can try and work around that. Somehow... 🙂
f
any reason you don't update the system? 117 is ancient.
t
I think there is some issue with the i2c driver in espressif that is manageable in 117 and less so in the latest espressif. @Rikke knows about this.