-
Ebpf Permission Denied
报错:
load program: permission denied: Unrecognized arg#0 type PTR ... ; bpf_map_update_elem(&birth, &pid, &v, BPF_ANY); 20: (18) r1 = 0xffff89a90e035c00 22: (bf) r2 = r7 23: (b7) r4 = 0 24: (85) call bpf_map_update_elem#2 invalid indirect read from stack R3 off -32+12 size 16 processed 23 insns (limit 1000000) max_states_per_insn 0 total_states 1 peak_states 1 mark_read 1
原因:struct v 未对齐,需要补充一下 padding
-
tags in docker image name
In docker-Context here are the important informations you need.
Alpine Url: https://alpinelinux.org/ Imagename: alpine Shorty: Its very small. Packagemanger: apk Shells: /bin/sh Size: Few MBs - current tag needs 2.7MB
Jessie aka Debian 8 Url: https://wiki.debian.org/DebianJessie Imagename: debian:jessie Shorty: No LTS anymore Packagemanager: apt Shells: /bin/bash Size: ~50mb
Stretch aka Debian 9 Url: https://wiki.debian.org/DebianStretch Imagename: debian:stretch Shorty: LTS is running out Packagemanager: apt Shells: /bin/bash and many more Size: ~40mb
Buster aka Debian 10 Url: https://wiki.debian.org/DebianBuster Imagename: debian:buster Shorty: All what you need, but newer Packagemanager: apt Shells: /bin/bash and many more Size: ~50mb
Bullseye aka Debian 11 Url: https://wiki.debian.org/DebianBullseye Imagename: debian:bullseye Shorty: Newest debian Shells: /bin/bash and many more Size: ~50mb
Ubuntu based on debain Url: https://hub.docker.com/_/ubuntu Imagename: ubuntu Shorty: All what you need Packagemanager: apt Shells: /bin/bash and more Size: ~25mb
You can find a list of Debian releases and their end of life (EOL) dates here: wiki.debian.org/DebianReleases
-
难受
过的很难受,只想得到父母的支持。
-
什么是爱
付出自己觉得珍贵的东西才叫爱。
觉得时间珍贵,还愿意付出时间,这叫爱。
觉得钱珍贵,还愿意花钱,这叫爱。
-
最大缺点
我最大的缺点就是自己有很多缺点,却不能容忍别人的缺点。
-
Golang Runtime Memory
https://pkg.go.dev/runtime#MemStats
一个例子
# runtime.MemStats # Alloc = 0.46 GB # TotalAlloc = 427382 GB # Sys = 6.25 GB # Lookups = 0 # Mallocs = 1864 # Frees = 1864 # HeapAlloc = 0.46 GB # HeapSys = 5.93 GB # HeapIdle = 5.21 GB # HeapInuse = 0.72 GB # HeapReleased = 4.03 GB # HeapObjects = 4048368 # Stack = 6225920 / 6225920 # MSpan = 9607448 / 73842688 # MCache = 83328 / 98304 # BuckHashSys = 2.13 MB # GCSys = 0.23 GB # OtherSys = 13 MB # NextGC = 0.83 GB # LastGC = 1653288332185470574
MEM USAGE / LIMIT 918.7MiB / 125.5GiB
可见,RSS 大概是 HeapInuse GCSys 的总和。
注意,HeapInuse 是占用的内存,比 HeapAlloc 大。HeapAlloc 是已经分配给对象的,剩下的是已经占用的内存,可以随时分给差不多大小的对象。
HeapInuse is bytes in in-use spans. In-use spans have at least one object in them. These spans can only be used for other objects of roughly the same size.
HeapInuse minus HeapAlloc estimates the amount of memory that has been dedicated to particular size classes, but is not currently being used. This is an upper bound on fragmentation, but in general this memory can be reused efficiently.
-
Golang Replace
github.com/spf13/cast v1.4.1 有问题,想改用 oasisprotocol/cast v0.0.0-20220606122631-eba453e69641
但是直接在代码里面使用后者会报错,因为后者的代码里面还是用的 spf13/cast,和项目名字对不起来。
但是 go.mod 里面使用 replace 可以做到使用 oasisprotocol/cast
replace github.com/spf13/cast v1.4.1 => github.com/oasisprotocol/cast v0.0.0-20220606122631-eba453e69641
-
github-workflow
写了一个新的 workflow,可以自动 release,并上传打包好的 Binary,舒服一些了。
并在这个基础上修复了一下 Bug。
-
harbor devcenter-api 测试报 csrf 错误
harbor 2.0 版本
harbor devcenter-api 页面测试某些 API(不确定是不是全部 POST 请求) 的时候,报错 ‘CSRF token invalid’
直接 curl 没问题。
查下来,是因为请求的 Cookie 里面带 sid 字段,Harbor 认为这是一个带 session 的请求,就不会跳过 csrf 验证。
-
不喜欢出去玩了
以前每天都要出去玩一会,自动疫情以来,天天在家里不敢出去。
现在解封了,叫他出去玩,他也不出去了,就喜欢在家里面玩他的玩具车,拿积木拼停车场,可以玩一天乐此不疲。
今天叫他出去玩,也是不去,我以为是他不愿意和我玩了(也的确是不太愿意和我玩,小时候总是叫我举高高,现在也不让举了,也不给亲脸了),然后爷爷说现在就是不喜欢出去玩了,也不知道怎么回事。
后面还是跟着奶奶出去了,拿着遥控坦克,去抓桥。还是出去晒晒阳光好。