My English Study매일 만나는 비즈니스 영어
← 기술 공유·토론 학습 목록

SYSTEM SW / 2026-08-07 / Tech sharing & debate

Tech Share on Debugging Lockups with Watchdogs and Ramdumps

워치독과 램덤프로 락업 디버깅하기 기술 공유

커널·BSP 팀이 주최한 사내 기술 공유 세션입니다. soft lockup, hard lockup, 워치독 bark와 bite의 차이, 실제 Orion 디스플레이 hang 사례로 본 램덤프 분석 방법, 그리고 사용자 빌드에서 soft lockup 시 패닉을 걸지 여부를 두고 SQE, 프레임워크, 모뎀 팀과 토론합니다.

가상의 비즈니스 회의 · 중급~고급 · 2,205단어 · 약 18분

Daniel Cho · Kernel & BSPYuna Kwak · Kernel & BSPElena Park · Platform FrameworkTom Ahn · SQESeojin Lim · Modem Software

01 / English script

Welcome and Goals

01 · Daniel ChoKernel & BSP

Okay, let's get started. Welcome to the first of our Friday tech shares. I see people from four teams, which is exactly what I hoped for. The idea is simple: once a week, someone shares a technique they use in their daily work, and we have an open discussion afterward. No slides are required, and questions are welcome at any time. Today, Yuna and I will talk about debugging lockups, because it's the type of issue where teams waste the most time pointing at each other.

02 · Yuna KwakKernel & BSP

And it's also the type of issue where a little bit of knowledge goes a long way. Most lockups can be narrowed down to the right team in fifteen minutes if you know where to look in the dump. Our goal today is that by the end of this hour, everyone here can at least do that first triage step on their own.

03 · Tom AhnSQE

That would make my life much easier. Right now, when the stress lab sees a hang, we basically attach the dump and assign it to kernel by default. I suspect that's not always fair.

04 · Daniel ChoKernel & BSP

It's not, but don't worry, we're not keeping score. Let's go around very quickly so I know who's in the room. Elena, Seojin?

05 · Elena ParkPlatform Framework

Elena from Platform Framework. I mostly debug system server hangs, so I'm curious where the line is between a framework hang and a kernel lockup.

06 · Seojin LimModem Software

Seojin, Modem Software. We just had an incident where a debug restart policy ended up in a production build, so I'm here to understand the policies better, honestly.

Types of Lockups

07 · Daniel ChoKernel & BSP

Great, Elena's question is a perfect starting point. Let's define our terms, because people use 'hang' to mean five different things. At the bottom, we have a hard lockup: a CPU is stuck with interrupts disabled, so it can't even respond to the timer. Above that, a soft lockup: a CPU is stuck in kernel code with interrupts enabled, but it hasn't let the scheduler run anything else for more than twenty seconds, by default.

08 · Yuna KwakKernel & BSP

Then there's a hung task, which is different. The CPU is fine, but a specific task has been sleeping in an uninterruptible state for too long, usually waiting for a lock or for I/O that never completes. The CPU is happily running other things. It's just that one task, and everything waiting for it, is stuck.

09 · Elena ParkPlatform Framework

And the system server watchdog sits on top of all that, right? When our watchdog fires, it's because a thread in the system server didn't check in for sixty seconds.

10 · Daniel ChoKernel & BSP

Exactly. And here's the key insight: a framework watchdog can be caused by any of the layers below it. If a kernel driver holds a mutex forever, the system server thread that needs it shows up as a hung task, and sixty seconds later, the framework watchdog fires. The framework is the messenger, not necessarily the culprit.

11 · Tom AhnSQE

Can I ask about the hardware watchdog? In our reset reasons, we see 'watchdog bark' and 'watchdog bite'. I've always assumed they're the same thing.

12 · Yuna KwakKernel & BSP

Good question, and it's a common confusion. The hardware watchdog is a timer that the kernel has to pet regularly. If it isn't petted in time, first it barks: it raises an interrupt, and the kernel gets one last chance to save its state, usually by triggering a panic and collecting a ramdump. If the kernel can't even handle that interrupt, because the CPU is completely locked, the watchdog bites: it resets the chip immediately, and you often get very little information.

13 · Tom AhnSQE

So a bite is a much worse sign than a bark, from a debugging point of view.

14 · Daniel ChoKernel & BSP

In terms of how much data you get, yes. A bite usually means interrupts were disabled on the CPU that should have handled the bark. So the reset reason alone already tells you to look for code that disables interrupts for too long, which narrows things down a lot.

