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)
- The SSL structure in openssl 3.2.0 has been modified HOT 4
- PCAP mode can only decrypt partial HTTPS traffic, not all of it HOT 8
- fatal error: concurrent map read and map write HOT 1
- 这是我姿势不对么?最新版本的总提示No runnable modules, Exit(1) HOT 2
- tls子命令可否支持ip过滤 HOT 6
- archlinux不存在/boot/config-`uname -r`文件,导致启动程序时报错 HOT 6
- I am new. How to use software? HOT 1
- how to use ecapture with nodejs fetch and python urllib.request HOT 6
- how to print text not hex in curl HOT 7
- gotls报错 HOT 7
- how to use ecapture in redroid HOT 2
- real phone got wrong warning HOT 1
- /usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x22 HOT 1
- Interactive bash command might be missed/lost under some circumstances HOT 12
- 安卓手机pixel6 pro 抓包app 报错:DumpResponse error HOT 10
- linux 环境抓go相关的包报错 HOT 4
- error: couldn't start bootstrap manager error HOT 1
- pcap mode failed on Android App while hex mode works fine HOT 2
- ecapture 0.7.6依旧无法抓取docker pull的完全URL HOT 8
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.