panic

Kernel panic using deferred_io on kmalloced buffer

这一生的挚爱 提交于 2019-12-23 04:04:45
问题 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 allocated a block of memory using kmalloc, page aligned it (it's page aligned anyway actually), and used the framebuffer system to create a /dev/fb1. I have my own mmap function if that's relevant (deferred_io ignores it and uses its own by the look of it). I have set: info->screen_base = (u8 __iomem *

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

a 夏天 提交于 2019-12-22 11:27:38
问题 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 to the underlying map. I did verify that it works fine when used from a single goroutine. However, just two concurrent goroutines accessing it results in panic: runtime error: invalid memory address or nil pointer dereference . What is causing this problem, and what is the proper way to achieve

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

混江龙づ霸主 提交于 2019-12-20 21:22:22
问题 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 and user processes frozen? Is panic() interruptible by the scheduler? The interrupt handlers could still be executed? Use case: in case of serious error, I need to be sure that the hardware watchdog resets the machine. To this end, I need to make sure that no other thread/process is keeping the

Multiple kernel modules intercepting same system call and crash during unload

北慕城南 提交于 2019-12-20 02:58:27
问题 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 mod1 first and then mod2 . The mod1 intercepted open() by: original_open1 = sys_call_table[__NR_open]; sys_call_table[__NR_open] = mod1_open; Here original_open1 would be sys_open . After this, mod2 intercepted open() by: original_open2 = sys_call_table[__NR_open]; sys_call_table[__NR_open] =

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

送分小仙女□ 提交于 2019-12-18 10:35:32
问题 The Call Trace contains entries like that: [<deadbeef>] FunctionName+0xAB/0xCD [module_name] [<f00fface>] ? AnotherFunctionName+0x12/0x40 [module_name] [<deaffeed>] ClearFunctionName+0x88/0x88 [module_name] What is the meaning of the '?' mark before AnotherFunctionName? 回答1: '?' means that the information about this stack entry is probably not reliable. The stack output mechanism (see the implementation of dump_trace() function) was unable to prove that the address it has found is a valid

Android/Eclipse PANIC: Could not open

こ雲淡風輕ζ 提交于 2019-12-17 08:59:20
问题 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: Could not open: C:\Users\Nathan Smith.android/avd/Droid_4.0.3.ini I have heard that you should avoid spaces in these paths. Is the space in the name where the problem is? If so how do I go about changing it? If anyone could help me out with this that would be grand. By the way I also noticed that my

防止goroutine崩溃同时也导致主进程崩溃

点点圈 提交于 2019-12-13 10:35:58
举个例子 比如这种情况 主进程会直接崩溃 看不到这个ok的打印 package main import ( "log" "time" ) func Panic() { panic(1) } func main() { go Panic() time.Sleep(1 * time.Second) log.Println("OK") } 这时使用这个函数 在panic之后主进程就不会崩溃了 可以看到这个ok打印出来 func NewRoutine(f func()) { go func() { defer func() { // Recover from panic. if err := recover(); err != nil { stack := string(debug.Stack()) log.Println(err) log.Println(stack) } }() f() }() } func Panic() { panic(1) } func main() { NewRoutine(Panic) time.Sleep(1 * time.Second) log.Println("OK") }    因为这个函数里使用了recover 可以使panic的函数不会立刻返回 而是先defer 再返回 这样就避免了主进程崩溃的情况 来源: https://www.cnblogs

Handling panics in go routines

一曲冷凌霜 提交于 2019-12-12 06:48:58
问题 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 End of program") defer func() { r := recover() if _, ok := r.(error); ok { fmt.Println("Recovered") } }() go handle(done) for { select{ case <- done: return } } } func handle(done chan int64) { var a *int64 a = nil fmt.Println(*a) done <- *a } However following block is able to execute as expected func

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

China☆狼群 提交于 2019-12-12 01:52:21
问题 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 80 and fetching data from my server site, it is giving me PANIC error. Here's my code : wifi.setmode(wifi.STATION) wifi.sta.config("SSID","password") wifi.sta.connect() tmr.alarm(1,10000, 1, function() if (wifi.sta.getip() == nil) then print("IP unavaiable, Waiting...") else foo() local_server()

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

回眸只為那壹抹淺笑 提交于 2019-12-11 12:08:10
问题 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 the bottom of the question, I've documented two different core dumps we've seen. We've isolated a potential root cause to a TCL object shared between two threads concurrently running separate TCL interpreter instances. We think it's because TCL object is passed to Tcl_IncrRefCount / Tcl_DecrRefCount