15 · Elena ParkPlatform Framework

Is there any way to get more information out of a bite? It feels like those are the cases where we need it most.

16 · Yuna KwakKernel & BSP

There are a couple of tricks. On most chipsets, the bootloader can preserve a small region of memory across the reset, and the kernel writes its log there continuously. So after a bite, the next boot can still recover the last few seconds of kernel messages. It's not a full dump, but it often shows which driver was active right before the reset. We call it the last kernel log, and SQE should always attach it.

17 · Tom AhnSQE

Noted. I'll make that mandatory in our filing template.

Walking Through a Real Ramdump

18 · Yuna KwakKernel & BSP

Let me make this concrete with a real case from Orion last spring. The symptom was that the screen froze during a video call, and after about sixty seconds, the device rebooted. SQE filed it as a display issue, and the display team spent a week on it. When I finally looked at the dump, here's the order I followed, and I'd recommend everyone use the same order.

19 · Yuna KwakKernel & BSP

Step one: read the panic reason and the last kernel log lines. In this case, the panic was triggered by the framework watchdog, which killed the system server, and the log said the main thread was blocked. That tells us the framework detected the problem, but not who caused it. Step two: look at what the blocked thread is waiting on. Here, it was waiting in the kernel, inside the binder driver, for a reply from the camera hardware service.

20 · Elena ParkPlatform Framework

So you follow the chain of who is waiting for whom, until you find the thread that isn't waiting for anything but is still stuck.

21 · Yuna KwakKernel & BSP

Exactly, that's step three. The camera service thread was waiting on a mutex in the camera driver. The crash utility can tell you the owner of a mutex, so I looked up the owner, and it was a kernel worker thread that was running, not sleeping, on CPU five. When I looked at that CPU's stack, it was spinning in a loop inside the image processor driver, waiting for a hardware status bit that never got set.

22 · Tom AhnSQE

So in the end, it was the camera driver, not the display. The display just stopped updating because the whole framework was blocked behind it.

23 · Yuna KwakKernel & BSP

Right. And the fix was a timeout on that polling loop plus a hardware reset path for the image processor. The display team had done nothing wrong. With the right order, that triage takes about fifteen minutes. Without it, it took a week and three teams.

24 · Seojin LimModem Software

A quick question about step two. Binder transactions cross process boundaries. How do you find which thread in the other process is handling the call? In the modem service, we've had cases where we couldn't figure that out.

25 · Daniel ChoKernel & BSP

The binder driver keeps a record of every outstanding transaction, including the source and target threads. In the dump, you can print the binder state, and it shows something like: thread A in process X is waiting for transaction number such-and-such, which is being handled by thread B in process Y. It's one of the most useful things in the whole dump, and very few people know it's there.

26 · Seojin LimModem Software

That would have saved us days last month. Could you add the exact command to the wiki page?

27 · Daniel ChoKernel & BSP

Absolutely. That's actually one of today's action items.

Debate: Panic on Soft Lockup in User Builds

28 · Daniel ChoKernel & BSP

Now for the discussion part. There's a configuration option that makes the kernel panic, and therefore reboot, as soon as a soft lockup is detected. In our engineering builds, it's on. In user builds, the ones customers get, it's off. Yuna and I disagree on whether it should be on for user builds, and we thought it would be fun to argue about it in public.

29 · Yuna KwakKernel & BSP

My position is that it should be on. Today, when a soft lockup happens on a customer device, the kernel prints a warning and keeps going. Sometimes the device recovers, but often it ends up half-dead: the screen is frozen, the user has to hold the power button, and we get no dump at all. If we panicked immediately, we'd collect a ramdump, the device would reboot in about a minute, and we'd actually be able to fix the root cause.

30 · Daniel ChoKernel & BSP

And my position is that it's too aggressive for customers. Not every soft lockup is fatal. Some are caused by very long but legitimate operations, like a huge memory compaction on a device under pressure. In those cases, the system recovers on its own after a few seconds. If we panic, we turn a short stutter into a full reboot, which is far worse for the user. A reboot also shows up in our quality metrics, while a stutter doesn't.

31 · Tom AhnSQE

Isn't that last point a bit of a red flag, though? If we're choosing a policy partly because it keeps a metric looking good, we might be hiding real problems from ourselves.

32 · Daniel ChoKernel & BSP

Fair challenge, and I'll take that back. The metric shouldn't drive the decision. The user experience should. And for the user, a two-second stutter is better than a sixty-second reboot.

