Yves Junqueira’s blog
bpf_trace_printk as a last-resort method to debug eBPF programs
It’s hard to debug problems in eBPF programs. When everything fails, there is a last-resort: use bpf_trace_printk.
bpf_trace_printk can be used as such:
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #93c836; background-color: #272822} span.s1 {font-variant-ligatures: no-common-ligatures}
bpf_trace_printk(“fname %s\\n”, valp->fname);
The double-escaped \\n is needed when the C source code is embedded in a Python multi-line string, which is the case for most bcc examples.
You can use formatting directives like %s and %d, but you can only use one per line.…
Read more ⟶nictuku/dht in the wild
Open-source is magical. When I wrote my distributed hash table library back in 2012, I just wanted to write something cool that made computers talk to each other efficiently at a very large scale.
Since publishing it, the library has been used by botnets, has a source code evolution video and was used by someone’s Bachelor thesis in Switzerland.
And today I found out that computer scientists from University of British Columbia and University of Bamberg have analyzed the library in a very cool paper to verify that it’s correct!…
Read more ⟶Speed up Bazel builds inside docker containers on OSX
I’ve been using Bazel to developing on a Mac.
Occasionally I need to test docker images that are built with the amazing rules_docker. But running anything inside docker on OSX is really painfully slow. And Bazel builds need to read a ton of files, so things can take forever.
I don’t think there’s a definitive answer for that other than avoiding the combination of OSX+docker, but I found that helped:…
Read more ⟶