Questions tagged [panic]

A condition of the the operating system when its state is so broken that imminent shutdown is preferred.

panic
Filter by
Sorted by
Tagged with
15 votes
8 answers
43k views

Android/Eclipse PANIC: Could not open

I'm brand new to Android development and Eclipse so I have just set it all up and I am attempting the Hello World tutorial. Sadly when I try and run the program I get the following error: PANIC: ...
Kingteeb's user avatar
  • 243
32 votes
5 answers
102k views

Android: How to get kernel logs after kernel panic?

I am using an Android Custom ROM on my device, also with a custom boot.img (custom kernel + cmdline + ramdisk). I now want to be able to view the kernel logs immediately after a kernel panic, but ...
mreichelt's user avatar
  • 12.4k
24 votes
5 answers
20k views

Capturing panic() in golang

We have a large-ish golang application that uses the logger (actually, a custom logger), to write output to a log file that is periodically rotated. However, when an application crashes or panic()'s, ...
David Frascone's user avatar
9 votes
2 answers
9k views

How to recover from concurrent map writes?

How do you recover from a runtime panic on a "concurrent map read and map write"? The usual defer with recover doesn't seem to work. Why is that? I know that you are not supposed to use maps in ...
Igor Lankin's user avatar
  • 1,436
5 votes
1 answer
3k views

Generic panic recovering in go programs

