Repository navigation
Replies: 2 comments 4 replies
|
I did not classify this issue as a BUG, because fixing it might require modifying a large amount of code, but I did reproduce it in a private project. |
|
Thanks for the clear report. It pinned down the cause exactly. The Could you try
About making a lost report visible: that is planned as a separate change. Today a report that cannot reach Bear is still logged only at debug level. |
Uh oh!
There was an error while loading. Please reload this page.
Problem
Bear captures nothing for build tasks that run inside a new network namespace, while all
other tasks are captured normally. The compilation succeeds and the output database is
simply empty for those tasks. No warning or error is printed at the default log level, so
the loss is invisible.
This was observed on a large Yocto/bitbake build. bitbake isolates every task in its own
network namespace unless the task declares
networkin its varflags(
do_compile[network] = "1"). Tasks that declare it are captured; tasks that don't lose100% of their compiler invocations. Because the isolation is per task, the result looks
like an arbitrary recipe-level capture gap rather than a transport failure, which makes it
very hard to diagnose.
Reproduced with bear 4.0.4; the same failure path is present in the 4.2.4 sources.
Cause
The reporter opens a fresh TCP connection to the collector's loopback address for every
event. A process inside a new network namespace has no route to the parent namespace's
loopback, so every connection attempt fails with
ENETUNREACH. That failure is onlylogged at
debuglevel, so it is never surfaced to the user.Expected
Either the events are delivered (e.g. through a transport that namespace isolation cannot
break), or the failure is reported at a visible log level instead of being silently
discarded.
Environment
All reactions