gitlab-fluent-plugin-detect-exceptions 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1115 @@
1
+ # Copyright 2016 Google Inc. All rights reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require_relative '../helper'
16
+ require 'fluent/plugin/exception_detector'
17
+
18
+ class ExceptionDetectorTest < Test::Unit::TestCase
19
+ JAVA_EXC_PART1 = <<END.freeze
20
+ Jul 09, 2015 3:23:29 PM com.google.devtools.search.cloud.feeder.MakeLog: RuntimeException: Run from this message!
21
+ at com.my.app.Object.do$a1(MakeLog.java:50)
22
+ at java.lang.Thing.call(Thing.java:10)
23
+ END
24
+
25
+ JAVA_EXC_PART2 = <<END.freeze
26
+ at com.my.app.Object.help(MakeLog.java:40)
27
+ at sun.javax.API.method(API.java:100)
28
+ at com.jetty.Framework.main(MakeLog.java:30)
29
+ END
30
+
31
+ JAVA_EXC = (JAVA_EXC_PART1 + JAVA_EXC_PART2).freeze
32
+
33
+ COMPLEX_JAVA_EXC = <<END.freeze
34
+ javax.servlet.ServletException: Something bad happened
35
+ at com.example.myproject.OpenSessionInViewFilter.doFilter(OpenSessionInViewFilter.java:60)
36
+ at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
37
+ at com.example.myproject.ExceptionHandlerFilter.doFilter(ExceptionHandlerFilter.java:28)
38
+ at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
39
+ at com.example.myproject.OutputBufferFilter.doFilter(OutputBufferFilter.java:33)
40
+ at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
41
+ at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
42
+ at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
43
+ at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
44
+ at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
45
+ at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
46
+ at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
47
+ at org.mortbay.jetty.Server.handle(Server.java:326)
48
+ at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
49
+ at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
50
+ at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
51
+ at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
52
+ at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
53
+ at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
54
+ at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
55
+ Caused by: com.example.myproject.MyProjectServletException
56
+ at com.example.myproject.MyServlet.doPost(MyServlet.java:169)
57
+ at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
58
+ at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
59
+ at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
60
+ at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
61
+ at com.example.myproject.OpenSessionInViewFilter.doFilter(OpenSessionInViewFilter.java:30)
62
+ ... 27 common frames omitted
63
+ END
64
+
65
+ NESTED_JAVA_EXC = <<END.freeze
66
+ java.lang.RuntimeException: javax.mail.SendFailedException: Invalid Addresses;
67
+ nested exception is:
68
+ com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 <[REDACTED_EMAIL_ADDRESS]>... Relaying denied
69
+
70
+ at com.nethunt.crm.api.server.adminsync.AutomaticEmailFacade.sendWithSmtp(AutomaticEmailFacade.java:236)
71
+ at com.nethunt.crm.api.server.adminsync.AutomaticEmailFacade.sendSingleEmail(AutomaticEmailFacade.java:285)
72
+ at com.nethunt.crm.api.server.adminsync.AutomaticEmailFacade.lambda$sendSingleEmail$3(AutomaticEmailFacade.java:254)
73
+ at java.util.Optional.ifPresent(Optional.java:159)
74
+ at com.nethunt.crm.api.server.adminsync.AutomaticEmailFacade.sendSingleEmail(AutomaticEmailFacade.java:253)
75
+ at com.nethunt.crm.api.server.adminsync.AutomaticEmailFacade.sendSingleEmail(AutomaticEmailFacade.java:249)
76
+ at com.nethunt.crm.api.email.EmailSender.lambda$notifyPerson$0(EmailSender.java:80)
77
+ at com.nethunt.crm.api.util.ManagedExecutor.lambda$execute$0(ManagedExecutor.java:36)
78
+ at com.nethunt.crm.api.util.RequestContextActivator.lambda$withRequestContext$0(RequestContextActivator.java:36)
79
+ at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
80
+ at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
81
+ at java.base/java.lang.Thread.run(Thread.java:748)
82
+ Caused by: javax.mail.SendFailedException: Invalid Addresses;
83
+ nested exception is:
84
+ com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 <[REDACTED_EMAIL_ADDRESS]>... Relaying denied
85
+
86
+ at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:2064)
87
+ at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1286)
88
+ at com.nethunt.crm.api.server.adminsync.AutomaticEmailFacade.sendWithSmtp(AutomaticEmailFacade.java:229)
89
+ ... 12 more
90
+ Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 <[REDACTED_EMAIL_ADDRESS]>... Relaying denied
91
+ END
92
+
93
+ NODE_JS_EXC = <<END.freeze
94
+ ReferenceError: myArray is not defined
95
+ at next (/app/node_modules/express/lib/router/index.js:256:14)
96
+ at /app/node_modules/express/lib/router/index.js:615:15
97
+ at next (/app/node_modules/express/lib/router/index.js:271:10)
98
+ at Function.process_params (/app/node_modules/express/lib/router/index.js:330:12)
99
+ at /app/node_modules/express/lib/router/index.js:277:22
100
+ at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
101
+ at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)
102
+ at next (/app/node_modules/express/lib/router/route.js:131:13)
103
+ at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
104
+ at /app/app.js:52:3
105
+ END
106
+
107
+ CLIENT_JS_EXC = <<END.freeze
108
+ Error
109
+ at bls (<anonymous>:3:9)
110
+ at <anonymous>:6:4
111
+ at a_function_name
112
+ at Object.InjectedScript._evaluateOn (http://<anonymous>/file.js?foo=bar:875:140)
113
+ at Object.InjectedScript.evaluate (<anonymous>)
114
+ END
115
+
116
+ V8_JS_EXC = <<END.freeze
117
+ V8 errors stack trace
118
+ eval at Foo.a (eval at Bar.z (myscript.js:10:3))
119
+ at new Contructor.Name (native)
120
+ at new FunctionName (unknown location)
121
+ at Type.functionName [as methodName] (file(copy).js?query='yes':12:9)
122
+ at functionName [as methodName] (native)
123
+ at Type.main(sample(copy).js:6:4)
124
+ END
125
+
126
+ PYTHON_EXC = <<END.freeze
127
+ Traceback (most recent call last):
128
+ File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
129
+ rv = self.handle_exception(request, response, e)
130
+ File "/base/data/home/apps/s~nearfieldspy/1.378705245900539993/nearfieldspy.py", line 17, in start
131
+ return get()
132
+ File "/base/data/home/apps/s~nearfieldspy/1.378705245900539993/nearfieldspy.py", line 5, in get
133
+ raise Exception('spam', 'eggs')
134
+ Exception: ('spam', 'eggs')
135
+ END
136
+
137
+ PHP_EXC = <<END.freeze
138
+ exception 'Exception' with message 'Custom exception' in /home/joe/work/test-php/test.php:5
139
+ Stack trace:
140
+ #0 /home/joe/work/test-php/test.php(9): func1()
141
+ #1 /home/joe/work/test-php/test.php(13): func2()
142
+ #2 {main}
143
+ END
144
+
145
+ PHP_ON_GAE_EXC = <<END.freeze
146
+ PHP Fatal error: Uncaught exception 'Exception' with message 'message' in /base/data/home/apps/s~crash-example-php/1.388306779641080894/errors.php:60
147
+ Stack trace:
148
+ #0 [internal function]: ErrorEntryGenerator::{closure}()
149
+ #1 /base/data/home/apps/s~crash-example-php/1.388306779641080894/errors.php(20): call_user_func_array(Object(Closure), Array)
150
+ #2 /base/data/home/apps/s~crash-example-php/1.388306779641080894/index.php(36): ErrorEntry->__call('raise', Array)
151
+ #3 /base/data/home/apps/s~crash-example-php/1.388306779641080894/index.php(36): ErrorEntry->raise()
152
+ #4 {main}
153
+ thrown in /base/data/home/apps/s~crash-example-php/1.388306779641080894/errors.php on line 60
154
+ END
155
+
156
+ GO_EXC = <<END.freeze
157
+ panic: my panic
158
+
159
+ goroutine 4 [running]:
160
+ panic(0x45cb40, 0x47ad70)
161
+ /usr/local/go/src/runtime/panic.go:542 +0x46c fp=0xc42003f7b8 sp=0xc42003f710 pc=0x422f7c
162
+ main.main.func1(0xc420024120)
163
+ foo.go:6 +0x39 fp=0xc42003f7d8 sp=0xc42003f7b8 pc=0x451339
164
+ runtime.goexit()
165
+ /usr/local/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc42003f7e0 sp=0xc42003f7d8 pc=0x44b4d1
166
+ created by main.main
167
+ foo.go:5 +0x58
168
+
169
+ goroutine 1 [chan receive]:
170
+ runtime.gopark(0x4739b8, 0xc420024178, 0x46fcd7, 0xc, 0xc420028e17, 0x3)
171
+ /usr/local/go/src/runtime/proc.go:280 +0x12c fp=0xc420053e30 sp=0xc420053e00 pc=0x42503c
172
+ runtime.goparkunlock(0xc420024178, 0x46fcd7, 0xc, 0x1000f010040c217, 0x3)
173
+ /usr/local/go/src/runtime/proc.go:286 +0x5e fp=0xc420053e70 sp=0xc420053e30 pc=0x42512e
174
+ runtime.chanrecv(0xc420024120, 0x0, 0xc420053f01, 0x4512d8)
175
+ /usr/local/go/src/runtime/chan.go:506 +0x304 fp=0xc420053f20 sp=0xc420053e70 pc=0x4046b4
176
+ runtime.chanrecv1(0xc420024120, 0x0)
177
+ /usr/local/go/src/runtime/chan.go:388 +0x2b fp=0xc420053f50 sp=0xc420053f20 pc=0x40439b
178
+ main.main()
179
+ foo.go:9 +0x6f fp=0xc420053f80 sp=0xc420053f50 pc=0x4512ef
180
+ runtime.main()
181
+ /usr/local/go/src/runtime/proc.go:185 +0x20d fp=0xc420053fe0 sp=0xc420053f80 pc=0x424bad
182
+ runtime.goexit()
183
+ /usr/local/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc420053fe8 sp=0xc420053fe0 pc=0x44b4d1
184
+
185
+ goroutine 2 [force gc (idle)]:
186
+ runtime.gopark(0x4739b8, 0x4ad720, 0x47001e, 0xf, 0x14, 0x1)
187
+ /usr/local/go/src/runtime/proc.go:280 +0x12c fp=0xc42003e768 sp=0xc42003e738 pc=0x42503c
188
+ runtime.goparkunlock(0x4ad720, 0x47001e, 0xf, 0xc420000114, 0x1)
189
+ /usr/local/go/src/runtime/proc.go:286 +0x5e fp=0xc42003e7a8 sp=0xc42003e768 pc=0x42512e
190
+ runtime.forcegchelper()
191
+ /usr/local/go/src/runtime/proc.go:238 +0xcc fp=0xc42003e7e0 sp=0xc42003e7a8 pc=0x424e5c
192
+ runtime.goexit()
193
+ /usr/local/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc42003e7e8 sp=0xc42003e7e0 pc=0x44b4d1
194
+ created by runtime.init.4
195
+ /usr/local/go/src/runtime/proc.go:227 +0x35
196
+
197
+ goroutine 3 [GC sweep wait]:
198
+ runtime.gopark(0x4739b8, 0x4ad7e0, 0x46fdd2, 0xd, 0x419914, 0x1)
199
+ /usr/local/go/src/runtime/proc.go:280 +0x12c fp=0xc42003ef60 sp=0xc42003ef30 pc=0x42503c
200
+ runtime.goparkunlock(0x4ad7e0, 0x46fdd2, 0xd, 0x14, 0x1)
201
+ /usr/local/go/src/runtime/proc.go:286 +0x5e fp=0xc42003efa0 sp=0xc42003ef60 pc=0x42512e
202
+ runtime.bgsweep(0xc42001e150)
203
+ /usr/local/go/src/runtime/mgcsweep.go:52 +0xa3 fp=0xc42003efd8 sp=0xc42003efa0 pc=0x419973
204
+ runtime.goexit()
205
+ /usr/local/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc42003efe0 sp=0xc42003efd8 pc=0x44b4d1
206
+ created by runtime.gcenable
207
+ /usr/local/go/src/runtime/mgc.go:216 +0x58
208
+ END
209
+
210
+ GO_ON_GAE_EXC = <<END.freeze
211
+ panic: runtime error: index out of range
212
+
213
+ goroutine 12 [running]:
214
+ main88989.memoryAccessException()
215
+ crash_example_go.go:58 +0x12a
216
+ main88989.handler(0x2afb7042a408, 0xc01042f880, 0xc0104d3450)
217
+ crash_example_go.go:36 +0x7ec
218
+ net/http.HandlerFunc.ServeHTTP(0x13e5128, 0x2afb7042a408, 0xc01042f880, 0xc0104d3450)
219
+ go/src/net/http/server.go:1265 +0x56
220
+ net/http.(*ServeMux).ServeHTTP(0xc01045cab0, 0x2afb7042a408, 0xc01042f880, 0xc0104d3450)
221
+ go/src/net/http/server.go:1541 +0x1b4
222
+ appengine_internal.executeRequestSafely(0xc01042f880, 0xc0104d3450)
223
+ go/src/appengine_internal/api_prod.go:288 +0xb7
224
+ appengine_internal.(*server).HandleRequest(0x15819b0, 0xc010401560, 0xc0104c8180, 0xc010431380, 0x0, 0x0)
225
+ go/src/appengine_internal/api_prod.go:222 +0x102b
226
+ reflect.Value.call(0x1243fe0, 0x15819b0, 0x113, 0x12c8a20, 0x4, 0xc010485f78, 0x3, 0x3, 0x0, 0x0, ...)
227
+ /tmp/appengine/go/src/reflect/value.go:419 +0x10fd
228
+ reflect.Value.Call(0x1243fe0, 0x15819b0, 0x113, 0xc010485f78, 0x3, 0x3, 0x0, 0x0, 0x0)
229
+ /tmp/ap
230
+ END
231
+
232
+ GO_SIGNAL_EXC = <<END.freeze
233
+ panic: runtime error: invalid memory address or nil pointer dereference
234
+ [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7fd34f]
235
+
236
+ goroutine 5 [running]:
237
+ panics.nilPtrDereference()
238
+ panics/panics.go:33 +0x1f
239
+ panics.Wait()
240
+ panics/panics.go:16 +0x3b
241
+ created by main.main
242
+ server.go:20 +0x91
243
+ END
244
+
245
+ GO_HTTP = <<END.freeze
246
+ 2019/01/15 07:48:05 http: panic serving [::1]:54143: test panic
247
+ goroutine 24 [running]:
248
+ net/http.(*conn).serve.func1(0xc00007eaa0)
249
+ /usr/local/go/src/net/http/server.go:1746 +0xd0
250
+ panic(0x12472a0, 0x12ece10)
251
+ /usr/local/go/src/runtime/panic.go:513 +0x1b9
252
+ main.doPanic(0x12f0ea0, 0xc00010e1c0, 0xc000104400)
253
+ /Users/ingvar/src/go/src/httppanic.go:8 +0x39
254
+ net/http.HandlerFunc.ServeHTTP(0x12be2e8, 0x12f0ea0, 0xc00010e1c0, 0xc000104400)
255
+ /usr/local/go/src/net/http/server.go:1964 +0x44
256
+ net/http.(*ServeMux).ServeHTTP(0x14a17a0, 0x12f0ea0, 0xc00010e1c0, 0xc000104400)
257
+ /usr/local/go/src/net/http/server.go:2361 +0x127
258
+ net/http.serverHandler.ServeHTTP(0xc000085040, 0x12f0ea0, 0xc00010e1c0, 0xc000104400)
259
+ /usr/local/go/src/net/http/server.go:2741 +0xab
260
+ net/http.(*conn).serve(0xc00007eaa0, 0x12f10a0, 0xc00008a780)
261
+ /usr/local/go/src/net/http/server.go:1847 +0x646
262
+ created by net/http.(*Server).Serve
263
+ /usr/local/go/src/net/http/server.go:2851 +0x2f5
264
+ END
265
+ CSHARP_EXC = <<END.freeze
266
+ System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
267
+ at System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.Int32,System.Double]].get_Item (System.String key) [0x00000] in <filename unknown>:0
268
+ at File3.Consolidator_Class.Function5 (System.Collections.Generic.Dictionary`2 names, System.Text.StringBuilder param_4) [0x00007] in /usr/local/google/home/Csharp/another file.csharp:9
269
+ at File3.Consolidator_Class.Function4 (System.Text.StringBuilder param_4, System.Double[,,] array) [0x00013] in /usr/local/google/home/Csharp/another file.csharp:23
270
+ at File3.Consolidator_Class.Function3 (Int32 param_3) [0x0000f] in /usr/local/google/home/Csharp/another file.csharp:27
271
+ at File3.Consolidator_Class.Function3 (System.Text.StringBuilder param_3) [0x00007] in /usr/local/google/home/Csharp/another file.csharp:32
272
+ at File2.Processor.Function2 (System.Int32& param_2, System.Collections.Generic.Stack`1& numbers) [0x00003] in /usr/local/google/home/Csharp/File2.csharp:19
273
+ at File2.Processor.Random2 () [0x00037] in /usr/local/google/home/Csharp/File2.csharp:28
274
+ at File2.Processor.Function1 (Int32 param_1, System.Collections.Generic.Dictionary`2 map) [0x00007] in /usr/local/google/home/Csharp/File2.csharp:34
275
+ at Main.Welcome+<Main>c__AnonStorey0.<>m__0 () [0x00006] in /usr/local/google/home/Csharp/hello.csharp:48
276
+ at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0
277
+ END
278
+
279
+ CSHARP_NESTED_EXC = <<END.freeze
280
+ System.InvalidOperationException: This is the outer exception ---> System.InvalidOperationException: This is the inner exception
281
+ at ExampleApp.NestedExceptionExample.LowestLevelMethod() in c:/ExampleApp/ExampleApp/NestedExceptionExample.cs:line 33
282
+ at ExampleApp.NestedExceptionExample.ThirdLevelMethod() in c:/ExampleApp/ExampleApp/NestedExceptionExample.cs:line 28
283
+ at ExampleApp.NestedExceptionExample.SecondLevelMethod() in c:/ExampleApp/ExampleApp/NestedExceptionExample.cs:line 18
284
+ --- End of inner exception stack trace ---
285
+ at ExampleApp.NestedExceptionExample.SecondLevelMethod() in c:/ExampleApp/ExampleApp/NestedExceptionExample.cs:line 22
286
+ at ExampleApp.NestedExceptionExample.TopLevelMethod() in c:/ExampleApp/ExampleApp/NestedExceptionExample.cs:line 11
287
+ at ExampleApp.Program.Main(String[] args) in c:/ExampleApp/ExampleApp/Program.cs:line 11
288
+ END
289
+
290
+ CSHARP_ASYNC_EXC = <<END.freeze
291
+ System.InvalidOperationException: This is an exception
292
+ at ExampleApp2.AsyncExceptionExample.LowestLevelMethod() in c:/ExampleApp/ExampleApp/AsyncExceptionExample.cs:line 36
293
+ at ExampleApp2.AsyncExceptionExample.<ThirdLevelMethod>d__2.MoveNext() in c:/ExampleApp/ExampleApp/AsyncExceptionExample.cs:line 31
294
+ --- End of stack trace from previous location where exception was thrown ---
295
+ at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
296
+ at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
297
+ at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
298
+ at ExampleApp2.AsyncExceptionExample.<SecondLevelMethod>d__1.MoveNext() in c:/ExampleApp/ExampleApp/AsyncExceptionExample.cs:line 25
299
+ --- End of stack trace from previous location where exception was thrown ---
300
+ at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
301
+ at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
302
+ at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
303
+ at ExampleApp2.AsyncExceptionExample.<TopLevelMethod>d__0.MoveNext() in c:/ExampleApp/ExampleApp/AsyncExceptionExample.cs:line 14
304
+ END
305
+
306
+ RUBY_EXC = <<END.freeze
307
+ NoMethodError (undefined method `resursivewordload' for #<BooksController:0x007f8dd9a0c738>):
308
+ app/controllers/books_controller.rb:69:in `recursivewordload'
309
+ app/controllers/books_controller.rb:75:in `loadword'
310
+ app/controllers/books_controller.rb:79:in `loadline'
311
+ app/controllers/books_controller.rb:83:in `loadparagraph'
312
+ app/controllers/books_controller.rb:87:in `loadpage'
313
+ app/controllers/books_controller.rb:91:in `onload'
314
+ app/controllers/books_controller.rb:95:in `loadrecursive'
315
+ app/controllers/books_controller.rb:99:in `requestload'
316
+ app/controllers/books_controller.rb:118:in `generror'
317
+ config/error_reporting_logger.rb:62:in `tagged'
318
+ END
319
+
320
+ RUBY_SEGFAULT_EXC = <<END.freeze
321
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_pb.rb:362: [BUG] Segmentation fault at 0x0000000000000089
322
+ ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
323
+
324
+ -- Control frame information -----------------------------------------------
325
+ c:0048 p:---- s:0264 e:000263 CFUNC :lookup
326
+ c:0047 p:1416 s:0259 e:000258 CLASS /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_pb.rb:362
327
+ c:0046 p:0049 s:0256 e:000255 TOP /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_pb.rb:318 [FINISH]
328
+ c:0045 p:---- s:0253 e:000252 CFUNC :require
329
+ c:0044 p:0007 s:0248 e:000247 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332
330
+ c:0043 p:0068 s:0245 e:000244 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299
331
+ c:0042 p:0010 s:0238 e:000237 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332
332
+ c:0041 p:0011 s:0232 e:000231 TOP /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_services_pb.rb:5 [FINISH]
333
+ c:0040 p:---- s:0229 e:000228 CFUNC :require
334
+ c:0039 p:0007 s:0224 e:000223 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332
335
+ c:0038 p:0068 s:0221 e:000220 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299
336
+ c:0037 p:0010 s:0214 e:000213 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332
337
+ c:0036 p:0109 s:0208 e:000207 TOP /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly.rb:32 [FINISH]
338
+ c:0035 p:---- s:0205 e:000204 CFUNC :require
339
+ c:0034 p:0032 s:0200 e:000199 BLOCK /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:74 [FINISH]
340
+ c:0033 p:---- s:0195 e:000194 CFUNC :each
341
+ c:0032 p:0042 s:0191 e:000190 BLOCK /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:69 [FINISH]
342
+ c:0031 p:---- s:0184 e:000183 CFUNC :each
343
+ c:0030 p:0026 s:0180 e:000179 METHOD /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:58
344
+ c:0029 p:0013 s:0175 e:000174 METHOD /usr/local/lib/ruby/2.7.0/bundler.rb:174
345
+ c:0028 p:0016 s:0170 e:000169 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/derailed_benchmarks-1.8.1/bin/derailed:53
346
+ c:0027 p:0006 s:0167 e:000166 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/memory_profiler-0.9.14/lib/memory_profiler/reporter.rb:74
347
+ c:0026 p:0015 s:0162 e:000161 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/memory_profiler-0.9.14/lib/memory_profiler/reporter.rb:33
348
+ c:0025 p:0021 s:0156 e:000155 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/memory_profiler-0.9.14/lib/memory_profiler.rb:15
349
+ c:0024 p:0062 s:0150 e:000149 BLOCK /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/derailed_benchmarks-1.8.1/bin/derailed:52 [FINISH]
350
+ c:0023 p:0054 s:0145 e:000144 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27
351
+ c:0022 p:0040 s:0137 e:000136 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127
352
+ c:0021 p:0235 s:0130 e:000129 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392
353
+ c:0020 p:0062 s:0117 e:000116 METHOD /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485
354
+ c:0019 p:0144 s:0110 e:000109 TOP /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/derailed_benchmarks-1.8.1/bin/derailed:93 [FINISH]
355
+ c:0018 p:---- s:0106 e:000105 CFUNC :load
356
+ c:0017 p:0112 s:0101 e:000100 TOP /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/bin/derailed:23 [FINISH]
357
+ c:0016 p:---- s:0096 e:000095 CFUNC :load
358
+ c:0015 p:0107 s:0091 e:000090 METHOD /usr/local/lib/ruby/2.7.0/bundler/cli/exec.rb:63
359
+ c:0014 p:0071 s:0083 e:000082 METHOD /usr/local/lib/ruby/2.7.0/bundler/cli/exec.rb:28
360
+ c:0013 p:0024 s:0078 e:000077 METHOD /usr/local/lib/ruby/2.7.0/bundler/cli.rb:476
361
+ c:0012 p:0054 s:0073 e:000072 METHOD /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27
362
+ c:0011 p:0040 s:0065 e:000064 METHOD /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127
363
+ c:0010 p:0239 s:0058 e:000057 METHOD /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399
364
+ c:0009 p:0008 s:0045 e:000044 METHOD /usr/local/lib/ruby/2.7.0/bundler/cli.rb:30
365
+ c:0008 p:0066 s:0040 e:000039 METHOD /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476
366
+ c:0007 p:0008 s:0033 e:000032 METHOD /usr/local/lib/ruby/2.7.0/bundler/cli.rb:24
367
+ c:0006 p:0109 s:0028 e:000027 BLOCK /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:46
368
+ c:0005 p:0002 s:0022 e:000021 METHOD /usr/local/lib/ruby/2.7.0/bundler/friendly_errors.rb:123
369
+ c:0004 p:0111 s:0017 E:001058 TOP /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:34 [FINISH]
370
+ c:0003 p:---- s:0013 e:000012 CFUNC :load
371
+ c:0002 p:0112 s:0008 E:002460 EVAL /usr/local/bin/bundle:23 [FINISH]
372
+ c:0001 p:0000 s:0003 E:0023a0 (none) [FINISH]
373
+
374
+ -- Ruby level backtrace information ----------------------------------------
375
+ /usr/local/bin/bundle:23:in `<main>'
376
+ /usr/local/bin/bundle:23:in `load'
377
+ /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:34:in `<top (required)>'
378
+ /usr/local/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'
379
+ /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:46:in `block in <top (required)>'
380
+ /usr/local/lib/ruby/2.7.0/bundler/cli.rb:24:in `start'
381
+ /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
382
+ /usr/local/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch'
383
+ /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
384
+ /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
385
+ /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
386
+ /usr/local/lib/ruby/2.7.0/bundler/cli.rb:476:in `exec'
387
+ /usr/local/lib/ruby/2.7.0/bundler/cli/exec.rb:28:in `run'
388
+ /usr/local/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `kernel_load'
389
+ /usr/local/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `load'
390
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/bin/derailed:23:in `<top (required)>'
391
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/bin/derailed:23:in `load'
392
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/derailed_benchmarks-1.8.1/bin/derailed:93:in `<top (required)>'
393
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
394
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
395
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
396
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
397
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/derailed_benchmarks-1.8.1/bin/derailed:52:in `block in <class:DerailedBenchmarkCLI>'
398
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/memory_profiler-0.9.14/lib/memory_profiler.rb:15:in `report'
399
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/memory_profiler-0.9.14/lib/memory_profiler/reporter.rb:33:in `report'
400
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/memory_profiler-0.9.14/lib/memory_profiler/reporter.rb:74:in `run'
401
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/derailed_benchmarks-1.8.1/bin/derailed:53:in `block (2 levels) in <class:DerailedBenchmarkCLI>'
402
+ /usr/local/lib/ruby/2.7.0/bundler.rb:174:in `require'
403
+ /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:58:in `require'
404
+ /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:58:in `each'
405
+ /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:69:in `block in require'
406
+ /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:69:in `each'
407
+ /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:74:in `block (2 levels) in require'
408
+ /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:74:in `require'
409
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly.rb:32:in `<top (required)>'
410
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require'
411
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299:in `load_dependency'
412
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `block in require'
413
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require'
414
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_services_pb.rb:5:in `<top (required)>'
415
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require'
416
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299:in `load_dependency'
417
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `block in require'
418
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require'
419
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_pb.rb:318:in `<top (required)>'
420
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_pb.rb:362:in `<module:Gitaly>'
421
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/gitaly-14.6.0.pre.rc1/ruby/proto/gitaly/repository-service_pb.rb:362:in `lookup'
422
+
423
+ -- Machine register context ------------------------------------------------
424
+ RIP: 0x00007fd8f45f40a2 RBP: 0x00007fd8f3655000 RSP: 0x00007fff198dd030
425
+ RAX: 0x0000000000000003 RBX: 0x00007fd8da7a2790 RCX: 0x0000000000000089
426
+ RDX: 0x000000000000003d RDI: 0x00007fd8f3655000 RSI: 0xcccccccccccccccd
427
+ R8: 0x0000000000000001 R9: 0x0000000000000000 R10: 0x00007fd8e238b680
428
+ R11: 0x0000000000000082 R12: 0x000000000008ff3a R13: 0xcccccccccccccccd
429
+ R14: 0x000000000000000d R15: 0x0003f134e098c94f EFL: 0x0000000000010202
430
+
431
+ -- C level backtrace information -------------------------------------------
432
+ /usr/local/lib/libruby.so.2.7(rb_vm_bugreport+0x555) [0x7fd8f4799605] vm_dump.c:755
433
+ [0x7fd8f45d6d17]
434
+ /usr/local/lib/libruby.so.2.7(sigsegv+0x4b) [0x7fd8f4704d2b] signal.c:946
435
+ /lib/x86_64-linux-gnu/libpthread.so.0(__restore_rt+0x0) [0x7fd8f42db730]
436
+ [0x7fd8f45f40a2]
437
+ /usr/local/lib/libruby.so.2.7(gc_marks_rest+0x80) [0x7fd8f45f9380] gc.c:5526
438
+ /usr/local/lib/libruby.so.2.7(gc_rest+0x7a) [0x7fd8f45fa09a] gc.c:7382
439
+ /usr/local/lib/libruby.so.2.7(garbage_collect_with_gvl+0x98) [0x7fd8f45fb7a8] gc.c:7514
440
+ /usr/local/lib/libruby.so.2.7(objspace_malloc_fixup+0x17) gc.c:9854
441
+ /usr/local/lib/libruby.so.2.7(rb_st_init_table_with_size+0x89) [0x7fd8f470eac9] st.c:620
442
+ /usr/local/lib/libruby.so.2.7(rebuild_table+0x1df) [0x7fd8f470ed5f] st.c:801
443
+ /usr/local/lib/libruby.so.2.7(rb_st_insert+0x1d8) [0x7fd8f470f398] st.c:1163
444
+ /usr/local/lib/ruby/2.7.0/x86_64-linux/objspace.so(newobj_i+0x206) [0x7fd8f2c37276] object_tracing.c:112
445
+ /usr/local/lib/libruby.so.2.7(tp_call_trace+0x29) [0x7fd8f4799ff9] vm_trace.c:1111
446
+ /usr/local/lib/libruby.so.2.7(exec_hooks_body+0x86) [0x7fd8f479a6b6] vm_trace.c:301
447
+ [0x7fd8f479c29d]
448
+ [0x7fd8f45ee2f3]
449
+ [0x7fd8f45fcdc7]
450
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/google-protobuf-3.19.1-x86_64-linux/lib/google/2.7/protobuf_c.so(0x7fd8d98943c9) [0x7fd8d98943c9]
451
+ /usr/local/lib/libruby.so.2.7(rb_class_new_instance+0x36) [0x7fd8f467f1c6] object.c:2099
452
+ /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/google-protobuf-3.19.1-x86_64-linux/lib/google/2.7/protobuf_c.so(0x7fd8d9895f84) [0x7fd8d9895f84]
453
+ [0x7fd8f47785c9]
454
+ [0x7fd8f479117c]
455
+ /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd8f4791915] vm_insnhelper.c:3026
456
+ [0x7fd8f4783ae2]
457
+ [0x7fd8f47895fc]
458
+ [0x7fd8f46359a5]
459
+ /usr/local/lib/libruby.so.2.7(rb_require_string+0x23) [0x7fd8f4636113] load.c:1148
460
+ [0x7fd8f47785c9]
461
+ [0x7fd8f479117c]
462
+ /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd8f4791915] vm_insnhelper.c:3026
463
+ [0x7fd8f478569a]
464
+ [0x7fd8f47895fc]
465
+ [0x7fd8f46359a5]
466
+ /usr/local/lib/libruby.so.2.7(rb_require_string+0x23) [0x7fd8f4636113] load.c:1148
467
+ [0x7fd8f47785c9]
468
+ [0x7fd8f479117c]
469
+ /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd8f4791915] vm_insnhelper.c:3026
470
+ [0x7fd8f478569a]
471
+ [0x7fd8f47895fc]
472
+ [0x7fd8f46359a5]
473
+ /usr/local/lib/libruby.so.2.7(rb_require_string+0x23) [0x7fd8f4636113] load.c:1148
474
+ [0x7fd8f47785c9]
475
+ [0x7fd8f4783ae2]
476
+ [0x7fd8f47895fc]
477
+ /usr/local/lib/libruby.so.2.7(rb_yield+0x253) [0x7fd8f47953e3] vm.c:1044
478
+ /usr/local/lib/libruby.so.2.7(rb_ary_each+0x3c) [0x7fd8f45491ac] array.c:2135
479
+ [0x7fd8f47785c9]
480
+ [0x7fd8f4783ba0]
481
+ [0x7fd8f47895fc]
482
+ /usr/local/lib/libruby.so.2.7(rb_yield+0x253) [0x7fd8f47953e3] vm.c:1044
483
+ /usr/local/lib/libruby.so.2.7(rb_ary_each+0x3c) [0x7fd8f45491ac] array.c:2135
484
+ [0x7fd8f47785c9]
485
+ [0x7fd8f479117c]
486
+ /usr/local/lib/libruby.so.2.7(vm_call_method+0x55) [0x7fd8f4791915] vm_insnhelper.c:3026
487
+ [0x7fd8f4783ba0]
488
+ [0x7fd8f47895fc]
489
+ [0x7fd8f478a468]
490
+ [0x7fd8f4783ae2]
491
+ [0x7fd8f4789db5]
492
+ /usr/local/lib/libruby.so.2.7(rb_ec_exec_node+0xaa) [0x7fd8f45db70a] eval.c:278
493
+ /usr/local/lib/libruby.so.2.7(ruby_run_node+0x49) [0x7fd8f45e0999] eval.c:336
494
+ /usr/local/bin/ruby(main+0x5b) [0x55bc6cf0910b] ./main.c:50
495
+
496
+ -- Other runtime information -----------------------------------------------
497
+
498
+ * Loaded script: /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/bin/derailed
499
+
500
+ * Loaded features:
501
+
502
+ 0 enumerator.so
503
+ 1 thread.rb
504
+ 2 rational.so
505
+ 3 complex.so
506
+ 4 ruby2_keywords.rb
507
+ 5 /usr/local/lib/ruby/2.7.0/x86_64-linux/enc/encdb.so
508
+ 6 /usr/local/lib/ruby/2.7.0/x86_64-linux/enc/trans/transdb.so
509
+ 7 /usr/local/lib/ruby/2.7.0/x86_64-linux/rbconfig.rb
510
+ 8 /usr/local/lib/ruby/2.7.0/rubygems/compatibility.rb
511
+ 9 /usr/local/lib/ruby/2.7.0/rubygems/defaults.rb
512
+ 10 /usr/local/lib/ruby/2.7.0/rubygems/deprecate.rb
513
+ 11 /usr/local/lib/ruby/2.7.0/rubygems/errors.rb
514
+ 12 /usr/local/lib/ruby/2.7.0/rubygems/version.rb
515
+ 13 /usr/local/lib/ruby/2.7.0/rubygems/requirement.rb
516
+ 14 /usr/local/lib/ruby/2.7.0/rubygems/platform.rb
517
+ 15 /usr/local/lib/ruby/2.7.0/rubygems/basic_specification.rb
518
+ 16 /usr/local/lib/ruby/2.7.0/rubygems/stub_specification.rb
519
+ 17 /usr/local/lib/ruby/2.7.0/rubygems/util.rb
520
+ 18 /usr/local/lib/ruby/2.7.0/rubygems/text.rb
521
+ 19 /usr/local/lib/ruby/2.7.0/rubygems/user_interaction.rb
522
+ 20 /usr/local/lib/ruby/2.7.0/rubygems/specification_policy.rb
523
+ 21 /usr/local/lib/ruby/2.7.0/rubygems/util/list.rb
524
+ 22 /usr/local/lib/ruby/2.7.0/rubygems/specification.rb
525
+ 23 /usr/local/lib/ruby/2.7.0/rubygems/exceptions.rb
526
+ 24 /usr/local/lib/ruby/2.7.0/rubygems/bundler_version_finder.rb
527
+ 25 /usr/local/lib/ruby/2.7.0/rubygems/dependency.rb
528
+ 26 /usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb
529
+ 27 /usr/local/lib/ruby/2.7.0/x86_64-linux/monitor.so
530
+ 28 /usr/local/lib/ruby/2.7.0/monitor.rb
531
+ 29 /usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb
532
+ 30 /usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_warn.rb
533
+ 31 /usr/local/lib/ruby/2.7.0/rubygems.rb
534
+ 32 /usr/local/lib/ruby/2.7.0/rubygems/path_support.rb
535
+ 33 /usr/local/lib/ruby/2.7.0/did_you_mean/version.rb
536
+ 34 /usr/local/lib/ruby/2.7.0/did_you_mean/core_ext/name_error.rb
537
+ 35 /usr/local/lib/ruby/2.7.0/did_you_mean/levenshtein.rb
538
+ 36 /usr/local/lib/ruby/2.7.0/did_you_mean/jaro_winkler.rb
539
+ 37 /usr/local/lib/ruby/2.7.0/did_you_mean/spell_checker.rb
540
+ 38 /usr/local/lib/ruby/2.7.0/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
541
+ 39 /usr/local/lib/ruby/2.7.0/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
542
+ 40 /usr/local/lib/ruby/2.7.0/did_you_mean/spell_checkers/name_error_checkers.rb
543
+ 41 /usr/local/lib/ruby/2.7.0/did_you_mean/spell_checkers/method_name_checker.rb
544
+ 42 /usr/local/lib/ruby/2.7.0/did_you_mean/spell_checkers/key_error_checker.rb
545
+ 43 /usr/local/lib/ruby/2.7.0/did_you_mean/spell_checkers/null_checker.rb
546
+ 44 /usr/local/lib/ruby/2.7.0/did_you_mean/formatters/plain_formatter.rb
547
+ 45 /usr/local/lib/ruby/2.7.0/did_you_mean/tree_spell_checker.rb
548
+ 46 /usr/local/lib/ruby/2.7.0/did_you_mean.rb
549
+ 47 /usr/local/lib/ruby/2.7.0/tsort.rb
550
+ 48 /usr/local/lib/ruby/2.7.0/rubygems/request_set/gem_dependency_api.rb
551
+ 49 /usr/local/lib/ruby/2.7.0/rubygems/request_set/lockfile/parser.rb
552
+ 50 /usr/local/lib/ruby/2.7.0/rubygems/request_set/lockfile/tokenizer.rb
553
+ 51 /usr/local/lib/ruby/2.7.0/rubygems/request_set/lockfile.rb
554
+ 52 /usr/local/lib/ruby/2.7.0/rubygems/request_set.rb
555
+ 53 /usr/local/lib/ruby/2.7.0/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb
556
+ 54 /usr/local/lib/ruby/2.7.0/rubygems/resolver/molinillo/lib/molinillo/errors.rb
557
+ 55 /usr/local/lib/ruby/2.7.0/set.rb
558
+ 56 /usr/local/lib/ruby/2.7.0/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb
559
+ 57 /usr/local/lib/ruby/2.7.0/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb
560
+
561
+ * Process memory map:
562
+
563
+ 55bc6cf08000-55bc6cf09000 r--p 00000000 08:01 2234292 /usr/local/bin/ruby
564
+ 55bc6cf09000-55bc6cf0a000 r-xp 00001000 08:01 2234292 /usr/local/bin/ruby
565
+ 55bc6cf0a000-55bc6cf0b000 r--p 00002000 08:01 2234292 /usr/local/bin/ruby
566
+ 55bc6cf0b000-55bc6cf0c000 r--p 00002000 08:01 2234292 /usr/local/bin/ruby
567
+ 55bc6cf0c000-55bc6cf0d000 rw-p 00003000 08:01 2234292 /usr/local/bin/ruby
568
+ 7fd8cdb83000-7fd8cdd41000 r--s 00000000 08:01 2089303 /lib/x86_64-linux-gnu/libc-2.28.so
569
+ 7fd8cdd41000-7fd8cdd72000 r--s 00000000 08:01 1068321 /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/google-protobuf-3.19.1-x86_64-linux/lib/google/2.7/protobuf_c.so
570
+ 7fd8cdd72000-7fd8cdda9000 r--s 00000000 08:01 2351143 /usr/local/lib/ruby/2.7.0/x86_64-linux/objspace.so
571
+ 7fd8cdda9000-7fd8cddcd000 r--s 00000000 08:01 2089362 /lib/x86_64-linux-gnu/libpthread-2.28.so
572
+ 7fd8cddcd000-7fd8ce760000 r--s 00000000 08:01 2234335 /usr/local/lib/libruby.so.2.7.5
573
+ 7fd8ce760000-7fd8ce791000 r--s 00000000 08:01 2234292 /usr/local/bin/ruby
574
+ 7fd8ce791000-7fd8d5f91000 rw-p 00000000 00:00 0
575
+ 7fd8d5f91000-7fd8d5ff0000 r--p 00000000 08:01 1069884 /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/2.7/grpc_c.so
576
+ 7fd8d5ff0000-7fd8d6411000 r-xp 0005f000 08:01 1069884 /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/2.7/grpc_c.so
577
+ 7fd8d6411000-7fd8d6592000 r--p 00480000 08:01 1069884 /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/2.7/grpc_c.so
578
+ 7fd8d6592000-7fd8d6593000 ---p 00601000 08:01 1069884 /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/2.7/grpc_c.so
579
+ 7fd8d6593000-7fd8d65be000 r--p 00601000 08:01 1069884 /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/2.7/grpc_c.so
580
+ 7fd8d65be000-7fd8d65c4000 rw-p 0062c000 08:01 1069884 /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/2.7/grpc_c.so
581
+ 7fd8d65c4000-7fd8d65d3000 rw-p 00000000 00:00 0
582
+
583
+ END
584
+
585
+ # The whitespace on the second line is significant.
586
+ # rubocop:disable TrailingWhitespace
587
+ RAILS_EXC = <<END.freeze
588
+ ActionController::RoutingError (No route matches [GET] "/settings"):
589
+
590
+ actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
591
+ actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
592
+ railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
593
+ railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call'
594
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged'
595
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
596
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged'
597
+ railties (5.1.4) lib/rails/rack/logger.rb:24:in `call'
598
+ actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
599
+ actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
600
+ rack (2.0.3) lib/rack/method_override.rb:22:in `call'
601
+ rack (2.0.3) lib/rack/runtime.rb:22:in `call'
602
+ activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
603
+ actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
604
+ rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
605
+ railties (5.1.4) lib/rails/engine.rb:522:in `call'
606
+ puma (3.10.0) lib/puma/configuration.rb:225:in `call'
607
+ puma (3.10.0) lib/puma/server.rb:605:in `handle_request'
608
+ puma (3.10.0) lib/puma/server.rb:437:in `process_client'
609
+ puma (3.10.0) lib/puma/server.rb:301:in `block in run'
610
+ puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
611
+ END
612
+
613
+ DART_ERR = <<END.freeze
614
+ Unhandled exception:
615
+ Instance of 'MyError'
616
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:15:20)
617
+ #1 printError (file:///path/to/code/dartFile.dart:37:13)
618
+ #2 main (file:///path/to/code/dartFile.dart:15:3)
619
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
620
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
621
+ END
622
+
623
+ DART_EXC = <<END.freeze
624
+ Unhandled exception:
625
+ Exception: exception message
626
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:17:20)
627
+ #1 printError (file:///path/to/code/dartFile.dart:37:13)
628
+ #2 main (file:///path/to/code/dartFile.dart:17:3)
629
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
630
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
631
+ END
632
+
633
+ DART_ASYNC_ERR = <<END.freeze
634
+ Unhandled exception:
635
+ Bad state: oops
636
+ #0 handleFailure (file:///test/example/http/handling_an_httprequest_error.dart:16:3)
637
+ #1 main (file:///test/example/http/handling_an_httprequest_error.dart:24:5)
638
+ <asynchronous suspension>
639
+ #2 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
640
+ #3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
641
+ END
642
+
643
+ DART_DIVIDE_BY_ZERO_ERR = <<END.freeze
644
+ Unhandled exception:
645
+ IntegerDivisionByZeroException
646
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:27:20)
647
+ #1 printError (file:///path/to/code/dartFile.dart:42:13)
648
+ #2 main (file:///path/to/code/dartFile.dart:27:3)
649
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
650
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
651
+ END
652
+
653
+ DART_ARGUMENT_ERR = <<END.freeze
654
+ Unhandled exception:
655
+ Invalid argument(s): invalid argument
656
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:23:20)
657
+ #1 printError (file:///path/to/code/dartFile.dart:42:13)
658
+ #2 main (file:///path/to/code/dartFile.dart:23:3)
659
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
660
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
661
+ END
662
+
663
+ DART_RANGE_ERR = <<END.freeze
664
+ Unhandled exception:
665
+ RangeError (index): Invalid value: Valid value range is empty: 1
666
+ #0 List.[] (dart:core-patch/growable_array.dart:151)
667
+ #1 main.<anonymous closure> (file:///path/to/code/dartFile.dart:31:23)
668
+ #2 printError (file:///path/to/code/dartFile.dart:42:13)
669
+ #3 main (file:///path/to/code/dartFile.dart:29:3)
670
+ #4 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
671
+ #5 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
672
+ END
673
+
674
+ DART_ASSERTION_ERR = <<END.freeze
675
+ Unhandled exception:
676
+ Assertion failed
677
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:9:20)
678
+ #1 printError (file:///path/to/code/dartFile.dart:36:13)
679
+ #2 main (file:///path/to/code/dartFile.dart:9:3)
680
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
681
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
682
+ END
683
+
684
+ DART_ABSTRACT_CLASS_ERR = <<END.freeze
685
+ Unhandled exception:
686
+ Cannot instantiate abstract class LNClassName: _url 'null' line null
687
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:12:20)
688
+ #1 printError (file:///path/to/code/dartFile.dart:36:13)
689
+ #2 main (file:///path/to/code/dartFile.dart:12:3)
690
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
691
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
692
+ END
693
+
694
+ DART_READ_STATIC_ERR = <<END.freeze
695
+ Unhandled exception:
696
+ Reading static variable 'variable' during its initialization
697
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:28:20)
698
+ #1 printError (file:///path/to/code/dartFile.dart:43:13)
699
+ #2 main (file:///path/to/code/dartFile.dart:28:3)
700
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
701
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
702
+ END
703
+
704
+ DART_UNIMPLEMENTED_ERROR = <<END.freeze
705
+ Unhandled exception:
706
+ UnimplementedError: unimplemented
707
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:38:20)
708
+ #1 printError (file:///path/to/code/dartFile.dart:61:13)
709
+ #2 main (file:///path/to/code/dartFile.dart:38:3)
710
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
711
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
712
+ END
713
+
714
+ DART_UNSUPPORTED_ERR = <<END.freeze
715
+ Unhandled exception:
716
+ Unsupported operation: unsupported
717
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:36:20)
718
+ #1 printError (file:///path/to/code/dartFile.dart:61:13)
719
+ #2 main (file:///path/to/code/dartFile.dart:36:3)
720
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
721
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
722
+ END
723
+
724
+ DART_CONCURRENT_MODIFICATION_ERR = <<END.freeze
725
+ Unhandled exception:
726
+ Concurrent modification during iteration.
727
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:35:20)
728
+ #1 printError (file:///path/to/code/dartFile.dart:61:13)
729
+ #2 main (file:///path/to/code/dartFile.dart:35:3)
730
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
731
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
732
+ END
733
+
734
+ DART_OOM_ERR = <<END.freeze
735
+ Unhandled exception:
736
+ Out of Memory
737
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:34:20)
738
+ #1 printError (file:///path/to/code/dartFile.dart:61:13)
739
+ #2 main (file:///path/to/code/dartFile.dart:34:3)
740
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
741
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
742
+ END
743
+
744
+ DART_STACK_OVERFLOW_ERR = <<END.freeze
745
+ Unhandled exception:
746
+ Stack Overflow
747
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:33:20)
748
+ #1 printError (file:///path/to/code/dartFile.dart:61:13)
749
+ #2 main (file:///path/to/code/dartFile.dart:33:3)
750
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
751
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
752
+ END
753
+
754
+ DART_FALLTHROUGH_ERR = <<END.freeze
755
+ Unhandled exception:
756
+ 'null': Switch case fall-through at line null.
757
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:39:20)
758
+ #1 printError (file:///path/to/code/dartFile.dart:51:13)
759
+ #2 main (file:///path/to/code/dartFile.dart:39:3)
760
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
761
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
762
+ END
763
+
764
+ DART_TYPE_ERR = <<END.freeze
765
+ Unhandled exception:
766
+ 'file:///path/to/code/dartFile.dart': malformed type: line 7 pos 24: cannot resolve class 'NoType' from '::'
767
+ printError( () { new NoType(); } );
768
+ ^
769
+
770
+
771
+ #0 _TypeError._throwNew (dart:core-patch/errors_patch.dart:82)
772
+ #1 main.<anonymous closure> (file:///path/to/code/dartFile.dart:7:24)
773
+ #2 printError (file:///path/to/code/dartFile.dart:36:13)
774
+ #3 main (file:///path/to/code/dartFile.dart:7:3)
775
+ #4 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
776
+ #5 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
777
+ END
778
+
779
+ DART_FORMAT_ERR = <<END.freeze
780
+ Unhandled exception:
781
+ FormatException: format exception
782
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:25:20)
783
+ #1 printError (file:///path/to/code/dartFile.dart:42:13)
784
+ #2 main (file:///path/to/code/dartFile.dart:25:3)
785
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
786
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
787
+ END
788
+
789
+ DART_FORMAT_WITH_CODE_ERR = <<END.freeze
790
+ Unhandled exception:
791
+ FormatException: Invalid base64 data (at line 3, character 8)
792
+ this is not valid
793
+ ^
794
+
795
+ #0 main.<anonymous closure> (file:///path/to/code/dartFile.dart:24:20)
796
+ #1 printError (file:///path/to/code/dartFile.dart:42:13)
797
+ #2 main (file:///path/to/code/dartFile.dart:24:3)
798
+ #3 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
799
+ #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
800
+ END
801
+
802
+ DART_NO_METHOD_ERR = <<END.freeze
803
+ Unhandled exception:
804
+ NoSuchMethodError: No constructor 'TypeError' with matching arguments declared in class 'TypeError'.
805
+ Receiver: Type: class 'TypeError'
806
+ Tried calling: new TypeError("Invalid base64 data", "invalid", 36)
807
+ Found: new TypeError()
808
+ #0 NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:196)
809
+ #1 main.<anonymous closure> (file:///path/to/code/dartFile.dart:8:39)
810
+ #2 printError (file:///path/to/code/dartFile.dart:36:13)
811
+ #3 main (file:///path/to/code/dartFile.dart:8:3)
812
+ #4 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
813
+ #5 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
814
+ END
815
+
816
+ DART_NO_METHOD_GLOBAL_ERR = <<END.freeze
817
+ Unhandled exception:
818
+ NoSuchMethodError: No top-level method 'noMethod' declared.
819
+ Receiver: top-level
820
+ Tried calling: noMethod()
821
+ #0 NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:196)
822
+ #1 main.<anonymous closure> (file:///path/to/code/dartFile.dart:10:20)
823
+ #2 printError (file:///path/to/code/dartFile.dart:36:13)
824
+ #3 main (file:///path/to/code/dartFile.dart:10:3)
825
+ #4 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
826
+ #5 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
827
+ END
828
+
829
+ ARBITRARY_TEXT = <<END.freeze
830
+ This arbitrary text.
831
+ It sounds tympanic: a word which means like a drum.
832
+
833
+ I am glad it contains no exception.
834
+ END
835
+
836
+ def check_multiline(detector, expected_first, expected_last, multiline)
837
+ lines = multiline.lines
838
+ lines.each_with_index do |line, index|
839
+ action = detector.update(line)
840
+ case index
841
+ when 0
842
+ assert_equal(expected_first, action,
843
+ "unexpected action on first line: #{line}")
844
+ when lines.length - 1
845
+ assert_equal(expected_last, action,
846
+ "unexpected action on last line: #{line}")
847
+ else
848
+ assert_equal(:inside_trace, action, "line not buffered: #{line}")
849
+ end
850
+ end
851
+ end
852
+
853
+ def check_no_multiline(detector, text)
854
+ text.lines.each do |line|
855
+ action = detector.update(line)
856
+ assert_equal(:no_trace, action, "unexpected action on line: #{line}")
857
+ end
858
+ end
859
+
860
+ def check_exception(exception, detects_end)
861
+ detector = Fluent::ExceptionDetector.new
862
+ after_exc = detects_end ? :end_trace : :inside_trace
863
+ before_second_exc = detects_end ? :inside_trace : :start_trace
864
+ check_multiline(detector, :no_trace, :no_trace, 'This is not an exception.')
865
+ check_multiline(detector, :inside_trace, after_exc, exception)
866
+ check_multiline(detector, :no_trace, :no_trace, 'This is not an exception.')
867
+ check_multiline(detector, :inside_trace, after_exc, exception)
868
+ check_multiline(detector, before_second_exc, after_exc, exception)
869
+ end
870
+
871
+ def test_java
872
+ check_exception(JAVA_EXC, false)
873
+ check_exception(COMPLEX_JAVA_EXC, false)
874
+ check_exception(NESTED_JAVA_EXC, false)
875
+ end
876
+
877
+ def test_js
878
+ check_exception(NODE_JS_EXC, false)
879
+ check_exception(CLIENT_JS_EXC, false)
880
+ check_exception(V8_JS_EXC, false)
881
+ end
882
+
883
+ def test_csharp
884
+ check_exception(CSHARP_EXC, false)
885
+ check_exception(CSHARP_NESTED_EXC, false)
886
+ check_exception(CSHARP_ASYNC_EXC, false)
887
+ end
888
+
889
+ def test_python
890
+ check_exception(PYTHON_EXC, true)
891
+ end
892
+
893
+ def test_php
894
+ check_exception(PHP_EXC, false)
895
+ check_exception(PHP_ON_GAE_EXC, true)
896
+ end
897
+
898
+ def test_go
899
+ check_exception(GO_EXC, false)
900
+ check_exception(GO_ON_GAE_EXC, false)
901
+ check_exception(GO_SIGNAL_EXC, false)
902
+ check_exception(GO_HTTP, false)
903
+ end
904
+
905
+ def test_ruby
906
+ check_exception(RUBY_EXC, false)
907
+ check_exception(RUBY_SEGFAULT_EXC, true)
908
+ check_exception(RAILS_EXC, false)
909
+ end
910
+
911
+ def test_dart
912
+ check_exception(DART_ERR, false)
913
+ check_exception(DART_EXC, false)
914
+ check_exception(DART_ASYNC_ERR, false)
915
+ check_exception(DART_DIVIDE_BY_ZERO_ERR, false)
916
+ check_exception(DART_ARGUMENT_ERR, false)
917
+ check_exception(DART_RANGE_ERR, false)
918
+ check_exception(DART_READ_STATIC_ERR, false)
919
+ check_exception(DART_UNIMPLEMENTED_ERROR, false)
920
+ check_exception(DART_UNSUPPORTED_ERR, false)
921
+ check_exception(DART_CONCURRENT_MODIFICATION_ERR, false)
922
+ check_exception(DART_OOM_ERR, false)
923
+ check_exception(DART_STACK_OVERFLOW_ERR, false)
924
+ check_exception(DART_FALLTHROUGH_ERR, false)
925
+ check_exception(DART_TYPE_ERR, false)
926
+ check_exception(DART_FORMAT_ERR, false)
927
+ check_exception(DART_FORMAT_WITH_CODE_ERR, false)
928
+ check_exception(DART_NO_METHOD_ERR, false)
929
+ check_exception(DART_NO_METHOD_GLOBAL_ERR, false)
930
+ check_exception(DART_ASSERTION_ERR, false)
931
+ check_exception(DART_ABSTRACT_CLASS_ERR, false)
932
+ end
933
+
934
+ def test_mixed_languages
935
+ check_exception(JAVA_EXC, false)
936
+ check_exception(PYTHON_EXC, true)
937
+ check_exception(COMPLEX_JAVA_EXC, false)
938
+ check_exception(NODE_JS_EXC, false)
939
+ check_exception(PHP_EXC, false)
940
+ check_exception(PHP_ON_GAE_EXC, true)
941
+ check_exception(CLIENT_JS_EXC, false)
942
+ check_exception(GO_EXC, false)
943
+ check_exception(GO_ON_GAE_EXC, false)
944
+ check_exception(GO_SIGNAL_EXC, false)
945
+ check_exception(CSHARP_EXC, false)
946
+ check_exception(CSHARP_NESTED_EXC, false)
947
+ check_exception(CSHARP_ASYNC_EXC, false)
948
+ check_exception(V8_JS_EXC, false)
949
+ check_exception(RUBY_EXC, false)
950
+ check_exception(DART_ERR, false)
951
+ check_exception(DART_EXC, false)
952
+ check_exception(DART_ASYNC_ERR, false)
953
+ check_exception(DART_DIVIDE_BY_ZERO_ERR, false)
954
+ check_exception(DART_ARGUMENT_ERR, false)
955
+ check_exception(DART_RANGE_ERR, false)
956
+ check_exception(DART_READ_STATIC_ERR, false)
957
+ check_exception(DART_UNIMPLEMENTED_ERROR, false)
958
+ check_exception(DART_UNSUPPORTED_ERR, false)
959
+ check_exception(DART_CONCURRENT_MODIFICATION_ERR, false)
960
+ check_exception(DART_OOM_ERR, false)
961
+ check_exception(DART_STACK_OVERFLOW_ERR, false)
962
+ check_exception(DART_FALLTHROUGH_ERR, false)
963
+ check_exception(DART_TYPE_ERR, false)
964
+ check_exception(DART_FORMAT_ERR, false)
965
+ check_exception(DART_FORMAT_WITH_CODE_ERR, false)
966
+ check_exception(DART_NO_METHOD_ERR, false)
967
+ check_exception(DART_NO_METHOD_GLOBAL_ERR, false)
968
+ check_exception(DART_ASSERTION_ERR, false)
969
+ check_exception(DART_ABSTRACT_CLASS_ERR, false)
970
+ end
971
+
972
+ def test_reset
973
+ detector = Fluent::ExceptionDetector.new
974
+
975
+ check_multiline(detector, :inside_trace, :inside_trace, JAVA_EXC_PART1)
976
+ check_multiline(detector, :inside_trace, :inside_trace, JAVA_EXC_PART2)
977
+
978
+ check_multiline(detector, :start_trace, :inside_trace, JAVA_EXC_PART1)
979
+ detector.reset
980
+ check_no_multiline(detector, JAVA_EXC_PART2)
981
+ end
982
+
983
+ def feed_lines(buffer, *messages)
984
+ messages.each do |m|
985
+ m.each_line do |line|
986
+ buffer.push(0, line)
987
+ end
988
+ buffer.flush
989
+ end
990
+ end
991
+
992
+ Struct.new('TestBufferScenario', :desc, :languages, :input, :expected)
993
+
994
+ def buffer_scenario(desc, languages, input, expected)
995
+ Struct::TestBufferScenario.new(desc, languages, input, expected)
996
+ end
997
+
998
+ def test_buffer
999
+ [
1000
+ buffer_scenario('mixed languages',
1001
+ [:all],
1002
+ [JAVA_EXC, ARBITRARY_TEXT, PYTHON_EXC, GO_EXC],
1003
+ [JAVA_EXC] + ARBITRARY_TEXT.lines + [PYTHON_EXC, GO_EXC]),
1004
+ buffer_scenario('single language',
1005
+ [:go],
1006
+ [JAVA_EXC, ARBITRARY_TEXT, GO_EXC],
1007
+ JAVA_EXC.lines + ARBITRARY_TEXT.lines + [GO_EXC]),
1008
+ buffer_scenario('some exceptions from non-configured languages',
1009
+ [:python],
1010
+ [JAVA_EXC, PYTHON_EXC, GO_EXC],
1011
+ JAVA_EXC.lines + [PYTHON_EXC] + GO_EXC.lines),
1012
+ buffer_scenario('all exceptions from non-configured languages',
1013
+ [:ruby],
1014
+ [JAVA_EXC, PYTHON_EXC, GO_EXC],
1015
+ JAVA_EXC.lines + PYTHON_EXC.lines + GO_EXC.lines)
1016
+ ].each do |s|
1017
+ out = []
1018
+ buffer = Fluent::TraceAccumulator.new(nil,
1019
+ s.languages) { |_, m| out << m }
1020
+ feed_lines(buffer, *s.input)
1021
+ assert_equal(s.expected, out, s.desc)
1022
+ end
1023
+ end
1024
+
1025
+ def feed_json(buffer, message_field, messages)
1026
+ messages.each do |m|
1027
+ m.each_line do |line|
1028
+ buffer.push(0, message_field => line)
1029
+ end
1030
+ buffer.flush
1031
+ end
1032
+ end
1033
+
1034
+ def expected_json(message_field, messages)
1035
+ messages.collect { |m| { message_field => [m].flatten.join } }
1036
+ end
1037
+
1038
+ Struct.new('TestJsonScenario',
1039
+ :desc, :configured_field, :actual_field, :input, :output)
1040
+
1041
+ def json_scenario(desc, configured_field, actual_field, input, output)
1042
+ Struct::TestJsonScenario.new(desc, configured_field, actual_field,
1043
+ input, output)
1044
+ end
1045
+
1046
+ def test_json_messages
1047
+ [
1048
+ json_scenario('User-defined message field', 'mydata', 'mydata',
1049
+ [PYTHON_EXC, ARBITRARY_TEXT, GO_EXC],
1050
+ [PYTHON_EXC] + ARBITRARY_TEXT.lines + [GO_EXC]),
1051
+ json_scenario('Default message field "message"', '', 'message',
1052
+ [PYTHON_EXC, ARBITRARY_TEXT, GO_EXC],
1053
+ [PYTHON_EXC] + ARBITRARY_TEXT.lines + [GO_EXC]),
1054
+ json_scenario('Default message field "log"', '', 'log',
1055
+ [PYTHON_EXC, ARBITRARY_TEXT, GO_EXC],
1056
+ [PYTHON_EXC] + ARBITRARY_TEXT.lines + [GO_EXC]),
1057
+ json_scenario('Wrongly defined message field', 'doesnotexist', 'mydata',
1058
+ [PYTHON_EXC, ARBITRARY_TEXT, GO_EXC],
1059
+ PYTHON_EXC.lines + ARBITRARY_TEXT.lines + GO_EXC.lines),
1060
+ json_scenario('Undefined message field', '', 'mydata',
1061
+ [PYTHON_EXC, ARBITRARY_TEXT, GO_EXC],
1062
+ PYTHON_EXC.lines + ARBITRARY_TEXT.lines + GO_EXC.lines)
1063
+ ].each do |s|
1064
+ out = []
1065
+ buffer = Fluent::TraceAccumulator.new(s.configured_field,
1066
+ [:all]) { |_, m| out << m }
1067
+ feed_json(buffer, s.actual_field, s.input)
1068
+ assert_equal(expected_json(s.actual_field, s.output), out, s.desc)
1069
+ end
1070
+ end
1071
+
1072
+ def test_max_lines_limit
1073
+ # Limit is equal to the first part of the exception and forces it to be
1074
+ # flushed before the rest of the exception is processed.
1075
+ max_lines = JAVA_EXC_PART1.lines.length
1076
+ out = []
1077
+ buffer = Fluent::TraceAccumulator.new(nil,
1078
+ [:all],
1079
+ max_lines: max_lines) do |_, m|
1080
+ out << m
1081
+ end
1082
+ feed_lines(buffer, JAVA_EXC)
1083
+ assert_equal([JAVA_EXC_PART1] + JAVA_EXC_PART2.lines, out)
1084
+ end
1085
+
1086
+ def test_high_max_bytes_limit
1087
+ # Limit is just too small to add one more line to the buffered first part of
1088
+ # the exception.
1089
+ max_bytes = JAVA_EXC_PART1.length + JAVA_EXC_PART2.lines[0].length - 1
1090
+ out = []
1091
+ buffer = Fluent::TraceAccumulator.new(nil,
1092
+ [:all],
1093
+ max_bytes: max_bytes) do |_, m|
1094
+ out << m
1095
+ end
1096
+ feed_lines(buffer, JAVA_EXC)
1097
+ # Check that the trace is flushed after the first part.
1098
+ assert_equal([JAVA_EXC_PART1] + JAVA_EXC_PART2.lines, out)
1099
+ end
1100
+
1101
+ def test_low_max_bytes_limit
1102
+ # Limit is exceeded by the character that follows the buffered first part of
1103
+ # the exception.
1104
+ max_bytes = JAVA_EXC_PART1.length
1105
+ out = []
1106
+ buffer = Fluent::TraceAccumulator.new(nil,
1107
+ [:all],
1108
+ max_bytes: max_bytes) do |_, m|
1109
+ out << m
1110
+ end
1111
+ feed_lines(buffer, JAVA_EXC)
1112
+ # Check that the trace is flushed after the first part.
1113
+ assert_equal([JAVA_EXC_PART1] + JAVA_EXC_PART2.lines, out)
1114
+ end
1115
+ end