Comments (2)
Please wait a moment, let me understand the issue.
from ecapture.
Bug Analysis
In the following code, assuming now the worker routine is before ew.Close()
case _ = <-ew.ticker.C:
// 输出包
if ew.tickerCount > MaxTickerCount {
//ew.processor.GetLogger().Printf("eventWorker TickerCount > %d, event closed.", MaxTickerCount)
ew.Close()
return
}
Just at the same time, multiple events from the same process might be generated and the are passed firstly toEventProcessor.Serve routine
through ep.incoming channel(1024)
, and then sent to Worker routine through ew.incoming channel(16)
. These events with same uuid are allocated to the same worker that executed before ew.Close(). Because the worker do not received from the channel at the moment , the event is put in the buffer allocated for the channel and it would not be blocked for now . However, This event will be lost, because this worker will never handle the event in buffer. Moreover, if the many events are generated, the buffer in ew.incoming
(size is 16) is full and the EventProcessor.Serve routine
hang first which is impossible to recovered.
Again, that is because the worker is about to be removed and will never receive events from that channel.
With the EventProcessor.Serve routine
hang, the main routine that generates events will ultimately hang because the ep.incoming channel
(with size of 1024) will be full sooner or later.
from top to down
event generate from main routine
|
|
| ep.incoming channel(1024)
|
EventProcessor.Serve routine
|
|
|
| ew.incoming channel(16)
|
|
Worker routine
Root Cause
The hang is due to the fact that worker returned by getWorkerByUUID()
may be retired(i.e, never read from the channel). It should be fixed.
from ecapture.
Related Issues (20)
- load bpf failed on kernel 4.18.0
- android version compilation has failed. HOT 1
- gotls shared object not supported HOT 11
- FTL module run failed, skip it. error="couldn't init manager xxx error:program probe_entry_SSL_read HOT 3
- unsupported arch library HOT 2
- ecapture cannot work on linux with boringssl HOT 9
- panic on pixel 6 pro(android13) HOT 1
- tls module couldn't find binPath stat /usr/lib/firefox/libnspr4.so: no such file or directory HOT 6
- the handshake State judgment is not completely accurate on boringssl with the branch main-with-bazel HOT 8
- 使用-l参数时出现WRN failed to create multiLogger error="open : no such file or directory" HOT 1
- master secret length is too long for every connection HOT 2
- can not open /apex/com.android.conscrypt/lib64/libssl.so HOT 6
- DTLS protocol support HOT 7
- Using eCapture with telegram android app HOT 9
- ecapture抓不到小米汽车的登录包,提示网络连接错误 HOT 2
- 运行 出现错误 HOT 1
- runngin crashed HOT 18
- iOS support viability discussion HOT 2
- 在多种操作系统发行版上无法捕获mysqld服务端的keylog HOT 6
- "-p" seems not worked when create keylog HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecapture.