converged sidecar fixes - #1902
Conversation
|
fantastic! taking a look now. @ngwese may be interested as he authored the original |
|
What are the implications for user scripts that use |
tehn
left a comment
There was a problem hiding this comment.
everything looks good to me. lots of little edges i didn't expect to be impacted--- really opened my eyes to how norns grew in complexity over the years
thank you!
i'm wondering if this will represent a breaking change we'll need to live with? a blocking which brings me to the SYSTEM UPDATE issue that you mention, basically also, |
Yes. This question has been running through my head... I haven't tried to tackle the answer to that question at this point, but my initial thought has been an override to
That is one possibility also.
That's right. I have that work mostly done. It reworks
The Lua util |
no problem, my pleasure. I'm excited to get this work and the follow up work in. I also didn't expect these little edges along the way 😄 |
while this will work, a great many scripts expect the command to be blocking, so changing that would break functionality. i'm curious what happens when the main thread gets blocked--- a slew of jack xruns? or does jack fail badly and quit? if it's the first i suspect we'll be ok. scripts running os.execute during "performance" is hopefully unlikely--- though i know many use it for setup. but also i think the converged update is such an improvement that it's worthwhile to suffer the breakage. i think people will help migrate/fix problem scripts. but the main problem i see is the potential quantity of abandoned scripts at this point, where the author may be difficult to get ahold of. (this is a separate conversation, sorry!) |
|
|
|
Yes, |
|
|
https://github.com/monome/norns-image/blob/main/config/norns-jack.service#L11 |
|
update just to be clear here... I was half asleep on that last post.
yes! this is a good experiment to try. I can look into it as part of the sidecar/update reworking. |
|
That's good news and feels like we're perhaps in a more healthy position not to mandate breaking change. |
|
Good news. I've got an override within weaver of I've had to make some further adjustments to sidecar but it's looking good. I'm going to cap the rework there and PR this weekend. |
|
that's fantastic news! happy to test as always when you're ready. |
|
also happy to test this work on slightly non-standard hardware (factory norns with cm4s) which might be a good thing! |
|
I'm a little delayed from my expected timing. Nature and flooding decided I should focus on my basement. :| |
|
nature does tend to make the decisions, i hope the situation improved and you get some relief from worrying about it (coming from someone very familiar with these situations!) |
sidecar: client concurrency, transport failures reported to lua, and the last in-process forks removed
why
the sidecar exists so the converged norns binary never
fork()s while holding the JACK real-time thread. some paths still forked in-process, or shelled out for data the process can read itself. also, the sidecar client had a couple of threading bugs.what
this PR brings in changes related to ongoing work on norns binary <-> sidecar communication.
this PR does not fix SYSTEM > UPDATE just yet. a follow-up PR will include sidecar/norns restructuring to resolve the update.sh regression and the unreliable restart issues in the converged norns binary.
BlockingReaderWriterQueue) with two producers,system_cmdfrom the matron lua thread andsidecar_client_cleanup'sREQUEST_QUITfrom the main thread. nowBlockingConcurrentQueue.run_cmd_lockwas never initialized, working only by static zero-init.statshelled out todf,vcgencmd, andcat /proc/statevery 2 seconds. nowstatvfs(),/sys/class/thermal/thermal_zone0/temp, and/proc/statread directly, dropping thevcgencmddependency.norns.cpu[4]was never written and the home screen's fourth cpu figure has been reading a constant0.. it now reports core 3.expand_filesystemwere the last in-processos.executesites, nownorns.system_cmd/util.make_dir.verified
df/vcgencmd,norns.cpu[4]goes live under load. stats work correctly on norns and norns shield.note
the settings password change path historically has passed a plaintext password through to logs upon error. this PR does not fix this. i've intentionally left that alone for the moment.