Simultaneous interruption () in two threads

I have a return line with something that I have not seen before. See Frame 2 in these threads:

Thread 31 (process 8752): #0 0x00faa410 in __kernel_vsyscall () #1 0x00b0b139 in sigprocmask () from /lib/libc.so.6 #2 0x00b0c7a2 in abort () from /lib/libc.so.6 #3 0x00752aa0 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.6 #4 0x00750505 in ?? () from /usr/lib/libstdc++.so.6 #5 0x00750542 in std::terminate () from /usr/lib/libstdc++.so.6 #6 0x00750c65 in __cxa_pure_virtual () from /usr/lib/libstdc++.so.6 #7 0x00299c63 in ApplicationFunction() Thread 1 (process 8749): #0 0x00faa410 in __kernel_vsyscall () #1 0x00b0ad80 in raise () from /lib/libc.so.6 #2 0x00b0c691 in abort () from /lib/libc.so.6 #3 0x00b4324b in __libc_message () from /lib/libc.so.6 #4 0x00b495b6 in malloc_consolidate () from /lib/libc.so.6 #5 0x00b4b3bd in _int_malloc () from /lib/libc.so.6 #6 0x00b4d3ab in malloc () from /lib/libc.so.6 #7 0x08147f03 in AnotherApplicationFunction () 

Opening it with gdb and getting the backtrace, it gives me stream 1. Later I saw a strange state in which stream 31 is located. This stream is from the library with which we had problems, so I believe that it caused an accident.

So what does this mean? Do two threads simultaneously do something illegal? Or is it one of them, causing somehow interrupt () in another?

OS is Linux Red Hat Enterprise 5.3, it is a multiprocessor server.

+7
source share
3 answers

It looks like it could be heap corruption detected by malloc in thread 1, caused or caused by an error in thread 31.

Some broken code rewriting ao vtable in thread 31 can easily cause this.

+3
source

It's hard to be sure, but my first suspicion when looking at these stack stacks would be memory corruption (possibly a buffer overflow on the heap). If so, then corruption is probably the main cause of both flows ending in abort .

Can you valgrind your application?

+4
source

Perhaps the reason that thread 31 is interrupted is because it somehow crashed a bunch of applications. Then, when the main thread tried to allocate memory, the heap data structure was in a bad state, as a result of which the allocation was interrupted and again interrupted the application.

+3
source

All Articles