Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634492 - sys-devel/gdb-7.12.1 fails assertion while debugging
Summary: sys-devel/gdb-7.12.1 fails assertion while debugging
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-16 21:57 UTC by Jon Phillips
Modified: 2017-10-19 08:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Phillips 2017-10-16 21:57:11 UTC
When using gdb-7.12.1 to debug some software written in fortran, I got the following error:



(gdb) rwatch topology%atom_info%r
value.c:3204: internal-error: value* value_primitive_field(value*, LONGEST, int, type*): Assertion `PROP_CONST == TYPE_DATA_LOCATION_KIND (type)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y

This is a bug, please report it.  For instructions, see:
<https://bugs.gentoo.org/>.

value.c:3204: internal-error: value* value_primitive_field(value*, LONGEST, int, type*): Assertion `PROP_CONST == TYPE_DATA_LOCATION_KIND (type)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
Aborted (core dumped)



The full text output of gdb is here:
 https://drive.google.com/open?id=0B3VR0T4Oz6p7N2sxVTFKeldGdGs

'emerge --info gdb' is here: https://drive.google.com/file/d/0B3VR0T4Oz6p7N2sxVTFKeldGdGs/view?usp=sharing

The software is CP2K version 4.1, with a few lines of code changed by me (I'm trying to understand how the thing works).  CP2K is hosted here: https://www.cp2k.org/ and I've put a tarball containing my edited version further on in this report.

If the core file would be helpful, let me know.  It’s 30 MB and I should stop hogging the internet.  I can upload it tomorrow.

I tried this twice and the problem repeated, recompiled cp2k and it didn't go away.  Unfortunately, I don't know any minimalist way of replicating this error.  I'm including instructions for compilation of the software that I was running (as best I can), but that includes installing a number of packages from the science overlay.  My apologies for the amount of faff involved.

To replicate:

1. I'm running on an x86_64 system, with the following libraries from the science overlay which you will need (I don’t know how important the USE flags are):

sci-libs/cblas-reference-20030223-r6 (no USE flags)
sci-libs/libxc-3.0.0 (fortran SET, static-libs and test UNSET).  
You also need: 
sci-libs/fftw.  I have 3.3.6-p2 with the following flags.
	SET: cpu_flags_x86_avx, cpu_flags_x86_avx2, cpu_flags_x86_fma3, cpu_flags_x86_sse, cpu_flags_x86_sse2, fortran, openmp.
	UNSET: abi_x86_32, cpu_flags_x86_fma4, doc, 
	UNSET: mpi, quad, static-libs, test, threads
sci-libs/libint-1.1.6 (static-libs UNSET)
As well as python (I have 2.7.12, with gdbm, ipv6, ncurses, readline, sqlite, ssl, tk, xml all SET)
Gcc (I have 5.4.0-r3, with cxx, fortran, nls, nptl, openmp, sanitize and vtv all SET)

I believe that’s it.

2. Download this tarball, which contains cp2k with my edits.  Be warned, it’s ~60 MB.
https://drive.google.com/open?id=0B3VR0T4Oz6p7R2JVRG8xek9CeU0

3. Extract it, go to the makefile directory, run ‘make -j 4 ARCH=Linux-x86-64-gfortran_debug VERSION=sopt’ and cross your fingers.
    If that doesn’t work, there could be a package I forgot, or if you’re using a different system (I imagine you’re not), you may need to edit a file in the arch directory.  I’m using ‘Linux-x86-64-gfortran_debug.sopt’ which is I made myself, the only other one I’ve edited is ‘Linux-x86-64-gfortran.sopt’. There’s an INSTALL file to read if you want/need to.  I struggled to make it the first time, so I could have forgotten something in this description (hopefully not).  

4. Download this (~90 kB) tarball, containing the input parameters and suchlike.
https://drive.google.com/open?id=0B3VR0T4Oz6p7LUJVbHhIV3ZmeFE

5. Set $CP2K to 
	SOURCE_DIR/cp2k-4.1_edit/exe/Linux-x86-64-gfortran_debug/
and run ‘gdb $CP2K/cp2k.sopt’ in the cp2k_gdb_debug directory.

6.  Run the following commands:

	break topology.F:570
	run first.inp
	rwatch topology%atom_info%r

7. You should see the error (I hope).
Comment 1 Jonas Stein gentoo-dev 2017-10-19 08:14:34 UTC
In general: the drive.google.com links do not work here. Please attach all small files. 

It is sad to read that you have problems with the software. The situation seems to be a bit more complicate and requires some analysis.
We can not help you efficiently via bug tracker. The bug tracker aims rather on specific problems in .ebuilds and less on individual systems. 

I have had very good experience on the gentoo IRC [1] with questions like this. Of course there are also forums and mailing lists [2,3].
I hope you understand, that I will close the bug here therefore and wish you good luck on one of the mentioned channels [4].
Please reopen the ticket in order to provide an indication for an specific error in an ebuild or any gentoo related product.

[1] https://www.gentoo.org/get-involved/irc-channels/
[2] https://forums.gentoo.org/
[3] https://www.gentoo.org/get-involved/mailing-lists/all-lists.html
[4] https://www.gentoo.org/support/