33 · Elena ParkPlatform Framework

From the framework side, I'd add that the half-dead state Yuna described is the worst outcome of all. When the kernel recovers partially, the system server often ends up in a weird state, and we see strange bugs for hours afterward. A clean reboot is sometimes kinder than limping along.

34 · Seojin LimModem Software

Is there a middle ground? For example, don't panic on the first soft lockup, but if the same CPU is still stuck after, say, sixty seconds, then panic. Short stalls recover on their own, and real lockups get a dump.

35 · Yuna KwakKernel & BSP

I actually like that a lot. It addresses Daniel's concern about legitimate long operations, and it addresses my concern about half-dead devices. We'd need to check whether the kernel supports that kind of escalation out of the box, or whether we'd have to carry a patch.

36 · Daniel ChoKernel & BSP

I can live with that, as long as we roll it out carefully. Let's not change the policy on all devices at once. We could enable it on the internal dogfood population first, compare the reboot rate and the number of useful dumps for a month, and then decide based on data rather than on who argued more convincingly today.

37 · Tom AhnSQE

SQE would be happy to help with the comparison. We can mirror the setting in the stress lab too, which would give us a much faster signal than dogfood alone.

Tooling and Data Collection

38 · Seojin LimModem Software

Before we close, I want to go back to my original reason for being here. After our incident, I'm nervous about any debug-related setting reaching a production build. How do we make sure the ramdump collection policy itself is correct for each build type?

39 · Daniel ChoKernel & BSP

Good question. In user builds, a full ramdump is disabled, because it can contain personal data, and it's too big to upload anyway. What we collect instead is a minidump: only the kernel log, the registers and stacks of each CPU, and a few key data structures, with all user memory excluded. It's usually a few megabytes, and in my experience, it's enough to triage about seventy percent of lockups.

40 · Yuna KwakKernel & BSP

And for the remaining thirty percent, we usually need the lock owner information, which isn't in the minidump today. That's something I'd like to add: the list of tasks in uninterruptible sleep and what each one is waiting on. It's small, it doesn't contain user data, and it would have made the camera case I described solvable from a minidump alone.

41 · Elena ParkPlatform Framework

If you add that, please include the binder transaction state as well. Half of the framework hangs I see are blocked binder calls, and that's exactly the information that would point me to the right process.

42 · Daniel ChoKernel & BSP

Noted. We'll need a privacy review for any change to what's collected, even if it's just kernel metadata, so let's propose both additions together in one review.

Action Items

43 · Daniel ChoKernel & BSP

Let's turn this into action items. Yuna: write a wiki page with the four-step triage order and the exact crash utility commands, including the binder state, by next Wednesday. Me: check whether the kernel supports escalating a soft lockup to a panic after a configurable delay, and draft a proposal for the dogfood experiment. Tom: set up a matching configuration in the stress lab once we have the proposal. Elena and Yuna: draft the minidump additions for privacy review together.

44 · Tom AhnSQE

And from SQE, I'll update our triage checklist so testers look at the reset reason and the blocked thread before assigning an issue to a team. If it saves even one wrong assignment a week, it's worth it.

45 · Seojin LimModem Software

I'll share the release check we're adding for debug settings in carrier configurations. It might be useful for kernel configuration options too.

Closing and Next Session

46 · Daniel ChoKernel & BSP

Thank you all. This was more lively than I expected, in a good way. Next Friday, August 14th, same time, 4 p.m. Korea time in the large meeting room, we'll have a session on the generic kernel image and how vendor modules should be split. That one will probably be even more controversial, so bring your opinions.

47 · Elena ParkPlatform Framework

I'll be there. And thanks for the binder tip; I'm going to try it on a hang I've been stuck on since Tuesday.

48 · Yuna KwakKernel & BSP

Let me know how it goes. If it works, that's a great example for the wiki page.

02 / 한국어 번역

환영 및 목표

01 · Daniel ChoKernel & BSP

자, 시작하겠습니다. 첫 번째 금요 기술 공유 세션에 오신 걸 환영합니다. 네 개 팀에서 오셨네요. 제가 바라던 그대로입니다. 취지는 간단합니다. 일주일에 한 번, 누군가 일상 업무에서 쓰는 기법을 공유하고 이후에 자유롭게 토론하는 겁니다. 슬라이드는 필수가 아니고, 질문은 언제든 환영합니다. 오늘은 유나 님과 제가 락업 디버깅에 대해 이야기하겠습니다. 팀끼리 서로 손가락질하느라 시간을 가장 많이 낭비하는 유형의 이슈거든요.

