puma 4.1.0-java → 4.1.1-java
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puma might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/History.md +7 -0
- data/lib/puma/accept_nonblock.rb +5 -1
- data/lib/puma/cluster.rb +30 -35
- data/lib/puma/const.rb +1 -1
- data/lib/puma/events.rb +2 -2
- data/lib/puma/puma_http11.jar +0 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d014c9b6cd9b7b4270a8fba7b5a23408f7a58aa010d9296f612bb740974a5c72
|
4
|
+
data.tar.gz: 725c17b258b7063bbbcd2ff1d35172258a853d013762541f35ab6af1882cc4c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e81361dacd7dda921308c80868ccaa4c7f5788a16e779b73c9efef941f6df18429dac9fe9b98b38790b9e8e4988ad16caddb0702c706e2286e03d5c49602baf9
|
7
|
+
data.tar.gz: e16c1233ab6eb6b45a1c0dc2d6c16bfc47a5e0784014e0e862f7b1e054b881247e0ce9d36e2a855d47ee6bc3629262fc3cfc28f55b3f8d05297aab228e2a2280
|
data/History.md
CHANGED
@@ -6,6 +6,13 @@
|
|
6
6
|
* Bugfixes
|
7
7
|
* Your bugfix goes here (#Github Number)
|
8
8
|
|
9
|
+
## 4.1.1 / 2019-09-05
|
10
|
+
|
11
|
+
* 3 bugfixes
|
12
|
+
* Revert our attempt to not dup STDOUT/STDERR (#1946)
|
13
|
+
* Fix socket close on error (#1941)
|
14
|
+
* Fix workers not shutting down correctly (#1908)
|
15
|
+
|
9
16
|
## 4.1.0 / 2019-08-08
|
10
17
|
|
11
18
|
* 4 features
|
data/lib/puma/accept_nonblock.rb
CHANGED
data/lib/puma/cluster.rb
CHANGED
@@ -35,34 +35,10 @@ module Puma
|
|
35
35
|
@workers.each { |x| x.term }
|
36
36
|
|
37
37
|
begin
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
rescue Errno::ECHILD
|
43
|
-
# child is already terminated
|
44
|
-
end
|
45
|
-
end
|
46
|
-
else
|
47
|
-
# below code is for a bug in Ruby 2.6+, above waitpid call hangs
|
48
|
-
t_st = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
49
|
-
pids = @workers.map(&:pid)
|
50
|
-
loop do
|
51
|
-
pids.reject! do |w_pid|
|
52
|
-
begin
|
53
|
-
if Process.waitpid(w_pid, Process::WNOHANG)
|
54
|
-
log " worker status: #{$?}"
|
55
|
-
true
|
56
|
-
end
|
57
|
-
rescue Errno::ECHILD
|
58
|
-
true # child is already terminated
|
59
|
-
end
|
60
|
-
end
|
61
|
-
break if pids.empty?
|
62
|
-
sleep 0.5
|
63
|
-
end
|
64
|
-
t_end = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
65
|
-
log format(" worker shutdown time: %6.2f", t_end - t_st)
|
38
|
+
loop do
|
39
|
+
wait_workers
|
40
|
+
break if @workers.empty?
|
41
|
+
sleep 0.2
|
66
42
|
end
|
67
43
|
rescue Interrupt
|
68
44
|
log "! Cancelled waiting for workers"
|
@@ -99,6 +75,7 @@ module Puma
|
|
99
75
|
@last_checkin = Time.now
|
100
76
|
@last_status = '{}'
|
101
77
|
@dead = false
|
78
|
+
@term = false
|
102
79
|
end
|
103
80
|
|
104
81
|
attr_reader :index, :pid, :phase, :signal, :last_checkin, :last_status, :started_at
|
@@ -120,6 +97,10 @@ module Puma
|
|
120
97
|
@dead = true
|
121
98
|
end
|
122
99
|
|
100
|
+
def term?
|
101
|
+
@term
|
102
|
+
end
|
103
|
+
|
123
104
|
def ping!(status)
|
124
105
|
@last_checkin = Time.now
|
125
106
|
@last_status = status
|
@@ -134,9 +115,9 @@ module Puma
|
|
134
115
|
if @first_term_sent && (Time.now - @first_term_sent) > @options[:worker_shutdown_timeout]
|
135
116
|
@signal = "KILL"
|
136
117
|
else
|
118
|
+
@term ||= true
|
137
119
|
@first_term_sent ||= Time.now
|
138
120
|
end
|
139
|
-
|
140
121
|
Process.kill @signal, @pid
|
141
122
|
rescue Errno::ESRCH
|
142
123
|
end
|
@@ -227,12 +208,7 @@ module Puma
|
|
227
208
|
# during this loop by giving the kernel time to kill them.
|
228
209
|
sleep 1 if any
|
229
210
|
|
230
|
-
|
231
|
-
while pid = Process.waitpid(-1, Process::WNOHANG) do
|
232
|
-
pids << pid
|
233
|
-
end
|
234
|
-
@workers.reject! { |w| w.dead? || pids.include?(w.pid) }
|
235
|
-
|
211
|
+
wait_workers
|
236
212
|
cull_workers
|
237
213
|
spawn_workers
|
238
214
|
|
@@ -554,5 +530,24 @@ module Puma
|
|
554
530
|
@wakeup.close
|
555
531
|
end
|
556
532
|
end
|
533
|
+
|
534
|
+
private
|
535
|
+
|
536
|
+
# loops thru @workers, removing workers that exited, and calling
|
537
|
+
# `#term` if needed
|
538
|
+
def wait_workers
|
539
|
+
@workers.reject! do |w|
|
540
|
+
begin
|
541
|
+
if Process.wait(w.pid, Process::WNOHANG)
|
542
|
+
true
|
543
|
+
else
|
544
|
+
w.term if w.term?
|
545
|
+
nil
|
546
|
+
end
|
547
|
+
rescue Errno::ECHILD
|
548
|
+
true # child is already terminated
|
549
|
+
end
|
550
|
+
end
|
551
|
+
end
|
557
552
|
end
|
558
553
|
end
|
data/lib/puma/const.rb
CHANGED
@@ -100,7 +100,7 @@ module Puma
|
|
100
100
|
# too taxing on performance.
|
101
101
|
module Const
|
102
102
|
|
103
|
-
PUMA_VERSION = VERSION = "4.1.
|
103
|
+
PUMA_VERSION = VERSION = "4.1.1".freeze
|
104
104
|
CODE_NAME = "Fourth and One".freeze
|
105
105
|
PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze
|
106
106
|
|
data/lib/puma/events.rb
CHANGED
data/lib/puma/puma_http11.jar
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Evan Phoenix
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
|
-
|
139
|
-
rubygems_version: 2.7.9
|
138
|
+
rubygems_version: 3.0.4
|
140
139
|
signing_key:
|
141
140
|
specification_version: 4
|
142
141
|
summary: Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for
|