Questions tagged [panic]

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

A condition of the the operating system when its state is so broken that imminent shutdown is preferred. This may be caused by hardware failure but is also frequently caused by various kernel bugs, driver bugs, misconfigurations and attempts to use incompatible modules.

It often would be possible to continue the work of the operating system in this condition but this could result the data loss. Hence the shutdown is preferred.

279 questions
3
votes
3 answers

With recursive functions in Go, if the inner function returns, does the outer function continue execution normally?

Okay, so I have this piece of code func registerDomain(domainName string, n int) bool { //building the request here resp, errr := client.Do(r) if errr != nil { if n == 1 { return false } …
Misa Misa
  • 41
  • 5
3
votes
1 answer

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 to the underlying map. I did verify that it…
user2127434
3
votes
2 answers

ERROR:SQLSTATE[42000]: Syntax error or access violation: 1064

I was looking for answer for last 3 hours, and i don't know what to do. Here is the code: function get_data($tablename) { try { $conn = $this->conn(); $stmt = $conn->prepare("SELECT * FROM :tablename…
SpaceBuzz
  • 75
  • 1
  • 2
  • 6
3
votes
3 answers

Which one is better for me to use: "defer-panic-recover" or checking "if err != nil { //dosomething}" in golang?

I've made a large program that opens and closes files and databases, perform writes and reads on them etc among other things. Since there no such thing as "exception handling in go", and since I didn't really know about "defer" statement and…
pymd
  • 4,021
  • 6
  • 26
  • 27
2
votes
0 answers

Override Panic Handler of Rust std

I'm currently experimenting with writing a kernel in Rust. I've just found out the by using [unstable] build-std = ["core", "std", "panic_abort"] I can build the standard library from source and then use it. Obviously many of the features won't be…
Gian Laager
  • 474
  • 4
  • 14
2
votes
1 answer

Python indentation issues using panic CODA

Any one else getting lots of indentation syntax errors when writing python in panics coda IDE? Ive been getting a lot of these, and just shuffling my code around seems gets rid of the error. Bug?
nicksweet
  • 3,929
  • 1
  • 20
  • 22
2
votes
1 answer

Continue execution after recovered panic without knowing which function might panic

I was referred to this question: Program recovered from panic does not exit as expected It works fine but it relies on knowing where the panic occurs in order to place the deferred function. My code is as follows. package main import "fmt" func…
pigfox
  • 1,301
  • 3
  • 28
  • 52
2
votes
1 answer

Why am I getting a panic with Perl 5.10, Mason, and Apache?

I'm developing an application using Perl 5.10, HTML::Mason, and apache 2.2. This is the first time I've used Perl 5.10 for a big project. I get a strange behavior every once in a while. The application dies with a very strange error: panic: attempt…
marghi
  • 233
  • 1
  • 9
2
votes
3 answers

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:", err) } } func foo() (result int, err error) { defer func() { …
karsur
  • 65
  • 1
  • 7
2
votes
1 answer

Rust Embedded panic destroys stack

I'm using Rust on a Cortex-M4 and using gdb with openocd to debug it. From C(++) I'm used to looking at the call stack when an exception (like a hardfault) happens. It's really helpful to see which line caused the exception. However, in Rust, when a…
Geoxion
  • 448
  • 1
  • 4
  • 14
2
votes
1 answer

Rust panic unit test - specifics of matching the error message

I'm looking for a way to assert that a piece of code panics, and that the panic message contains a particular string. I came up with the following which appears to work: let actual = std::panic::catch_unwind(||…
goofballLogic
  • 37,883
  • 8
  • 44
  • 62
2
votes
1 answer

Backtrace while Kernel Panic

Is it possible to get backtrace of kext without attaching with gdb as described at http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/KEXTConcept/KEXTConceptDebugger/debug_tutorial.html if I have the panic log? Somehow like…
user663896
2
votes
4 answers

How to find the cause for a USER 44 PANIC?

One of the products we develop is a phone app for nokia phones done in C++ and Symbian, we started getting "random" crashes a while a ago with a USER 44 panic. I am pretty new to the symbian environment so I am looking for tools and recommendations…
webclimber
  • 2,630
  • 4
  • 26
  • 36
2
votes
1 answer

Android: boot loop kernel panic in meminfo_proc_show() 3.10.65+ trying to do a LOS12.1 port

I am trying to port the current ASB-patched LOS12.1 (github "cm12-amami") to a Teclast 98 (M1E9) tablet for which kernel sources are missing. My build completes fine, however, I run into a boot loop due to kernel panic with an (at least for me)…
awl1
  • 21
  • 3
2
votes
0 answers

How to analyze and debug a Linux kernel panic which occurs while running an application?

I'm getting kernel panics while running linux application on my custom hardware design. But another custom hardware which is similar to this can run this linux application without any problem. I did the memory calibration and stress app test for…