02 · Yuna KwakKernel & BSP

그리고 약간의 지식만 있어도 큰 도움이 되는 유형의 이슈이기도 합니다. 덤프에서 어디를 봐야 하는지만 알면, 대부분의 락업은 15분 안에 담당 팀을 좁힐 수 있습니다. 오늘 목표는 이 한 시간이 끝날 때 여기 계신 모든 분이 최소한 그 첫 번째 분류 단계를 혼자 할 수 있게 되는 겁니다.

03 · Tom AhnSQE

그러면 제 삶이 훨씬 편해지겠네요. 지금은 스트레스 랩에서 hang이 보이면 덤프를 첨부해서 기본적으로 커널에 배정합니다. 그게 항상 공정하진 않을 것 같아요.

04 · Daniel ChoKernel & BSP

공정하지 않죠. 하지만 걱정 마세요, 점수 매기는 거 아닙니다. 누가 와 있는지 알 수 있게 아주 빠르게 돌아가며 인사하죠. Elena, 서진 님?

05 · Elena ParkPlatform Framework

플랫폼 프레임워크팀 Elena입니다. 주로 시스템 서버 hang을 디버깅해서, 프레임워크 hang과 커널 락업 사이의 경계가 어디인지 궁금합니다.

06 · Seojin LimModem Software

모뎀 소프트웨어팀 서진입니다. 최근에 디버그용 재시작 정책이 양산 빌드에 들어간 사고가 있어서, 솔직히 정책을 더 잘 이해하려고 왔습니다.

락업의 종류

07 · Daniel ChoKernel & BSP

좋습니다. Elena의 질문이 시작점으로 딱 좋네요. 용어부터 정의합시다. 사람들이 'hang'을 다섯 가지 다른 의미로 쓰거든요. 가장 아래에는 hard lockup이 있습니다. CPU가 인터럽트가 비활성화된 상태로 멈춰서 타이머에도 응답할 수 없는 상태입니다. 그 위에 soft lockup이 있는데, CPU가 인터럽트는 활성화된 상태로 커널 코드에 갇혀서, 기본값 기준으로 20초 넘게 스케줄러가 다른 걸 실행하지 못하게 하는 상태입니다.

08 · Yuna KwakKernel & BSP

그리고 hung task가 있는데, 이건 다릅니다. CPU는 정상인데, 특정 태스크가 너무 오랫동안 인터럽트 불가능한 상태로 잠들어 있는 겁니다. 보통 락이나 끝나지 않는 I/O를 기다리고 있죠. CPU는 다른 일을 잘 실행하고 있습니다. 그 태스크 하나와 그걸 기다리는 모든 것만 멈춰 있는 거죠.

09 · Elena ParkPlatform Framework

그리고 시스템 서버 워치독은 그 모든 것 위에 있는 거죠? 저희 워치독이 발동하는 건 시스템 서버 안의 스레드가 60초 동안 응답을 보고하지 않았기 때문이고요.

10 · Daniel ChoKernel & BSP

정확합니다. 그리고 핵심 통찰은 이겁니다. 프레임워크 워치독은 그 아래 어느 계층에 의해서도 발생할 수 있습니다. 커널 드라이버가 뮤텍스를 영원히 잡고 있으면, 그게 필요한 시스템 서버 스레드는 hung task로 나타나고, 60초 뒤 프레임워크 워치독이 발동합니다. 프레임워크는 소식을 전하는 쪽이지, 반드시 범인은 아닙니다.

11 · Tom AhnSQE

하드웨어 워치독에 대해 물어봐도 될까요? 리셋 원인에 'watchdog bark'와 'watchdog bite'가 보이는데, 저는 항상 같은 거라고 생각했거든요.

12 · Yuna KwakKernel & BSP

좋은 질문이고, 흔히 헷갈리는 부분입니다. 하드웨어 워치독은 커널이 주기적으로 쓰다듬어 줘야 하는 타이머입니다. 제때 쓰다듬지 않으면 먼저 짖습니다. 즉 bark는 인터럽트를 발생시키고, 커널은 상태를 저장할 마지막 기회를 얻는데, 보통 패닉을 일으키고 램덤프를 수집합니다. CPU가 완전히 잠겨서 그 인터럽트조차 처리하지 못하면 워치독이 뭅니다. bite는 칩을 즉시 리셋하고, 정보가 거의 남지 않는 경우가 많습니다.

