Showing posts with label crash. Show all posts
Showing posts with label crash. Show all posts

Wednesday, May 5, 2021

Linux: What is function cloning? Name.clone.XX seen in crash or symbols?

 Excerpt from an online post:

In the case of the gcc compiler, it make a copy of a function with some modifications for faster execution.For example, if the compiler discovers that a function is called many different times with the same couple of initial parameters, then it may clone the function to produce a version which takes fewer parameters, and then change all the invoking functions to call the cloned function named as fn-name.clone instead.

Also found this from another post:
"Another example is that a compiler may make several clones of a function and compile them tuned for different microarchitectures, and then arrange for the appropriate one to be used at runtime based on some sort of CPU test."


Wednesday, June 3, 2020

Linux: Kernel crash debugging: BUG: scheduling while atomic

Why do you see that print
"Scheduling while atomic" indicates that you've tried to sleep somewhere that you shouldn't - like within a spinlock-protected critical section or an interrupt handler.

Things to check:

1. In this case you should check if you are actually returning from some code that could cause the lock not to be released or actually sleeping in some part of the code.

2. Another error that may be spitted out during such a crash is :
BUG: workqueue leaked lock or atomic
This clearly indicates that you were not unlocking a certain lock, which could be typically caused by returning from a routine before the lock is released.

Wednesday, October 23, 2019

Linux: Easy solution vim caught deadly signal segv vim preserving files vim finished

Ran into this irritating problem when everything was initially working fine on my system.

I had copy pasted something into the command window by mistake which caused vi to crash and keep spitting this out. I am using a Fedora version.

Thing that I tried which did not work:
1. Rebooting
2. Uninstalling and reinstalling vi

Solution: Under your home directory there is a file .viminfo which contains all the cached vi information. Delete this file. It will get recreated afresh the  next time vi starts. Just deleting this file fixed the problem for me.

Tuesday, June 18, 2019

Linux: Sleeping while atomic during kmalloc solved

So you ran into a crash where the kernel complains that you were sleeping while atomic.
You were either able to run objdump or gdb and track down that the crash is caused due
to a kmalloc? How is that possible?
Did you make recent changes which included putting in a kmalloc?