Skip to content

Fix incomplete log entries read by FramedInputStreamConsumer - #1754

Closed
yuting-liu wants to merge 11 commits into
docker-java:masterfrom
yuting-liu:yuting-fix-frame
Closed

Fix incomplete log entries read by FramedInputStreamConsumer#1754
yuting-liu wants to merge 11 commits into
docker-java:masterfrom
yuting-liu:yuting-fix-frame

Conversation

@yuting-liu

@yuting-liu yuting-liu commented Dec 15, 2021

Copy link
Copy Markdown
Contributor

The issue was described in: #1647

After #1351, with the switch from FrameStreamProcessor to FramedInputStreamConsumer, logs are no longer ingested into Frame with complete log messages.

For the stream type of RAW, the old frame stream processor uses https://github.com/docker-java/docker-java/blob/master/docker-java-core/src/main/java/com/github/dockerjava/core/command/FrameReader.java. There the payload is reading in a buffer with payload size. We should keep the consistent behavior, otherwise the buffer of 1024 will lead to incomplete messages.

@yuting-liu

Copy link
Copy Markdown
Contributor Author

@bsideup @kiview Can you please help me review this PR as I think there was a bug in PR #1351 for reading the log stream into Frame?

@bsideup

bsideup commented Dec 16, 2021

Copy link
Copy Markdown
Member

@yuting-liu thanks for submitting a PR! Could you please also add a unit test that reproduces the problem? I am not sure that this actually fixes anything, and, if it does, perhaps we could fix it without introducing an allocation per iteration

@bsideup bsideup mentioned this pull request Dec 17, 2021
@yuting-liu

Copy link
Copy Markdown
Contributor Author

@bsideup
By

perhaps we could fix it without introducing an allocation per iteration

do you have some advices on how to achieve it by without introducing an allocation per iteration.

I'm currently planning to add the unit test in LogContainerCmdIT to have it run the docker command we have used in our ITs to try to catch this issue.

@yuting-liu
yuting-liu force-pushed the yuting-fix-frame branch 2 times, most recently from 80dcf6e to dee134d Compare January 16, 2022 00:50
@yuting-liu

Copy link
Copy Markdown
Contributor Author

@bsideup I added a unit test in in LogContainerCmdIT, where the IT will show as flakes when run most of the time, though it won't fail the Jenkins checks.

After the fix here, there is no such flakes issue for splitting messages.
#1782

The real issue we countered that is that this flaky failure will break our docker log ingestion via docker-java and bring up troubles to our end users.

@bsideup

bsideup commented Jan 20, 2022

Copy link
Copy Markdown
Member

@yuting-liu Have you considered writing a unit test instead? It shouldn't be flaky because you will have more control and eliminate I/O from the test. Thanks!

@yuting-liu

Copy link
Copy Markdown
Contributor Author

@bsideup The major issue is that after #1647, the log ingestion is not determined any more. The case of split logs are happened occasionally. Though the flakiness is quite stable that it's likely that if I run 10 times for the IT, there can be 8 or 9 times that 1 of two runs are failed. However, there can be some lucky case that the log message counts are as our expectation.

If we want to change to ut, I have a few questions:

  1. how should we mock the case to run this specific image
  2. I think we want to have the case to show that if we run the tests 10 times, any one of them failed should fail?
    Do you think we can use ut to achieve it? or we can change the test condition for IT then?

@bsideup

bsideup commented Jan 21, 2022

Copy link
Copy Markdown
Member

how should we mock the case to run this specific image

We don't. We write a unit test for FramedInputStreamConsumer that doesn't need to know anything about Docker as it only operates on incoming bytes

I think we want to have the case to show that if we run the tests 10 times, any one of them failed should fail?
Do you think we can use ut to achieve it? or we can change the test condition for IT then?

We should write a test that always fails before your fix

Thanks!

@yuting-liu

Copy link
Copy Markdown
Contributor Author

@bsideup I tried a few times, but I feel that it's a bit complicated to add unit test on FramedInputStreamConsumer. The major difficulties are two: 1. frames are stored in ResultCallback; 2. method void accept needs to transform input stream into byte arrays.
I tried to still use the IT where I can directly call a certain image. Besides, I tried to run the image multiple times to de-flake the test.
Currently, this branch will show that the added test will fail for this added test case: #1782

@yuting-liu

Copy link
Copy Markdown
Contributor Author

@bsideup can you help us to approve the change and make it into the next release then.

@bsideup

bsideup commented Feb 4, 2022

Copy link
Copy Markdown
Member

@yuting-liu sorry, not sure I understand the fix yet. The test you provided seems to be making an assumption that there will be a fixed number of frames, which might not be the case. Instead, we should verify that the streamed bytes are exactly as in the source.

The current implementation seems to be handling it correctly, at least from the code PoV, so, unless you can provide a valid test that shows the problem, I do not see a bug yet.

@yuting-liu

Copy link
Copy Markdown
Contributor Author