13 · Tom AhnSQE

그러니까 디버깅 관점에서는 bite가 bark보다 훨씬 나쁜 신호군요.

14 · Daniel ChoKernel & BSP

얻을 수 있는 데이터 양으로 보면 그렇습니다. bite는 보통 bark를 처리해야 할 CPU에서 인터럽트가 비활성화돼 있었다는 뜻입니다. 그래서 리셋 원인만으로도 인터럽트를 너무 오래 비활성화하는 코드를 찾으라는 신호가 되고, 범위가 크게 좁혀집니다.

15 · Elena ParkPlatform Framework

bite에서 더 많은 정보를 얻을 방법은 없나요? 그런 경우에 정보가 가장 필요한 것 같은데요.

16 · Yuna KwakKernel & BSP

몇 가지 요령이 있습니다. 대부분의 칩셋에서 부트로더가 리셋을 거쳐도 작은 메모리 영역을 보존할 수 있고, 커널은 그 영역에 계속 로그를 씁니다. 그래서 bite 후에도 다음 부팅 때 마지막 몇 초의 커널 메시지를 복구할 수 있습니다. 전체 덤프는 아니지만, 리셋 직전에 어떤 드라이버가 활성 상태였는지 보여 주는 경우가 많습니다. 저희는 그걸 마지막 커널 로그라고 부르는데, SQE가 항상 첨부해 주셔야 합니다.

17 · Tom AhnSQE

알겠습니다. 등록 템플릿에서 필수 항목으로 만들겠습니다.

실제 램덤프 분석 따라가기

18 · Yuna KwakKernel & BSP

작년 봄 Orion의 실제 사례로 구체적으로 보여 드릴게요. 증상은 영상 통화 중 화면이 멈추고, 약 60초 후 단말이 재부팅되는 것이었습니다. SQE가 디스플레이 이슈로 등록했고, 디스플레이팀이 일주일을 썼습니다. 마침내 제가 덤프를 봤을 때 따른 순서를 말씀드릴 텐데, 모든 분이 같은 순서를 쓰시길 권합니다.

19 · Yuna KwakKernel & BSP

1단계는 패닉 원인과 마지막 커널 로그 줄을 읽는 겁니다. 이 경우 패닉은 프레임워크 워치독이 시스템 서버를 종료하면서 발생했고, 로그에는 메인 스레드가 블록됐다고 나와 있었습니다. 프레임워크가 문제를 감지했다는 건 알 수 있지만, 누가 원인인지는 알 수 없습니다. 2단계는 블록된 스레드가 무엇을 기다리는지 보는 겁니다. 여기서는 커널 안 binder 드라이버에서 카메라 하드웨어 서비스의 응답을 기다리고 있었습니다.

20 · Elena ParkPlatform Framework

그러니까 누가 누구를 기다리는지 연결 고리를 따라가서, 아무것도 기다리지 않는데도 멈춰 있는 스레드를 찾는 거군요.

21 · Yuna KwakKernel & BSP

맞아요, 그게 3단계입니다. 카메라 서비스 스레드는 카메라 드라이버의 뮤텍스를 기다리고 있었습니다. crash 유틸리티로 뮤텍스 소유자를 알 수 있어서 소유자를 찾아보니, 5번 CPU에서 잠들지 않고 실행 중인 커널 워커 스레드였습니다. 그 CPU의 스택을 보니, 이미지 프로세서 드라이버 안에서 끝내 설정되지 않는 하드웨어 상태 비트를 기다리며 루프를 돌고 있었습니다.

22 · Tom AhnSQE

그러니까 결국 디스플레이가 아니라 카메라 드라이버였네요. 프레임워크 전체가 그 뒤에 막혀 있어서 디스플레이가 갱신을 멈췄을 뿐이고요.

23 · Yuna KwakKernel & BSP

맞습니다. 수정은 그 폴링 루프에 타임아웃을 두고 이미지 프로세서의 하드웨어 리셋 경로를 추가하는 것이었습니다. 디스플레이팀은 잘못한 게 없었어요. 올바른 순서대로 하면 그 분류는 15분 정도 걸립니다. 그 순서 없이 했을 때는 일주일과 세 팀이 필요했죠.

24 · Seojin LimModem Software

2단계에 대해 간단히 질문할게요. binder 트랜잭션은 프로세스 경계를 넘잖아요. 상대 프로세스의 어느 스레드가 그 호출을 처리하고 있는지 어떻게 찾나요? 모뎀 서비스에서 그걸 알아내지 못한 경우가 있었거든요.

