Home > OS >  For Ubuntu application core dumped the reason analysis
For Ubuntu application core dumped the reason analysis

Time:09-30

Recently doing a Linux c/c + + application development project, the project team members in local development using the ubuntu vm, finally to put the code in a PC running on ubuntu, I on the virtual machine debugging code is normal, but got the final run on a PC, compile and run it happened core dumped, virtual machine and the PC version of ubuntu and GCC has difference,


Virtual machine system and GCC version:
Root @ ubuntu:/home/cedric# uname -a
Linux ubuntu 3.13.0-149 - generic # 199 - ubuntu SMP Thu May 17 10:12:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Root @ ubuntu:/home/cedric# GCC -v
Using the built - in other words, specs.
COLLECT_GCC=GCC
COLLECT_LTO_WRAPPER=/usr/lib/GCC/x86_64 - - the gnu/Linux 4.8/lto - wrapper
Target: x86_64 - Linux - gnu
Configured with:../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.4' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
The Thread model: posix
GCC version 4.8.4 (Ubuntu 4.8.4-2 ubuntu1 ~ 14.04.4)


PC system and GCC version:
Root @ # uname -a
Linux System - the Product - the Name 5.0.0-32 - generic # 34 ~ 18.04.2 - Ubuntu SMP Thu Oct 10 10:36:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Root @ System - Product Name:/home/temp# GCC -v
Using the built - in other words, specs.
COLLECT_GCC=GCC
COLLECT_LTO_WRAPPER=/usr/lib/GCC/x86_64-7 - the gnu/Linux/lto - wrapper
OFFLOAD_TARGET_NAMES=NVPTX - none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64 - Linux - gnu
Configured with:../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
The Thread model: posix
GCC version 7.4.0 (Ubuntu ubuntu1 ~ 18.04.1 7.4.0-1)


On the Internet to find a use GDB analysis core dumped file method, but the printed information and the program itself is not seem to have too big relationship, help you a great god to refers to the way
Root# GDB unknown core
The GNU GDB (Ubuntu 8.1-0 ubuntu3. 1) 8.1.0.20180409 - git
Copyright (C) 2018 Free Software Foundation, Inc.,
License GPL + : the GNU GPL version 3 or later & lt; http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO giant, to the among permitted by law. The Type "show copying"
And "show giant" for details.
This GDB was configured as "x86_64 - Linux - gnu".
Type "show the configuration for the configuration details.
For bug reporting instructions, both please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from unknown... (no was debugging symbols found)... Done.
[6743] New LWP
[Thread was debugging using libthread_db enabled]
Using the host libthread_db library "- the gnu/Linux/lib/x86_64 - libthread_db. So. 1".
The Core was generated by `./unknown '.
The Program terminated with signal SIGFPE, Arithmetic exception.
# 0 0 x00007fc18557754d in _dl_try_allocate_static_tls (map=0 x7fc185794170)
The at dl - reloc. C: 69
Dl - 69 reloc. C: No to the file or directory.
(GDB)

  • Related