@bsideup Actually, that docker image I'm using is giving the same fixed output all the times, as following:

64.242.88.10 - - [07/Mar/2016:16:05:49 -0800] "GET /twiki/bin/edit/Main/Double_bounce_sender?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:16:06:51 -0800] "GET /twiki/bin/rdiff/TWiki/NewUserTemplate?rev1=1.3&rev2=1.2 HTTP/1.1" 200 4523
64.242.88.10 - - [07/Mar/2016:16:10:02 -0800] "GET /mailman/listinfo/hsdivision HTTP/1.1" 200 6291
64.242.88.10 - - [07/Mar/2016:16:11:58 -0800] "GET /twiki/bin/view/TWiki/WikiSyntax HTTP/1.1" 200 7352
64.242.88.10 - - [07/Mar/2016:16:20:55 -0800] "GET /twiki/bin/view/Main/DCCAndPostFix HTTP/1.1" 200 5253
64.242.88.10 - - [07/Mar/2016:16:23:12 -0800] "GET /twiki/bin/oops/TWiki/AppendixFileSystem?template=oopsmore&param1=1.12&param2=1.12 HTTP/1.1" 200 11382
64.242.88.10 - - [07/Mar/2016:16:24:16 -0800] "GET /twiki/bin/view/Main/PeterThoeny HTTP/1.1" 200 4924
64.242.88.10 - - [07/Mar/2016:16:29:16 -0800] "GET /twiki/bin/edit/Main/Header_checks?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12851
64.242.88.10 - - [07/Mar/2016:16:30:29 -0800] "GET /twiki/bin/attach/Main/OfficeLocations HTTP/1.1" 401 12851
64.242.88.10 - - [07/Mar/2016:16:31:48 -0800] "GET /twiki/bin/view/TWiki/WebTopicEditTemplate HTTP/1.1" 200 3732
64.242.88.10 - - [07/Mar/2016:16:32:50 -0800] "GET /twiki/bin/view/Main/WebChanges HTTP/1.1" 200 40520
64.242.88.10 - - [07/Mar/2016:16:33:53 -0800] "GET /twiki/bin/edit/Main/Smtpd_etrn_restrictions?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12851
64.242.88.10 - - [07/Mar/2016:16:35:19 -0800] "GET /mailman/listinfo/business HTTP/1.1" 200 6379
64.242.88.10 - - [07/Mar/2016:16:36:22 -0800] "GET /twiki/bin/rdiff/Main/WebIndex?rev1=1.2&rev2=1.1 HTTP/1.1" 200 46373
64.242.88.10 - - [07/Mar/2016:16:37:27 -0800] "GET /twiki/bin/view/TWiki/DontNotify HTTP/1.1" 200 4140
64.242.88.10 - - [07/Mar/2016:16:39:24 -0800] "GET /twiki/bin/view/Main/TokyoOffice HTTP/1.1" 200 3853
64.242.88.10 - - [07/Mar/2016:16:43:54 -0800] "GET /twiki/bin/view/Main/MikeMannix HTTP/1.1" 200 3686
64.242.88.10 - - [07/Mar/2016:16:45:56 -0800] "GET /twiki/bin/attach/Main/PostfixCommands HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:16:47:12 -0800] "GET /robots.txt HTTP/1.1" 200 68
64.242.88.10 - - [07/Mar/2016:16:47:46 -0800] "GET /twiki/bin/rdiff/Know/ReadmeFirst?rev1=1.5&rev2=1.4 HTTP/1.1" 200 5724
64.242.88.10 - - [07/Mar/2016:16:49:04 -0800] "GET /twiki/bin/view/Main/TWikiGroups?rev=1.2 HTTP/1.1" 200 5162
64.242.88.10 - - [07/Mar/2016:16:50:54 -0800] "GET /twiki/bin/rdiff/Main/ConfigurationVariables HTTP/1.1" 200 59679
64.242.88.10 - - [07/Mar/2016:16:52:35 -0800] "GET /twiki/bin/edit/Main/Flush_service_name?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12851
64.242.88.10 - - [07/Mar/2016:16:53:46 -0800] "GET /twiki/bin/rdiff/TWiki/TWikiRegistration HTTP/1.1" 200 34395
64.242.88.10 - - [07/Mar/2016:16:54:55 -0800] "GET /twiki/bin/rdiff/Main/NicholasLee HTTP/1.1" 200 7235
64.242.88.10 - - [07/Mar/2016:16:56:39 -0800] "GET /twiki/bin/view/Sandbox/WebHome?rev=1.6 HTTP/1.1" 200 8545
64.242.88.10 - - [07/Mar/2016:16:58:54 -0800] "GET /mailman/listinfo/administration HTTP/1.1" 200 6459
lordgun.org - - [07/Mar/2016:17:01:53 -0800] "GET /razor.html HTTP/1.1" 200 2869
64.242.88.10 - - [07/Mar/2016:17:09:01 -0800] "GET /twiki/bin/search/Main/SearchResult?scope=text&regex=on&search=Joris%20*Benschop[^A-Za-z] HTTP/1.1" 200 4284
64.242.88.10 - - [07/Mar/2016:17:10:20 -0800] "GET /twiki/bin/oops/TWiki/TextFormattingRules?template=oopsmore&param1=1.37&param2=1.37 HTTP/1.1" 200 11400
64.242.88.10 - - [07/Mar/2016:17:13:50 -0800] "GET /twiki/bin/edit/TWiki/DefaultPlugin?t=1078688936 HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:17:16:00 -0800] "GET /twiki/bin/search/Main/?scope=topic&regex=on&search=^g HTTP/1.1" 200 3675
64.242.88.10 - - [07/Mar/2016:17:17:27 -0800] "GET /twiki/bin/search/TWiki/?scope=topic&regex=on&search=^d HTTP/1.1" 200 5773
lj1036.inktomisearch.com - - [07/Mar/2016:17:18:36 -0800] "GET /robots.txt HTTP/1.0" 200 68
lj1090.inktomisearch.com - - [07/Mar/2016:17:18:41 -0800] "GET /twiki/bin/view/Main/LondonOffice HTTP/1.0" 200 3860
64.242.88.10 - - [07/Mar/2016:17:21:44 -0800] "GET /twiki/bin/attach/TWiki/TablePlugin HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:17:22:49 -0800] "GET /twiki/bin/view/TWiki/ManagingWebs?rev=1.22 HTTP/1.1" 200 9310
64.242.88.10 - - [07/Mar/2016:17:23:54 -0800] "GET /twiki/bin/statistics/Main HTTP/1.1" 200 808
64.242.88.10 - - [07/Mar/2016:17:26:30 -0800] "GET /twiki/bin/view/TWiki/WikiCulture HTTP/1.1" 200 5935
64.242.88.10 - - [07/Mar/2016:17:27:37 -0800] "GET /twiki/bin/edit/Main/WebSearch?t=1078669682 HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:17:28:45 -0800] "GET /twiki/bin/oops/TWiki/ResetPassword?template=oopsmore&param1=1.4&param2=1.4 HTTP/1.1" 200 11281
64.242.88.10 - - [07/Mar/2016:17:29:59 -0800] "GET /twiki/bin/view/TWiki/ManagingWebs?skin=print HTTP/1.1" 200 8806
64.242.88.10 - - [07/Mar/2016:17:31:39 -0800] "GET /twiki/bin/edit/Main/UvscanAndPostFix?topicparent=Main.WebHome HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:17:35:35 -0800] "GET /twiki/bin/view/TWiki/KlausWriessnegger HTTP/1.1" 200 3848
64.242.88.10 - - [07/Mar/2016:17:39:39 -0800] "GET /twiki/bin/view/Main/SpamAssassin HTTP/1.1" 200 4081
64.242.88.10 - - [07/Mar/2016:17:42:15 -0800] "GET /twiki/bin/oops/TWiki/RichardDonkin?template=oopsmore&param1=1.2&param2=1.2 HTTP/1.1" 200 11281
64.242.88.10 - - [07/Mar/2016:17:46:17 -0800] "GET /twiki/bin/rdiff/TWiki/AlWilliams?rev1=1.3&rev2=1.2 HTTP/1.1" 200 4485
64.242.88.10 - - [07/Mar/2016:17:47:43 -0800] "GET /twiki/bin/rdiff/TWiki/AlWilliams?rev1=1.2&rev2=1.1 HTTP/1.1" 200 5234
64.242.88.10 - - [07/Mar/2016:17:50:44 -0800] "GET /twiki/bin/view/TWiki/SvenDowideit HTTP/1.1" 200 3616
64.242.88.10 - - [07/Mar/2016:17:53:45 -0800] "GET /twiki/bin/search/Main/SearchResult?scope=text&regex=on&search=Office%20*Locations[^A-Za-z] HTTP/1.1" 200 7771
64.242.88.10 - - [07/Mar/2016:17:56:54 -0800] "GET /twiki/bin/view/TWiki/TextFormattingRules?rev=r1.31 HTTP/1.1" 200 23338
64.242.88.10 - - [07/Mar/2016:17:58:00 -0800] "GET /twiki/bin/edit/Main/KevinWGagel?t=1078670331 HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:18:00:09 -0800] "GET /twiki/bin/edit/Main/Virtual_mailbox_lock?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:18:02:10 -0800] "GET /twiki/bin/view/Main/WebPreferences HTTP/1.1" 200 8820
64.242.88.10 - - [07/Mar/2016:18:04:05 -0800] "GET /twiki/bin/view/TWiki/WikiWord?rev=1.3 HTTP/1.1" 200 6816
lj1125.inktomisearch.com - - [07/Mar/2016:18:06:14 -0800] "GET /twiki/bin/oops/Sandbox/WebChanges HTTP/1.0" 200 209
64.242.88.10 - - [07/Mar/2016:18:09:00 -0800] "GET /twiki/bin/rdiff/Main/TWikiGuest HTTP/1.1" 200 11314
64.242.88.10 - - [07/Mar/2016:18:10:09 -0800] "GET /twiki/bin/edit/TWiki/TWikiVariables?t=1078684115 HTTP/1.1" 401 12846
d207-6-9-183.bchsia.telus.net - - [07/Mar/2016:18:10:18 -0800] "GET /pipermail/cncce/2016-January/000001.html HTTP/1.1" 200 3095
d207-6-9-183.bchsia.telus.net - - [07/Mar/2016:18:10:20 -0800] "GET /pipermail/cncce/2016-January/000002.html HTTP/1.1" 200 3810
64.242.88.10 - - [07/Mar/2016:18:17:26 -0800] "GET /twiki/bin/rdiff/TWiki/WikiWord?rev1=1.4&rev2=1.3 HTTP/1.1" 200 6948
64.242.88.10 - - [07/Mar/2016:18:19:01 -0800] "GET /twiki/bin/edit/Main/TWikiPreferences?topicparent=Main.WebHome HTTP/1.1" 401 12846
d207-6-9-183.bchsia.telus.net - - [07/Mar/2016:18:19:16 -0800] "GET /pipermail/cncce/2016-January.txt HTTP/1.1" 200 3376
64.242.88.10 - - [07/Mar/2016:18:22:52 -0800] "GET /twiki/bin/search/Main/SearchResult?scope=text&regex=on&search=Web%20*Statistics[^A-Za-z] HTTP/1.1" 200 3584
64.242.88.10 - - [07/Mar/2016:18:26:32 -0800] "GET /twiki/bin/rdiff/TWiki/PeterFokkinga?rev1=1.4&rev2=1.3 HTTP/1.1" 200 4548
64.242.88.10 - - [07/Mar/2016:18:32:39 -0800] "GET /mailman/listinfo/dentalstudies HTTP/1.1" 200 6345
64.242.88.10 - - [07/Mar/2016:18:34:42 -0800] "GET /twiki/bin/view/Main/TWikiGuest HTTP/1.1" 200 4449
64.242.88.10 - - [07/Mar/2016:18:42:29 -0800] "GET /twiki/bin/attach/Main/TWikiGroups HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:18:46:00 -0800] "GET /twiki/bin/rdiff/TWiki/TextFormattingRules?rev1=1.36&rev2=1.35 HTTP/1.1" 200 25416
64.242.88.10 - - [07/Mar/2016:18:47:06 -0800] "GET /twiki/bin/rdiff/Main/TWikiGroups?rev1=1.3&rev2=1.2 HTTP/1.1" 200 4308
64.242.88.10 - - [07/Mar/2016:18:48:15 -0800] "GET /twiki/bin/search/TWiki/?scope=topic&regex=on&search=.* HTTP/1.1" 200 3544
64.242.88.10 - - [07/Mar/2016:18:52:30 -0800] "GET /twiki/bin/edit/Main/Trigger_timeout?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:18:53:55 -0800] "GET /twiki/bin/oops/TWiki/TWikiSite?template=oopsmore&param1=1.21&param2=1.21 HTTP/1.1" 200 11284
64.242.88.10 - - [07/Mar/2016:18:57:07 -0800] "GET /twiki/bin/view/TWiki/TextFormattingRules?rev=r1.35 HTTP/1.1" 200 27248
64.242.88.10 - - [07/Mar/2016:18:58:52 -0800] "GET /twiki/bin/edit/Main/Mydestination?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:18:59:52 -0800] "GET /mailman/listinfo/fcd HTTP/1.1" 200 5967
64.242.88.10 - - [07/Mar/2016:19:01:48 -0800] "GET /twiki/bin/rdiff/Main/WebHome?rev1=1.28&rev2=1.27 HTTP/1.1" 200 3596
64.242.88.10 - - [07/Mar/2016:19:03:58 -0800] "GET /twiki/bin/edit/Main/Message_size_limit?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:19:08:55 -0800] "GET /twiki/bin/rdiff/TWiki/TWikiHistory HTTP/1.1" 200 138789
64.242.88.10 - - [07/Mar/2016:19:10:13 -0800] "GET /twiki/bin/search/TWiki/?scope=topic&regex=on&search=^y HTTP/1.1" 200 3628
64.242.88.10 - - [07/Mar/2016:19:15:38 -0800] "GET /twiki/bin/edit/Main/Smtpd_history_flush_threshold?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12851
64.242.88.10 - - [07/Mar/2016:19:16:44 -0800] "GET /twiki/bin/view/TWiki/TWikiHistory?rev=1.59 HTTP/1.1" 200 52854
64.242.88.10 - - [07/Mar/2016:19:18:05 -0800] "GET /twiki/bin/edit/Main/Sender_canonical_maps?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12851
64.242.88.10 - - [07/Mar/2016:19:19:19 -0800] "GET /mailman/listinfo/mlc HTTP/1.1" 200 6142
64.242.88.10 - - [07/Mar/2016:19:21:01 -0800] "GET /twiki/bin/rdiff/Main/WebChanges HTTP/1.1" 200 114241
64.242.88.10 - - [07/Mar/2016:19:22:11 -0800] "GET /twiki/bin/edit/Sandbox/TestTopic5?topicparent=Sandbox.WebHome HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:19:24:57 -0800] "GET /twiki/bin/view/TWiki/TextFormattingRules?rev=r1.22 HTTP/1.1" 200 21162
64.242.88.10 - - [07/Mar/2016:19:26:22 -0800] "GET /twiki/bin/search/TWiki/?scope=topic&regex=on&search=^j HTTP/1.1" 200 4524
64.242.88.10 - - [07/Mar/2016:19:29:46 -0800] "GET /twiki/bin/oops/TWiki/TWikiVariables?template=oopsmore&param1=1.62&param2=1.62 HTTP/1.1" 200 11444
64.242.88.10 - - [07/Mar/2016:19:31:25 -0800] "GET /twiki/bin/edit/Main/Lmtp_connect_timeout?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:19:32:45 -0800] "GET /twiki/bin/search/TWiki/?scope=topic&regex=on&search=^q HTTP/1.1" 200 2937
64.242.88.10 - - [07/Mar/2016:19:36:14 -0800] "GET /twiki/bin/view/TWiki/ManagingWebs?rev=1.21 HTTP/1.1" 200 9310
64.242.88.10 - - [07/Mar/2016:19:39:40 -0800] "GET /twiki/bin/edit/Main/Qmqpd_authorized_clients?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:19:41:33 -0800] "GET /twiki/bin/edit/Main/Header_address_token_limit?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:19:42:45 -0800] "GET /twiki/bin/edit/Main/Syslog_name?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
80-219-148-207.dclient.hispeed.ch - - [07/Mar/2016:19:47:36 -0800] "OPTIONS * HTTP/1.0" 200 -
64.242.88.10 - - [07/Mar/2016:19:49:28 -0800] "GET /twiki/bin/oops/TWiki/TWikiHistory?template=oopsmore&param1=1.61&param2=1.61 HTTP/1.1" 200 11345
64.242.88.10 - - [07/Mar/2016:19:52:28 -0800] "GET /twiki/bin/view/TWiki/HaroldGottschalk HTTP/1.1" 200 3838
64.242.88.10 - - [07/Mar/2016:19:54:33 -0800] "GET /twiki/bin/view/TWiki/DefaultPlugin?rev=1.4 HTTP/1.1" 200 7298
64.242.88.10 - - [07/Mar/2016:19:55:40 -0800] "GET /twiki/bin/oops/TWiki/WelcomeGuest?template=oopsmore&param1=1.20&param2=1.20 HTTP/1.1" 200 11266
64.242.88.10 - - [07/Mar/2016:19:56:41 -0800] "GET /twiki/bin/rdiff/Main/WebIndex HTTP/1.1" 200 46373
64.242.88.10 - - [07/Mar/2016:19:58:24 -0800] "GET /twiki/bin/rdiff/TWiki/TWikiRegistration?rev1=1.10&rev2=1.9 HTTP/1.1" 200 3826
64.242.88.10 - - [07/Mar/2016:20:00:06 -0800] "GET /twiki/bin/view/TWiki/TextFormattingRules?rev=r1.21 HTTP/1.1" 200 20972
64.242.88.10 - - [07/Mar/2016:20:02:13 -0800] "GET /twiki/bin/attach/TWiki/DefaultPlugin HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:20:03:29 -0800] "GET /twiki/bin/search/Main/?scope=topic&regex=on&search=^p HTTP/1.1" 200 7245
206-15-133-181.dialup.ziplink.net - - [07/Mar/2016:20:04:03 -0800] "HEAD /twiki/bin/view/Main/SpamAssassinDeleting HTTP/1.1" 200 0
64.242.88.10 - - [07/Mar/2016:20:04:35 -0800] "GET /twiki/bin/edit/Main/Smtp_pix_workaround_delay_time?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:20:07:12 -0800] "GET /twiki/bin/edit/Main/Berkeley_db_create_buffer_size?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12851
mmscrm07-2.sac.overture.com - - [07/Mar/2016:20:10:50 -0800] "GET /robots.txt HTTP/1.0" 200 68
64.242.88.10 - - [07/Mar/2016:20:11:33 -0800] "GET /twiki/bin/attach/TWiki/TWikiSite HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:20:12:55 -0800] "GET /twiki/bin/edit/TWiki/TWikiSite?t=1078681794 HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:20:23:35 -0800] "GET /twiki/bin/search/TWiki/SearchResult?scope=text&regex=on&search=Web%20*Statistics[^A-Za-z] HTTP/1.1" 200 10118
64.242.88.10 - - [07/Mar/2016:20:25:31 -0800] "GET /twiki/bin/edit/Main/Defer_transports?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:20:31:40 -0800] "GET /twiki/bin/rdiff/TWiki/SearchDoesNotWork HTTP/1.1" 200 6738
64.242.88.10 - - [07/Mar/2016:20:35:28 -0800] "GET /twiki/bin/search/Main/SearchResult?scope=text&regex=on&search=TWiki%20*Admin%20*Group[^A-Za-z] HTTP/1.1" 200 7311
64.242.88.10 - - [07/Mar/2016:20:38:14 -0800] "GET /twiki/bin/rdiff/TWiki/ChangePassword HTTP/1.1" 200 16670
64.242.88.10 - - [07/Mar/2016:20:40:41 -0800] "GET /twiki/bin/rdiff/TWiki/SvenDowideit HTTP/1.1" 200 5277
64.242.88.10 - - [07/Mar/2016:20:42:09 -0800] "GET /twiki/bin/rdiff/TWiki/KevinKinnell?rev1=1.5&rev2=1.4 HTTP/1.1" 200 4982
64.242.88.10 - - [07/Mar/2016:20:44:48 -0800] "GET /twiki/bin/edit/Main/Undisclosed_recipients_header?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:20:55:43 -0800] "GET /mailman/listinfo/hs_support HTTP/1.1" 200 6294
64.242.88.10 - - [07/Mar/2016:20:56:56 -0800] "GET /twiki/bin/view/TWiki/WebTopicList HTTP/1.1" 200 14070
64.242.88.10 - - [07/Mar/2016:20:58:27 -0800] "GET /twiki/bin/attach/TWiki/WebPreferences HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:21:03:48 -0800] "GET /twiki/bin/view/TWiki/TWikiFAQ HTTP/1.1" 200 12050
64.242.88.10 - - [07/Mar/2016:21:06:05 -0800] "GET /twiki/bin/oops/TWiki/DefaultPlugin?template=oopsmore&param1=1.5&param2=1.5 HTTP/1.1" 200 11281
64.242.88.10 - - [07/Mar/2016:21:07:24 -0800] "GET /twiki/bin/rdiff/TWiki/AppendixFileSystem?rev1=1.11&rev2=1.10 HTTP/1.1" 200 40578
64.242.88.10 - - [07/Mar/2016:21:14:32 -0800] "GET /twiki/bin/rdiff/TWiki/FileAttribute HTTP/1.1" 200 5846
h24-70-56-49.ca.shawcable.net - - [07/Mar/2016:21:16:17 -0800] "GET /twiki/view/Main/WebHome HTTP/1.1" 404 300
h24-70-56-49.ca.shawcable.net - - [07/Mar/2016:21:16:18 -0800] "GET /favicon.ico HTTP/1.1" 200 1078
h24-70-56-49.ca.shawcable.net - - [07/Mar/2016:21:16:21 -0800] "GET /twiki/ HTTP/1.1" 200 782
h24-70-56-49.ca.shawcable.net - - [07/Mar/2016:21:16:23 -0800] "GET /twiki/bin/view/Main/WebHome HTTP/1.1" 200 10419
h24-70-56-49.ca.shawcable.net - - [07/Mar/2016:21:16:23 -0800] "GET /twiki/pub/TWiki/TWikiLogos/twikiRobot46x50.gif HTTP/1.1" 200 2877
h24-70-56-49.ca.shawcable.net - - [07/Mar/2016:21:16:33 -0800] "GET /twiki/bin/view/Main/TWikiUsers HTTP/1.1" 200 6697
h24-70-56-49.ca.shawcable.net - - [07/Mar/2016:21:16:40 -0800] "GET /twiki/bin/view/Main/KevinWGagel HTTP/1.1" 200 4901
64.242.88.10 - - [07/Mar/2016:21:20:14 -0800] "GET /twiki/bin/edit/TWiki/RichardDonkin?t=1078691832 HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:21:21:40 -0800] "GET /twiki/bin/oops/Main/DCC?template=oopsmore&param1=1.1&param2=1.1 HTTP/1.1" 200 6399
64.242.88.10 - - [07/Mar/2016:21:23:38 -0800] "GET /twiki/bin/view/TWiki/TWikiUpgradeTo01May2000 HTTP/1.1" 200 7463
64.242.88.10 - - [07/Mar/2016:21:31:12 -0800] "GET /twiki/bin/edit/Main/Mail_release_date?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:21:33:51 -0800] "GET /twiki/bin/view/TWiki/TWikiPlugins?rev=1.19 HTTP/1.1" 200 26541
bh02i525f01.au.ibm.com - - [07/Mar/2016:21:34:00 -0800] "GET /AmavisNew.html HTTP/1.0" 200 2300
64.242.88.10 - - [07/Mar/2016:21:39:55 -0800] "GET /twiki/bin/attach/Main/ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:21:41:04 -0800] "GET /mailman/listinfo/techcomm HTTP/1.1" 200 6155
64.242.88.10 - - [07/Mar/2016:21:42:47 -0800] "GET /twiki/bin/view/TWiki/TWikiHistory?rev=1.8 HTTP/1.1" 200 15618
64.242.88.10 - - [07/Mar/2016:21:44:10 -0800] "GET /twiki/bin/edit/Sandbox/TestTopic7?topicparent=Sandbox.WebHome HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:21:50:22 -0800] "GET /twiki/bin/rdiff/TWiki/WebSearch HTTP/1.1" 200 55862
64.242.88.10 - - [07/Mar/2016:21:52:05 -0800] "GET /twiki/bin/rdiff/TWiki/TWikiTopics HTTP/1.1" 200 101445
64.242.88.10 - - [07/Mar/2016:22:03:19 -0800] "GET /twiki/bin/rdiff/Main/VishaalGolam HTTP/1.1" 200 5055
64.242.88.10 - - [07/Mar/2016:22:04:44 -0800] "GET /twiki/bin/view/Main/TWikiUsers?rev=1.21 HTTP/1.1" 200 6522
64.242.88.10 - - [07/Mar/2016:22:06:16 -0800] "GET /twiki/bin/edit/Main/Delay_notice_recipient?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:22:07:33 -0800] "GET /twiki/bin/view/TWiki/WikiNotation HTTP/1.1" 200 3617
64.242.88.10 - - [07/Mar/2016:22:08:43 -0800] "GET /twiki/bin/edit/Main/Forward_expansion_filter?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:22:09:44 -0800] "GET /twiki/bin/edit/Main/TestArea?topicparent=Main.WebHome HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:22:10:55 -0800] "GET /twiki/bin/view/Main/TokyoOffice?rev=1.2 HTTP/1.1" 200 4366
64.242.88.10 - - [07/Mar/2016:22:12:28 -0800] "GET /twiki/bin/attach/TWiki/WebSearch HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:22:15:57 -0800] "GET /mailman/listinfo/hs_rcafaculty HTTP/1.1" 200 6345
64.242.88.10 - - [07/Mar/2016:22:17:40 -0800] "GET /twiki/bin/view/TWiki/TWikiSkins?skin=print HTTP/1.1" 200 9563
64.242.88.10 - - [07/Mar/2016:22:27:18 -0800] "GET /twiki/bin/edit/Main/OfficeLocations?t=1078691049 HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:22:29:10 -0800] "GET /twiki/bin/view/Main/ThanadonSomdee HTTP/1.1" 200 4611
h24-71-249-14.ca.shawcable.net - - [07/Mar/2016:22:29:12 -0800] "GET /mailman/options/cnc_notice/arobin%40shaw.c HTTP/1.1" 200 3382
h24-71-249-14.ca.shawcable.net - - [07/Mar/2016:22:29:13 -0800] "GET /icons/mailman.jpg HTTP/1.1" 200 2022
h24-71-249-14.ca.shawcable.net - - [07/Mar/2016:22:29:13 -0800] "GET /icons/PythonPowered.png HTTP/1.1" 200 945
h24-71-249-14.ca.shawcable.net - - [07/Mar/2016:22:29:13 -0800] "GET /icons/gnu-head-tiny.jpg HTTP/1.1" 200 3049
h24-71-249-14.ca.shawcable.net - - [07/Mar/2016:22:29:41 -0800] "POST /mailman/options/cnc_notice HTTP/1.1" 200 3533
h24-71-249-14.ca.shawcable.net - - [07/Mar/2016:22:30:08 -0800] "POST /mailman/options/cnc_notice HTTP/1.1" 200 13973
64.242.88.10 - - [07/Mar/2016:22:31:25 -0800] "GET /twiki/bin/view/TWiki/TextFormattingRules?rev=r1.16 HTTP/1.1" 200 17361
64.242.88.10 - - [07/Mar/2016:22:35:53 -0800] "GET /twiki/bin/edit/Main/Default_delivery_slot_discount?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12851
64.242.88.10 - - [07/Mar/2016:22:36:58 -0800] "GET /twiki/bin/rdiff/TWiki/TWikiHistory?rev1=1.10&rev2=1.9 HTTP/1.1" 200 5336
64.242.88.10 - - [07/Mar/2016:22:39:00 -0800] "GET /twiki/bin/search/TWiki/SearchResult?scope=text&regex=on&search=Al%20*Williams[^A-Za-z] HTTP/1.1" 200 4364
64.242.88.10 - - [07/Mar/2016:22:45:46 -0800] "GET /twiki/bin/edit/Main/Smtpd_banner?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2016:22:47:19 -0800] "GET /twiki/bin/view/Main/WebHome?rev=r1.9 HTTP/1.1" 200 9133
64.242.88.10 - - [07/Mar/2016:22:48:55 -0800] "GET /twiki/bin/rdiff/TWiki/TWikiSkins?rev1=1.10&rev2=1.9 HTTP/1.1" 200 5989
64.242.88.10 - - [07/Mar/2016:22:51:55 -0800] "GET /twiki/bin/attach/TWiki/AndreaSterbini HTTP/1.1" 401 12851
64.242.88.10 - - [07/Mar/2016:22:53:36 -0800] "GET /twiki/bin/rdiff/TWiki/TWikiPlugins?rev1=1.20&rev2=1.19 HTTP/1.1" 200 5140
64.242.88.10 - - [07/Mar/2016:22:54:43 -0800] "GET /twiki/bin/view/Know/ReadmeFirst?rev=1.4 HTTP/1.1" 200 6736
64.242.88.10 - - [07/Mar/2016:22:58:24 -0800] "GET /twiki/bin/view/Main/TokyoOffice?rev=r1.3 HTTP/1.1" 200 3853
64.242.88.10 - - [07/Mar/2016:23:09:07 -0800] "GET /twiki/bin/view/TWiki/AlWilliams?rev=1.1 HTTP/1.1" 200 3697
calcite.rhyolite.com - - [07/Mar/2016:23:10:27 -0800] "GET /clients.html HTTP/1.1" 200 18753
64.242.88.10 - - [07/Mar/2016:23:10:44 -0800] "GET /twiki/bin/view/TWiki/JohnTalintyre HTTP/1.1" 200 3766
64.242.88.10 - - [07/Mar/2016:23:13:51 -0800] "GET /twiki/bin/view/TWiki/TWikiDocGraphics HTTP/1.1" 200 14492
64.242.88.10 - - [07/Mar/2016:23:15:51 -0800] "GET /twiki/bin/view/TWiki/TextFormattingRules?rev=r1.24 HTTP/1.1" 200 20981
64.242.88.10 - - [07/Mar/2016:23:16:57 -0800] "GET /twiki/bin/rdiff/Main/SanJoseOffice HTTP/1.1" 200 9524
64.242.88.10 - - [07/Mar/2016:23:19:01 -0800] "GET /twiki/bin/rdiff/Main/WebNotify HTTP/1.1" 200 16853
64.242.88.10 - - [07/Mar/2016:23:20:26 -0800] "GET /twiki/bin/view/TWiki/TWikiSiteTools HTTP/1.1" 200 14435
64.242.88.10 - - [07/Mar/2016:23:23:00 -0800] "GET /twiki/bin/rdiff/TWiki/RichardDonkin?rev1=1.2&rev2=1.1 HTTP/1.1" 200 5891
64.242.88.10 - - [07/Mar/2016:23:27:26 -0800] "GET /twiki/bin/search/TWiki/SearchResult?scope=text&regex=on&search=Web%20*Preferences[^A-Za-z] HTTP/1.1" 200 20030
64.242.88.10 - - [07/Mar/2016:23:30:23 -0800] "GET /twiki/bin/rdiff/TWiki/WebHome HTTP/1.1" 200 108162
64.242.88.10 - - [07/Mar/2016:23:34:31 -0800] "GET /twiki/bin/edit/Main/Lmtp_quit_timeout?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12851
64.242.88.10 - - [07/Mar/2016:23:36:48 -0800] "GET /twiki/bin/view/TWiki/WebSiteTools HTTP/1.1" 200 5208