25 · Daniel ChoKernel & BSP

binder 드라이버는 미처리 트랜잭션을 모두 기록하고 있는데, 출발 스레드와 대상 스레드도 포함됩니다. 덤프에서 binder 상태를 출력하면, X 프로세스의 A 스레드가 몇 번 트랜잭션을 기다리고 있고 그걸 Y 프로세스의 B 스레드가 처리하고 있다는 식으로 나옵니다. 덤프 전체에서 가장 유용한 정보 중 하나인데, 그게 있다는 걸 아는 사람이 아주 적어요.

26 · Seojin LimModem Software

그거 알았으면 지난달에 며칠은 아꼈겠네요. 정확한 명령어를 위키 페이지에 추가해 주실 수 있나요?

27 · Daniel ChoKernel & BSP

물론이죠. 사실 그게 오늘의 실행 항목 중 하나입니다.

토론: 사용자 빌드에서 soft lockup 시 패닉 여부

28 · Daniel ChoKernel & BSP

이제 토론 시간입니다. soft lockup이 감지되는 즉시 커널이 패닉을 일으키게, 즉 재부팅하게 하는 설정 옵션이 있습니다. 엔지니어링 빌드에서는 켜져 있고, 고객이 받는 사용자 빌드에서는 꺼져 있습니다. 유나 님과 저는 사용자 빌드에서도 켜야 하는지에 대해 의견이 다른데, 공개적으로 논쟁해 보면 재미있을 것 같았습니다.

29 · Yuna KwakKernel & BSP

제 입장은 켜야 한다는 겁니다. 지금은 고객 단말에서 soft lockup이 발생하면 커널이 경고를 출력하고 계속 진행합니다. 가끔은 단말이 복구되지만, 반쯤 죽은 상태가 되는 경우가 많습니다. 화면이 멈추고, 사용자는 전원 버튼을 길게 눌러야 하고, 저희는 덤프를 하나도 얻지 못하죠. 즉시 패닉을 일으키면 램덤프를 수집하고, 단말은 1분 정도 후 재부팅되고, 실제로 근본 원인을 고칠 수 있게 됩니다.

30 · Daniel ChoKernel & BSP

그리고 제 입장은 고객에게는 너무 공격적이라는 겁니다. 모든 soft lockup이 치명적인 건 아닙니다. 일부는 메모리 압박을 받는 단말에서의 대규모 메모리 컴팩션처럼 매우 길지만 정당한 작업 때문에 발생합니다. 그런 경우 시스템은 몇 초 뒤 스스로 복구됩니다. 패닉을 일으키면 짧은 버벅임을 전체 재부팅으로 바꾸는 셈이고, 사용자에게는 훨씬 나쁩니다. 재부팅은 품질 지표에도 잡히지만, 버벅임은 잡히지 않죠.

31 · Tom AhnSQE

그런데 마지막 부분은 좀 위험 신호 아닌가요? 지표를 좋게 보이게 한다는 이유로 정책을 고른다면, 실제 문제를 우리 스스로에게 숨기는 걸 수도 있잖아요.

32 · Daniel ChoKernel & BSP

정당한 지적이고, 그 말은 철회하겠습니다. 지표가 결정을 이끌어서는 안 되죠. 사용자 경험이 이끌어야 합니다. 그리고 사용자에게는 2초 버벅임이 60초 재부팅보다 낫습니다.

33 · Elena ParkPlatform Framework

프레임워크 쪽에서 덧붙이자면, 유나 님이 말한 반쯤 죽은 상태가 모든 결과 중 최악입니다. 커널이 부분적으로만 복구되면 시스템 서버가 이상한 상태가 되는 경우가 많고, 이후 몇 시간 동안 이상한 버그가 보입니다. 절뚝거리며 버티는 것보다 깨끗한 재부팅이 오히려 친절할 때가 있어요.

34 · Seojin LimModem Software

절충안은 없을까요? 예를 들어 첫 번째 soft lockup에서는 패닉을 걸지 않고, 같은 CPU가 60초쯤 지나도 여전히 멈춰 있으면 그때 패닉을 거는 거죠. 짧은 지연은 스스로 복구되고, 진짜 락업은 덤프를 얻게 되고요.

35 · Yuna KwakKernel & BSP

그거 정말 마음에 드네요. 정당한 긴 작업에 대한 Daniel의 우려도 해결하고, 반쯤 죽은 단말에 대한 제 우려도 해결합니다. 커널이 그런 단계적 대응을 기본으로 지원하는지, 아니면 패치를 따로 유지해야 하는지 확인해야겠네요.

