cgroups v2 Memory 컨트롤러로 메모리 고갈 상황 재현하기

컨테이너 하나에 메모리 제한 512Mi를 걸어놓고 배포했는데, 실제 트래픽이 몰리면 그 한도를 넘길 때 서비스가 어떻게 반응할지 로컬에서 미리 확인해보고 싶을 때가 있다. 스왑이 있으면 조용히 스왑아웃되다 끝날 수도 있고,…

Continue Readingcgroups v2 Memory 컨트롤러로 메모리 고갈 상황 재현하기

Ubuntu 업데이트 오류를 ​​수정하는 방법

Ubuntu는 안정적인 배포판이지만 apt update/apt install 도중 여러 이유로 실패하는 경우가 잦다. 원인은 크게 세 가지로 나뉜다 — 다른 프로세스가 dpkg 락을 잡고 있는 경우, 이전 설치 작업이 중간에 끊겨…

Continue ReadingUbuntu 업데이트 오류를 ​​수정하는 방법

VSCODE ssh 연결 실패 해결방법(could not establish connection to “tmp”)

VS Code Remote-SSH로 원격 서버에 붙으려 하면 "Could not establish connection to ..."와 함께 "프로세스에서 없는 파이프에 쓰려고 했습니다"(Windows의 ERROR_PIPE_NOT_CONNECTED)가 뜨는 경우가 있다. SSH 자식 프로세스가 이미 죽어 파이프에 쓸…

Continue ReadingVSCODE ssh 연결 실패 해결방법(could not establish connection to “tmp”)

‘atomic_inc’ from incompatible pointer type [-Werror=incompatible-pointer-types]

벤더 커널을 빌드하다가 아래와 같은 에러를 만났다. /home/worker/.../kernel-source/include/linux/cred.h:258:28: error: passing argument 1 of 'atomic_inc' from incompatible pointer type [-Werror=incompatible-pointer-types] 258 | atomic_inc(&new->usage); | ^~~~~~~~~~~ | | | atomic_long_t * {aka…

Continue Reading‘atomic_inc’ from incompatible pointer type [-Werror=incompatible-pointer-types]

asm/types.h: No such file or directory 문제 (Yocto pseudo-native)

Yocto 빌드 중 pseudo-native의 do_compile 단계에서 이런 에러를 만날 때가 있다. gcc -c -isystem .../recipe-sysroot-native/usr/include -isystem .../recipe-sysroot-native/usr/include -m32 ... pseudo_util.c In file included from /usr/include/linux/stat.h:5, from /usr/include/bits/statx.h:31, from /usr/include/sys/stat.h:465, from…

Continue Readingasm/types.h: No such file or directory 문제 (Yocto pseudo-native)

tmux 세션 관리와 스크립팅으로 원격 작업 환경 구성하기

SSH 연결이 끊기면(노트북을 덮거나, 와이파이 끊김, VPN 타임아웃) 터미널에 붙어 있던 셸과 프로세스가 통째로 죽는다. nohup/disown으로 프로세스는 살릴 수 있어도 다시 접속해서 출력을 보거나 개입할 방법은 없다. tmux(terminal multiplexer)는 터미널…

Continue Readingtmux 세션 관리와 스크립팅으로 원격 작업 환경 구성하기

CVE 패치 적용과 Exploit 검증 자동화 — CVE-2021-3156으로 보는 4단계 파이프라인

취약점 스캐너가 "이 패키지에 CVE가 있다"고 보고하면 대개 apt upgrade 한 번으로 끝냈다고 여기기 쉽다. 하지만 패치가 실제로 설치됐는지, 그리고 그 패치가 해당 CVE의 익스플로잇 경로를 실제로 막았는지는 별개의 질문이다.…

Continue ReadingCVE 패치 적용과 Exploit 검증 자동화 — CVE-2021-3156으로 보는 4단계 파이프라인