I’m trying to catch crashes/panics from go routines that are created in my program, in order to send them to my crash-error-reporting server (such as Sentry/Raygun) For example, func main() { ...
Or Nahum's user avatar
  • 173
56 votes
3 answers
96k views

How to read, understand, analyze, and debug a Linux kernel panic?

Consider the following Linux kernel dump stack trace; e.g., you can trigger a panic from the kernel source code by calling panic("debugging a Linux kernel panic");: [<001360ac>] (...
0x90's user avatar
  • 40.5k
43 votes
8 answers
549k views

How to solve "Kernel panic - not syncing - Attempted to kill init" -- without erasing any user data [closed]

I was trying to update libc in our Ubuntu server but it failed and now when I reboot the server I get a error message: Kernel panic - not syncing - Attempted to kill init! and it just hangs. ...
Slayer's user avatar
  • 2,441
35 votes
1 answer
13k views

What is the meaning of question marks '?' in Linux kernel panic call traces?

The Call Trace contains entries like that: [<deadbeef>] FunctionName+0xAB/0xCD [module_name] [<f00fface>] ? AnotherFunctionName+0x12/0x40 [module_name] [<deaffeed>] ...
qdot's user avatar
  • 6,265
21 votes
2 answers
2k views

What is the point of diverging functions in Rust?

I have read several answers on SO already, and gathered these use-cases: When a function panic!s When a function has an infinite loop in it But it is still unclear to me why we need to define the ...
Oleksandr Novik's user avatar
2 votes
3 answers
1k views

Why does go panic recover to return value with local variable not work?

This panic recover code works with named return values. func main() { result, err := foo() fmt.Println("result:", result) if err != nil { fmt.Println("err:", ...
karsur's user avatar
  • 65
80 votes
3 answers
53k views

How to get the stacktrace of a panic (and store as a variable)

As we all know, panics produce a stacktrace to stdout (Playground link).: panic: runtime error: index out of range goroutine 1 [running]: main.main() /tmp/sandbox579134920/main.go:9 +0x20 And it ...
hlin117's user avatar
  • 21.6k
59 votes
3 answers
46k views

Go: returning from defer

I want to return an error from a function if it panics (in Go): func getReport(filename string) (rep report, err error) { rep.data = make(map[string]float64) defer func() { if r := ...
jrichner's user avatar
  • 709
21 votes
2 answers
32k views

Handling panics in go routines

I understand that to handle panic recover is used. But the following block fails to recover when panic arises in go routine func main() { done := make(chan int64) defer fmt.Println("Graceful ...
Mohit Jain's user avatar
21 votes
1 answer
6k views

Visual Studio Code Order In AutoCompletion [duplicate]

I recently switched to Visual Studio Code and I love it! It starts so quickly andI just enjoy the open source environment more than Visual Studio. But there's one problem that I have encountered that ...
Oliver Levay's user avatar
16 votes
4 answers
37k views

"Starting emulator for AVD" then Panic: could not open..."

I'm new to android app dev. When I created a new AVD, when I click start on this AVD: I get the following: Starting emulator for AVD 'Nexus_4_16_AVD' PANIC: Could not open: Nexus_4_16_AVD
jerryh91's user avatar
  • 1,795
16 votes
3 answers
16k views

Golang panic crash prevention

In Golang a panic without a recover will crash the process, so I end up putting the following code snippet at the beginning of every function: defer func() { if err := recover(); err != nil { ...
user avatar
16 votes
1 answer
20k views

runtime: goroutine stack exceeds 1000000000-byte limit, fatal error: stack overflow on printing a nested struct

I have a nested struct. type ConfigOne struct { // Daemon section from config file. Daemon daemon } type daemon struct { Loglevel int Logfile string } And I have a String() string ...
nohup's user avatar
  • 3,135
8 votes
2 answers
5k views

How does a caller function to recover from child goroutine's panics

I used to think the panic in a goroutine will kill the program if its caller finishes before the panic (the deferred recovering gives no help since at that point there's no panic occurs yet), until I ...
Dave Wu's user avatar
  • 155
2 votes
0 answers
231 views

Multiple kernel modules intercepting same system call and crash during unload

I'm working on system call interception (for open() system call) and I got one problem: I have two kernel modules (mod1 and mod2) and both of them are trying to intercept open() syscall. I've loaded ...
Ajk's user avatar
  • 31
-1 votes
1 answer
359 views

defer func not recover

So, I've been fiddling around with go, and I found that function below recover successfully package main import ( "fmt" ) func a() { defer func(){ if r := recover(); r != nil { ...
GroniumArgor's user avatar
-1 votes
1 answer
97 views

How to known a function of a interface is not realized? [duplicate]

I just tried the following code in Go. package main type inter interface { aaa() int } type impl struct { inter } func main() { var a inter a = impl{} // how to check the ...
lzmhhh123's user avatar
13 votes
3 answers
7k views

Retrieving backtrace from a panic in hook in Rust?

My application needs to send logs to fluentd as JSON format through stdout. While I'm trying to handle panics and arrange a &std::panic::PanicInfo as a JSON with std::panic::set_hook, I could not ...
KUNIMI Taiyoh's user avatar
11 votes
1 answer
14k views

What is RUST_BACKTRACE supposed to tell me?

My program is panicking so I followed its advice to run RUST_BACKTRACE=1 and I get this (just a little snippet). 1: 0x800c05b5 - std::sys::imp::backtrace::tracing::imp::write::hf33ae72d0baa11ed ...
boss revs's user avatar
  • 351
10 votes
1 answer
10k views

does kernel's panic() function completely freezes every other process?

I would like to be confirmed that kernel's panic() function and the others like kernel_halt() and machine_halt(), once triggered, guarantee complete freezing of the machine. So, are all the kernel ...
user1284631's user avatar
  • 4,526
6 votes
1 answer
3k views

How to get panic information (i.e. stack trace) with `catch_unwind`?

If using set_hook, we can get lots of information, especially the stack trace - which is very helpful. However, with catch_unwind, I only get a Result which contains almost no useful information at ...
ch271828n's user avatar
  • 16.9k
5 votes
2 answers
2k views

Redirect panics to a specified buffer

Is there any way to do this? In a terminal graphics library, if an exception occurs, the exception will be flushed away before being displayed, making programming very hard to debug using this library....
Syntactic Fructose's user avatar
5 votes
3 answers
1k views

How can I silently catch panics in QuickCheck tests?

In the tests of my overflower_support crate, I have found that I get a lot of spurious reports of panics which are already handled using std::panic::catch_unwind(_). This is a bit unfortunate, as it ...
llogiq's user avatar
  • 14.3k
4 votes
2 answers
2k views

How to get a Linux panic output to a USB serial console when system has also a display adapter

I am having troubles with a Linux kernel panic which I need to investigate further. When it happens, the kernel panic output always goes to the display adapter only and is shown on the monitor. I need ...
Franz's user avatar
  • 41
3 votes
1 answer
1k views

How can one implement a thread-safe wrapper to maps in Go by locking?

I'm trying to wrap a general map (with interface{} as both key and value) as in-memory key-value store that I named MemStore. But it is not thread-safe, despite my use of a sync.RWMutex to lock access ...
user avatar
2 votes
2 answers
1k views

Debugging panics in Symbian OS using Carbide.c++

Is there a way to drop into the debugger when any panic occurs like if there were a breakpoint? I'm using Carbide.c++ 2.3.0. I know about the Debug Configurations > x86 Exceptions, but it covers ...
SnakE's user avatar
  • 2,461
2 votes
2 answers
2k views

What do these Linux Kernel Oops fields mean?

I have already encountered some Oops in my developer's life and whereas I am familiar with some information that I can retrieve from these Oops, there are still pieces of information I can't ...
Rerito's user avatar
  • 6,066
1 vote
2 answers
1k views

Kernel panic using deferred_io on kmalloced buffer

I'm writing a framebuffer for an SPI LCD display on ARM. Before I complete that, I've written a memory only driver and trialled it under Ubuntu (Intel, Virtualbox). The driver works fine - I've ...
carveone's user avatar
  • 899
1 vote
1 answer
1k views

alloc: invalid block - Are Tcl_IncrRefCount and Tcl_DecrRefCount thread safe for threaded Tcl / 1 interp per thread?

Our 32-bit server application statically embeds tcl 8.4.11. On Red Hat Linux 6.5 64-bit we're encountering crashes / core dumps. The failure looks like: alloc: invalid block: 0xf6f00f58: 88 f6 0 At ...
buzz3791's user avatar
  • 1,735
1 vote
1 answer
871 views

Mocking variadic functions in Google Test and Google Mock

I'm new to Google test and I'm trying to write a unit test for a function that returns void and takes no arguments but the function has an if condition which checks on structure values, and I need to ...
Kasko's user avatar
  • 19
1 vote
1 answer
538 views

Why is eBPF said to be safer than LKM?

when talking about ebpf advantage, it always mentions safe than lkm. I read some documentation, ebpf ensures safe by verifying code before it loaded. these are checklists that verify to do: loops out ...
cxiang's user avatar
  • 23
0 votes
1 answer
1k views

PANIC: unprotected error in call to Lua API (wificonfig.lua:33: address in use)

I'm trying to create a local http server on ESP8266 with lua using NodeMCU custom build by frightanic.com. When i create a local http server along with a connection that is already listening on port ...
aditgupta100's user avatar