36 · Daniel ChoKernel & BSP

신중하게 배포한다면 받아들일 수 있습니다. 모든 단말의 정책을 한 번에 바꾸지는 맙시다. 먼저 내부 도그푸드 단말에 활성화해서, 한 달 동안 재부팅률과 유용한 덤프 수를 비교하고, 오늘 누가 더 설득력 있게 주장했는지가 아니라 데이터를 보고 결정하면 됩니다.

37 · Tom AhnSQE

SQE가 비교 작업을 기꺼이 돕겠습니다. 스트레스 랩에도 같은 설정을 적용할 수 있어서, 도그푸드만으로 볼 때보다 훨씬 빠른 신호를 얻을 수 있을 겁니다.

도구와 데이터 수집

38 · Seojin LimModem Software

마무리하기 전에, 제가 여기 온 원래 이유로 돌아가고 싶습니다. 저희 사고 이후로 디버그 관련 설정이 양산 빌드에 들어가는 게 신경 쓰입니다. 빌드 유형별로 램덤프 수집 정책 자체가 올바른지 어떻게 보장하나요?

39 · Daniel ChoKernel & BSP

좋은 질문입니다. 사용자 빌드에서는 전체 램덤프가 비활성화돼 있습니다. 개인 데이터가 포함될 수 있고, 어차피 업로드하기에 너무 크거든요. 대신 미니덤프를 수집합니다. 커널 로그, 각 CPU의 레지스터와 스택, 그리고 몇 가지 핵심 자료 구조만 담고, 사용자 메모리는 모두 제외합니다. 보통 몇 메가바이트 정도이고, 제 경험상 락업의 약 70%는 그걸로 분류할 수 있습니다.

40 · Yuna KwakKernel & BSP

나머지 30%에는 보통 락 소유자 정보가 필요한데, 현재 미니덤프에는 없습니다. 제가 추가하고 싶은 게 그겁니다. 인터럽트 불가능한 수면 상태의 태스크 목록과 각 태스크가 무엇을 기다리는지요. 크기가 작고, 사용자 데이터도 없고, 제가 말씀드린 카메라 사례도 미니덤프만으로 해결할 수 있었을 겁니다.

41 · Elena ParkPlatform Framework

그걸 추가하신다면 binder 트랜잭션 상태도 포함해 주세요. 제가 보는 프레임워크 hang의 절반은 막힌 binder 호출이고, 그게 바로 올바른 프로세스를 가리켜 줄 정보거든요.

42 · Daniel ChoKernel & BSP

알겠습니다. 수집 항목을 바꾸는 건 커널 메타데이터뿐이라도 개인정보 검토가 필요하니, 두 가지 추가 사항을 한 번의 검토에서 함께 제안합시다.

실행 항목

43 · Daniel ChoKernel & BSP

이걸 실행 항목으로 정리하죠. 유나 님은 다음 주 수요일까지 4단계 분류 순서와 binder 상태를 포함한 정확한 crash 유틸리티 명령어를 담은 위키 페이지를 작성해 주세요. 저는 커널이 설정 가능한 지연 후 soft lockup을 패닉으로 올리는 기능을 지원하는지 확인하고, 도그푸드 실험 제안서 초안을 쓰겠습니다. Tom은 제안서가 나오면 스트레스 랩에 같은 설정을 구성해 주세요. Elena와 유나 님은 함께 개인정보 검토용 미니덤프 추가 항목 초안을 작성해 주세요.

44 · Tom AhnSQE

그리고 SQE에서는 테스터들이 이슈를 팀에 배정하기 전에 리셋 원인과 블록된 스레드를 확인하도록 분류 체크리스트를 업데이트하겠습니다. 일주일에 잘못된 배정을 한 건만 줄여도 그만한 가치가 있습니다.

45 · Seojin LimModem Software

저는 통신사 설정의 디버그 설정에 대해 추가하고 있는 릴리스 검사를 공유하겠습니다. 커널 설정 옵션에도 유용할 수 있을 것 같아요.

마무리 및 다음 세션

46 · Daniel ChoKernel & BSP

모두 감사합니다. 예상보다 활발했어요, 좋은 의미로요. 다음 주 금요일 8월 14일 같은 시간, 한국 시간 오후 4시에 대회의실에서 GKI와 벤더 모듈을 어떻게 나눠야 하는지에 대한 세션을 하겠습니다. 그건 아마 더 논쟁적일 테니 의견을 준비해 오세요.

