21 Apr 2021 |
Calvin Xiao | I will use yours, it's better have a message | 02:43:20 |
msp-greg | Please leave the variable as backtrace . I shorten too often... | 02:44:39 |
Calvin Xiao | I am installing ruby in Windows to test it... Seems Windows handle fatal error differently | 02:55:24 |
Calvin Xiao | Download image.png | 02:55:30 |
Calvin Xiao | Link: https://github.com/calvinxiao/puma/runs/2396589959?check_suite_focus=true | 02:56:30 |
msp-greg | Sound vaguely familiar. I'd say skip it on Windows. skip_if :windows . I think. | 03:00:55 |
Calvin Xiao | I will add skip_if :windows first, but still want to know why the process just exited. | 03:04:17 |
msp-greg | term signal? Which doesn't work on Windows... | 03:05:08 |
Calvin Xiao | On WSL2: fatal machine stack overflow in critical region | 03:10:47 |
Calvin Xiao | on Windows: SystemStackError stack level too deep , I can rescue this error though | 03:11:10 |
Calvin Xiao | skip it first | 03:11:18 |
msp-greg |
I can rescue this error though
If an error escapes from Minitest, it's usually pretty serious?
| 03:41:28 |
Calvin Xiao | I need to setup Windows environment to find out. | 03:43:23 |
msp-greg |
I can rescue this error though
I'll see what I can find. Feel free to ask questions about that, I've got a lot of Rubies on Windows...
| 03:45:11 |
msp-greg | *
I can rescue this error though
I'll see what I can find. Feel free to ask questions about that, I've got a lot of Rubies on Windows...
On both Windows & WSL2, I normally use Ruby trunk/master/head
| 03:46:24 |
Calvin Xiao | I think I need to switch to Ruby master in WSL2 too, better for open source development. | 03:48:58 |
msp-greg | I'm doing something wrong, I can't get it to rescue in Puma, but a ten line script works. Tired.
One thing - test method is low_level_error , Server method is lowlevel_error
| 04:27:52 |
Calvin Xiao | Can you share some knowledge about compiling puma on windows, I've installed Ruby using RubyInstaller, and git. | 04:36:13 |
Calvin Xiao | gem install puma works, but bundle exec rake compile fails | 04:36:29 |
msp-greg | bundle exec rake -rdevkit compile , myself and Lars Kanis asked that it be added in mkmf for Windows, but no interest... | 04:39:29 |
msp-greg | * bundle exec rake -rdevkit compile , myself and Lars Kanis asked that it be added in mkmf for Windows, but no interest...
The scripts used for GitHub Actions add the MSYS2 path info, so it's not needed there, which makes script more portable...
| 04:40:31 |
Calvin Xiao | It works, thanks. | 04:45:14 |
msp-greg | If you want a Ruby master build, I've got one that's built three times a day, see: https://github.com/MSP-Greg/ruby-loco/releases/tag/ruby-master
It's the mingw or ruby-mingw build in GitHub Actions...
| 04:45:19 |
msp-greg | AFK for the night | 04:45:43 |
Calvin Xiao | https://bugs.ruby-lang.org/issues/11692#note-8 https://bugs.ruby-lang.org/issues/13164 | 07:46:35 |
Calvin Xiao | In this gist, try 1 works, then segfault in try 2 (same code), run try 3 separately will cause segfault as well. https://gist.github.com/calvinxiao/a7793c63524259cc87cebb392212394c | 07:48:15 |
22 Apr 2021 |
Calvin Xiao | Here is my latest performance discovery, I want to reduce getpeername and recvfrom syscalls in @io.peeraddr in every request. I think we don't need to reset the @peerip in reset | 18:28:58 |
Calvin Xiao | https://github.com/puma/puma/blob/master/lib/puma/client.rb#L129 | 18:29:12 |
Calvin Xiao | The below codes will set the client.peerip or use the http header for remote ip | 18:30:32 |
Calvin Xiao | client = Client.new io, @binder.env(sock)
if remote_addr_value
client.peerip = remote_addr_value
elsif remote_addr_header
client.remote_addr_header = remote_addr_header
end
So, if a socket connection is established, the client ip is not likely to be changed.
| 18:33:27 |