ares icon indicating copy to clipboard operation
ares copied to clipboard

Re-enable `%mean` hints in `+mook` and refactor SIGINT handling

Open ashelkovnykov opened this issue 1 year ago • 4 comments

  • Re-enable %mean hint processing in +mook. They were disabled around November of last year when they caused issues with booting pills.
  • Fix bug in %mean hint processing in +mook (variable name shadowing issue - we were using the wrong cell var)
  • Remove signal_hook crate for processing SIGINTs with a flag that was checked on Nock 2, 9, and 11. We now mprotect() the entire NockStack memory arena on SIGINT and gracefully recover from the resulting SIGSEGV.

Resolves #144 & #152

Note: I don't think that the double-tap case of SIGINT is being handled fully correctly right now, but it's difficult for me to check because of the machine from which I need to work on for now. Would appreciate whomever reviews this PR to play around with sending SIGINTs via Ctrl + C and compare to the ergonomics of doing so in Vere. Otherwise, I'll get to it on April 1, once I have my regular work machine back in action.

ashelkovnykov avatar Mar 26 '24 21:03 ashelkovnykov

No idea why the linter is whining. Everything builds, tests, and lints fine on my end using cargo 1.77.0 (3fe68eabf 2024-02-29).

ashelkovnykov avatar Mar 26 '24 22:03 ashelkovnykov

@ashelkovnykov I just opened #223 so we can have in-sync rust versions between CI and devs without forcing Nix on people.

eamsden avatar Mar 28 '24 12:03 eamsden

Just a friendly reminder about this PR – merging the %mean hint changes will improve some of the error messages. @eamsden @tacryt-socryp

Without the changes:

/lib/wrapper.hoon:<[67 5].[87 7]>
####
####
####
####
####
####
####
####
nest-fail
####
####

With the changes:

/lib/wrapper.hoon:<[67 5].[87 7]>
/lib/kernel.hoon::[255 1].[412 3]>
/lib/kernel.hoon::[71 1].[412 3]>
/lib/kernel.hoon::[20 1].[412 3]>
/lib/kernel.hoon::[2 1].[412 3]>
/lib/kernel.hoon::[385 3].[387 4]>
mint-nice
/lib/kernel.hoon::[387 3].[387 4]>
/lib/kernel.hoon::[386 3].[387 4]>
nest-fail
-have.@ud
-need.<1?ruo 1.jjz [product=<1.nhq [* <236.hio 51.enr 139.uat 33.rnj 1.pnw %139>]> <33.rnj 1.pnw %139>]> 

marcusmiguel avatar Sep 06 '24 15:09 marcusmiguel

Thanks for the reminder, we will definitely get to this!

eamsden avatar Sep 06 '24 17:09 eamsden

The necessary part of this was restaged in #273. We're going to completely rethink aborts and bails in the near future, so this PR is obsolete.

eamsden avatar Oct 11 '24 16:10 eamsden