47 · Elena ParkPlatform Framework

참석하겠습니다. 그리고 binder 팁 고마워요. 화요일부터 막혀 있던 hang에 바로 써 볼게요.

48 · Yuna KwakKernel & BSP

어떻게 됐는지 알려 주세요. 효과가 있으면 위키 페이지에 넣을 좋은 예시가 될 거예요.

03 / Business expressions

pointing at each other

서로 손가락질하는, 서로 탓하는 · 팀 간에 책임을 떠넘기는 상황을 묘사할 때

Today, Yuna and I will talk about debugging lockups, because it's the type of issue where teams waste the most time pointing at each other.

응용 연습
Instead of pointing at each other, let's look at the trace together.

narrowed down

범위가 좁혀진 · 원인이나 담당 범위를 좁혀 갈 때

Most lockups can be narrowed down to the right team in fifteen minutes if you know where to look in the dump.

응용 연습
The regression has been narrowed down to three commits.

on their own

스스로, 혼자서 · 다른 도움 없이 할 수 있음을 말할 때

Our goal today is that by the end of this hour, everyone here can at least do that first triage step on their own.

응용 연습
New team members should be able to flash a device on their own.

keeping score

(누가 잘못했는지) 점수를 매기는 · 비난하려는 게 아님을 가볍게 강조할 때

It's not, but don't worry, we're not keeping score.

응용 연습
We're not keeping score; we just want the bug fixed.

define our terms

용어를 정의하다 · 논의 전에 용어의 의미를 통일할 때

Let's define our terms, because people use 'hang' to mean five different things.

응용 연습
Before we compare numbers, let's define our terms for crash rate.

the messenger, not necessarily the culprit

범인이 아니라 소식을 전하는 쪽 · 문제를 감지한 구성 요소가 원인은 아닐 수 있다고 설명할 때

The framework is the messenger, not necessarily the culprit.

응용 연습
The watchdog is the messenger, not necessarily the culprit.

a common confusion

흔히 헷갈리는 부분 · 자주 오해되는 개념을 설명하기 전에

Good question, and it's a common confusion.

응용 연습
It's a common confusion, but SELinux denials don't always cause crashes.

make this concrete

구체적으로 설명하다 · 추상적인 설명을 실제 사례로 보여 줄 때

Let me make this concrete with a real case from Orion last spring.

응용 연습
Let me make this concrete with last week's boot failure.

had done nothing wrong

잘못한 게 없었다 · 오해받은 팀의 책임이 없음을 분명히 할 때

The display team had done nothing wrong.

응용 연습
It turned out the vendor had done nothing wrong; our config was outdated.

argue about it in public

공개적으로 논쟁하다 · 의견 차이를 건강한 토론으로 다루자고 제안할 때

Yuna and I disagree on whether it should be on for user builds, and we thought it would be fun to argue about it in public.

응용 연습
Let's argue about it in public so everyone hears both sides.

a red flag

위험 신호 · 논리나 상황에서 문제가 될 만한 점을 지적할 때

Isn't that last point a bit of a red flag, though?

응용 연습
A test that never fails is a bit of a red flag.

I'll take that back

그 말은 철회하겠다 · 자신의 발언이 잘못됐음을 인정할 때

Fair challenge, and I'll take that back.

응용 연습
I said it was a hardware issue, but I'll take that back.

limping along

절뚝거리며 버티는, 불완전하게 겨우 동작하는 · 시스템이 비정상 상태로 간신히 동작하는 모습을 표현할 때

A clean reboot is sometimes kinder than limping along.

응용 연습
The build server has been limping along since the disk filled up.

out of the box

기본 기능으로, 별도 수정 없이 · 추가 작업 없이 지원되는지 확인할 때

We'd need to check whether the kernel supports that kind of escalation out of the box, or whether we'd have to carry a patch.

응용 연습
Does the tracing tool support this kernel version out of the box?

based on data

데이터에 근거해 · 주장이 아닌 데이터로 결정하자고 할 때

We could enable it on the internal dogfood population first, compare the reboot rate and the number of useful dumps for a month, and then decide based on data rather than on who argued more convincingly today.

응용 연습
Let's decide the timeout value based on data from the lab.

it's worth it

그만한 가치가 있다 · 작은 효과라도 노력할 가치가 있다고 말할 때

If it saves even one wrong assignment a week, it's worth it.

응용 연습
It takes an extra day, but it's worth it.