Recent Posts
Install Untrusted Vpn
背景 公司的IT让装新版本的飞连了,一看到要扫全盘权限就没底。 虽说是为了安全,但谁也不知道有什么行为。我拖着几年没升级飞连,但随着办公网无法访问IDC,也得想想新的办法了。
解决方案 一句话概括: 虚拟机 + 端口转发 + 主机路由. 除了开着虚拟机耗内存外没其他毛病。
虚拟机 使用 qemu。 mac上可以使用utm, 直接download arm架构的虚拟机。
端口转发要虚拟网卡使用vlan模式。
主机路由推荐sshuttle
如果卡顿注意提升相关进程调度的优先级
read more
chrome 在linux下启用wayland
安装chrome 我的电脑用的是arch, 没有官方包,所以使用yay -S google-chrome安装AUR包
开启wayland chrome地址输入chrome://flags/#ozone-platform-hint 选项改为auto
解决输入法问题 需要在添加命令行参数以启用wayland输入法: google-chrome-stable --enable-wayland-ime。为了方便桌面启动,修改/usr/share/applications/google-chrome.desktop, 在每个Exec后面添加该参数,例如改 Exec=/usr/bin/google-chrome-stable %U -> Exec=/usr/bin/google-chrome-stable --enable-wayland-ime %U 其他人有用--gtk-version=4,但在我的机器上没用
read more
记一次lsof卡住导致的问题
背景 k8s集群里面新加入了一台机器,装上rocklinux:9的系统,调度cdc上去的时候会运行lsof -i:8080 然后总是卡住。但是主机上的lsof又一切正常。
排查过程 使用k debug node/10.2.12.132 -it --image=hub.pingcap.net/jenkins/centos7_golang-1.20 起一个pods,运行lsof -i:8080 卡住。 k8s 版本不支持debug attach pod, 直接上主机 container的进程在主机上可见,在主机上找到pod里面的进程 ps -ef|grep lsof 使用gdb调试
gdb attach <pid> bt 显示
Program received signal SIGTSTP, Stopped (user). 0x00007f7a7967e0e0 in __close_nocancel () from target:/lib64/libc.so.6 (gdb) bt #0 0x00007f7a7967e0e0 in __close_nocancel () from target:/lib64/libc.so.6 #1 0x000000000040272a in main () (gdb) disassemble Dump of assembler code for function __close_nocancel: 0x00007f7a7967e0d9 <+0>: mov $0x3,%eax 0x00007f7a7967e0de <+5>: syscall => 0x00007f7a7967e0e0 <+7>: cmp $0xfffffffffffff001,%rax 0x00007f7a7967e0e6 <+13>: jae 0x7f7a7967e119 <close+73> 0x00007f7a7967e0e8 <+15>: ret End of assembler dump.
read more