addshore
05/19/2025, 9:11 AMPotential deadlock detected:
Process: 3
Program: a4ae897d-01f6-7c9d-fc35-fbe22fd3660d
BCI: 0x3365
Primitive: 18:1
fatal: Potential dead-lock
https://cdn.discordapp.com/attachments/1373951179188342874/1373951179419156550/message.txt?ex=682c473f&is=682af5bf&hm=4126efd35a96988791223e69d72badd507af655b8f6c0c2d239e846e9080b41e&
https://cdn.discordapp.com/attachments/1373951179188342874/1373951179910025277/message.txt?ex=682c4740&is=682af5c0&hm=09bb0f07bde59b39883515487541aedabc68906b4aeaa6471797de2f1f7f790d&
https://cdn.discordapp.com/attachments/1373951179188342874/1373951180253954089/message.txt?ex=682c4740&is=682af5c0&hm=1178145f4cf401366e9fa615398747cc779d4d855d8a4bc10e57bfa0593a7377&
https://cdn.discordapp.com/attachments/1373951179188342874/1373951180560007199/message.txt?ex=682c4740&is=682af5c0&hm=35edc188db635e1f2d38a666ac320c100688bf88244e9befb5b685a3db6ae0bf&
https://cdn.discordapp.com/attachments/1373951179188342874/1373951180954406952/message.txt?ex=682c4740&is=682af5c0&hm=53ea06e83ed6dc060e7be6192113df69d2eb35caa734f0c4275b73a4bfcd8e19&
https://cdn.discordapp.com/attachments/1373951179188342874/1373951181285752862/message.txt?ex=682c4740&is=682af5c0&hm=3447a006d593da568379f1aeef2dd7e35f9c3ea64d64b17d395f4e3108d54c2b&
https://cdn.discordapp.com/attachments/1373951179188342874/1373951181625360394/message.txt?ex=682c4740&is=682af5c0&hm=5a7b9bda582d22db663200febb313d467b398ad8f2f40242d8668fb69ce734b8&
https://cdn.discordapp.com/attachments/1373951179188342874/1373951181935607899/message.txt?ex=682c4740&is=682af5c0&hm=d3f2ba2a779693172ea7aeacaf8d286da9610b7c5c2794cc197754d903c52d88&floitsch
05/19/2025, 9:12 AMfloitsch
05/19/2025, 9:13 AMEvents::register_monitor_notifier
https://github.com/toitlang/toit/blob/c44b5ed211e25ef32c1f113d27737f4a60fcf294/src/primitive.h#L567floitsch
05/19/2025, 9:14 AMaddshore
05/19/2025, 9:14 AMfloitsch
05/19/2025, 9:15 AMupdate_resource_monitor starts with Locker locker(mutex_) so this could actually be a real deadlock.floitsch
05/19/2025, 9:15 AMfloitsch
05/19/2025, 9:15 AMaddshore
05/19/2025, 9:16 AMaddshore
05/19/2025, 9:17 AMaddshore
05/19/2025, 9:17 AMaddshore
05/19/2025, 9:17 AMfloitsch
05/19/2025, 9:18 AMaddshore
05/19/2025, 9:19 AMfloitsch
05/19/2025, 9:19 AMkebab-case!!! 🙂addshore
05/19/2025, 9:20 AMaddshore
05/19/2025, 9:21 AMchannel_ = Channel 20
....
channel-send msg/protocol.Message -> none:
if active_:
channel_.send msg
...
run:
while true:
while msg / protocol.Message? := channel_.receive --blocking=false:
...
and also have a location-channel / Channel := ? that is never usedfloitsch
05/19/2025, 9:29 AMregister-monitor-notifier is only used when a new object (that can have system events) is created, or when sleep is called. During a receive call that should have already been done.kasperl
05/19/2025, 10:23 AMa4ae897d-01f6-7c9d-fc35-fbe22fd3660d is the id of it, so maybe we can get the snapshot from the envelope.addshore
05/19/2025, 11:42 AMaddshore
05/19/2025, 11:43 AMfloitsch
05/19/2025, 12:21 PM$HOME/local/.state/toit/a4ae897d-01f6-7c9d-fc35-fbe22fd3660d.snapshotaddshore
05/19/2025, 12:21 PMaddshore
05/19/2025, 12:23 PMfloitsch
05/19/2025, 12:28 PMaddshore
05/20/2025, 10:48 AMfloitsch
05/20/2025, 10:49 AMaddshore
05/20/2025, 10:49 AMaddshore
05/20/2025, 10:52 AMkasperl
05/21/2025, 11:25 AMinvoke primitive bytecode (0x3365 = 13157):
13149: register-monitor-notifier_ <sdk>/core/events_.toit:73:1
0/13153 [018] - load local 4
1/13154 [048] - as class RpcRequestQueue_?(125 - 136)
3/13156 [041] - pop 1
4/13157 [089] - invoke primitive {events::register_monitor_notifier}
8/13161 [053] - invoke static throw <sdk>/core/exceptions.toit:39:1
11/13164 [041] - pop 1