Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

abort() hanging indefinitely

Tags:

c++

g++

The code (my original code used assert, but this is an even shorter sscce)

#include <cstdlib>

int main() {
    abort();
    return 0;
}

Compiler version:

$ g++ --version
g++ (GCC) 4.8.0
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled with:

$ g++ test.cpp -o test

Runtime:

$ ./test

Hangs indefinitely. Checking top I notice abrt-hook-ccpp (as root) taking a whole CPU (pegged at 75%, with ./test taking 25%).

Other notes: this behaviour appears to be flaky, happening only about 80% of the time. I tried at each level of optimization (O0 through O4) and had no differences.

Additionally I cannot reproduce this behaviour on my local machine (g++ 4.8.1)

like image 927
Anthony Sottile Avatar asked Feb 03 '26 03:02

Anthony Sottile


1 Answers

It's probably a bug in Redhat's Automatic Bug Reporting Tool. Try disabling the ABRT service and see if it works.

You can either disable abrt-ccpp:

# chkconfig abrt-ccpp off
# service abrt-ccpp stop

Or the whole service:

# chkconfig abrtd off
# service abrtd stop
like image 137
Soheil Hassas Yeganeh Avatar answered Feb 05 '26 20:02

Soheil Hassas Yeganeh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!