Because the logs are stayed the same every time, it should be incorrect to have the list of frames changed every time.

As we all agree that each frame should be each line of docker logs, in that case the number of frames should be exactly the same as the number of lines in the above file I gave.

I also tried to write a unit test to directly use this log output instead of using the IT to calling the image. However, the way current FramedInputStreamConsumer is implemented needs to have the array encoded to bytes array and I didn't figure out a good way to do it.

I think this case should already demonstrate that there are some bugs in the buffer array used in FramedInputStreamConsumer.java

@yuting-liu

Copy link
Copy Markdown
Contributor Author

@bsideup any comments on this PR?

@lei-sumo

Copy link
Copy Markdown

@bsideup This issue is blocking our customers. Could you please expedite the review and approval process? Appreciate your help here.

@bsideup

bsideup commented Feb 16, 2022

Copy link
Copy Markdown
Member

Hey @lei-sumo. Nothing changed since my last comment ( #1754 (comment) ). A test should be provided that will show that there is an actual issue, and so far I only saw wrong assumptions (frames are not guaranteed to arrive in full and should be glued).

@yuting-liu

Copy link
Copy Markdown
Contributor Author

@bsideup

frames are not guaranteed to arrive in full and should be glued).

I don't think this is correct as our log ingestion relies on the thing that frames are guaranteed to arrive full and this seems to us it only gets changed after #1647. This means that this change(#1647) is not a backward compatible change.

Besides, I think after we compare the test result between two test cases: #1782 and this one, we have already confirm that for the same test, if we can make the change in this PR, the assumption that frames can arrive full and no need to be glued then.

@stale

stale Bot commented May 25, 2022

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants