Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583408 - possible bug in gcc or glibc, cross-reference to #579580
Summary: possible bug in gcc or glibc, cross-reference to #579580
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: ng0
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 579580
  Show dependency tree
 
Reported: 2016-05-18 14:33 UTC by ng0
Modified: 2016-05-24 22:02 UTC (History)
2 users (show)

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


Attachments
emerge --info + bash history (testvm-gcc-vanilla__history.txt,16.01 KB, text/plain)
2016-05-18 14:33 UTC, ng0
Details
gnunet-gtk config.log (testvm-gcc-vanilla__gnunet-gtk.config.log.txt,90.11 KB, text/plain)
2016-05-18 14:33 UTC, ng0
Details
gnunet-gtk build.log (testvm-gcc-vanilla__gnunet-gtk.build.log.txt,402.96 KB, text/plain)
2016-05-18 14:34 UTC, ng0
Details
gnunet config.log (testvm-gcc-vanilla__gnunet-config.log.txt,327.27 KB, text/plain)
2016-05-18 14:34 UTC, ng0
Details
gnunet build.log (testvm-gcc-vanilla__gnunet-build.log.txt,781.35 KB, text/plain)
2016-05-18 14:35 UTC, ng0
Details
valgring + gdb on gnunet-gtk (testvm-gcc-vanilla__dbg+valgrind.txt,12.64 KB, text/plain)
2016-05-18 14:35 UTC, ng0
Details
egrep -nr "strdup" (gnunet-debg.txt,81.12 KB, text/plain)
2016-05-23 16:43 UTC, ng0
Details
gdb gnunet-gtk (after patch) (gdb-gnunetgtk-patched,8.29 KB, text/plain)
2016-05-23 18:28 UTC, ng0
Details
valgrind gnunet-gtk (after patch) (valgrind-gnunetgtk-patched,1.27 KB, text/plain)
2016-05-23 18:29 UTC, ng0
Details
build log (gnunet-gtk) (build.log,360.03 KB, text/x-log)
2016-05-24 13:58 UTC, ng0
Details
config.log (gnunet-gtk) (config.log,90.13 KB, text/x-log)
2016-05-24 13:59 UTC, ng0
Details
environment (environment,112.87 KB, text/plain)
2016-05-24 14:00 UTC, ng0
Details
gdb gnunet-gtk (updated patch) (gdb.txt,2.71 KB, text/plain)
2016-05-24 14:08 UTC, ng0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ng0 2016-05-18 14:33:16 UTC
Created attachment 434610 [details]
emerge --info + bash history

While working on bug #579580 I ran into a problem which is very likely either gnunet-gtk or gentoo gcc or glibc caused.

The attached logs and outputs describe all data I have gathered in the test VM, if something is missing I can provide it later on.

(Cross reference: https://bugs.gentoo.org/show_bug.cgi?id=579580)
Comment 1 ng0 2016-05-18 14:33:55 UTC
Created attachment 434612 [details]
gnunet-gtk config.log
Comment 2 ng0 2016-05-18 14:34:25 UTC
Created attachment 434614 [details]
gnunet-gtk build.log
Comment 3 ng0 2016-05-18 14:34:54 UTC
Created attachment 434616 [details]
gnunet config.log
Comment 4 ng0 2016-05-18 14:35:22 UTC
Created attachment 434618 [details]
gnunet build.log
Comment 5 ng0 2016-05-18 14:35:47 UTC
Created attachment 434620 [details]
valgring + gdb on gnunet-gtk
Comment 6 ng0 2016-05-18 14:38:27 UTC
The 2 ebuilds I work on sit in the overlay named "testing", which can be cloned via the ways described at http://c.n0.is/. You'd furthermore need to clone the "youbroketheinternet-overlay" for the dependency "gnurl".

The VM I worked in is a vanilla gcc amd64 system.
Comment 7 SpanKY gentoo-dev 2016-05-23 16:01:39 UTC
just glancing at the logs implies it's not a toolchain problem, so you'll want to debug the app a bit more

#3  0x00007ffff7970b3a in GNUNET_xstrdup_ (str=0x0, filename=filename@entry=0x7ffff79bfc94 "program.c", 
    linenumber=linenumber@entry=224) at common_allocation.c:276

you probably shouldn't be doing strdup(NULL)
Comment 8 ng0 2016-05-23 16:14:02 UTC
Thanks for your input.
Do you mean to debug gnunet at its core, upstream, or debug the build/how it builds on Gentoo?
Comment 9 ng0 2016-05-23 16:22:21 UTC
(In reply to Nils Gillmann (ng0) from comment #8)
> Thanks for your input.
> Do you mean to debug gnunet at its core, upstream, or debug the build/how it
> builds on Gentoo?

To clarify, I'd like some explanation, as I had it working and running at some point in the git history but for what I have now (eapi6) I can't go back to there.
Comment 10 ng0 2016-05-23 16:43:50 UTC
Created attachment 435080 [details]
egrep -nr "strdup"

Output of egrep -nr "strdup" in the root of /svn/ of gnunet.

If you mean that I should patch around this: at the moment I don't have enough knowledge to do this. Sources to read up on (including similar solutions/problems) would be good if they exist, else I will search for them myself.
I see many results in my portage checkout, but if someone with more knowledge on this could give me input before I go on it would be highly appreciated.
Comment 11 ng0 2016-05-23 17:47:04 UTC
I am working on this now with upstream, trying out some solutions.
Comment 12 SpanKY gentoo-dev 2016-05-23 18:04:43 UTC
(In reply to Nils Gillmann (ng0) from comment #8)

you've got the backtrace already with gdb, so you know the exact files to look at.  if the optimization is getting in the way, try forcing -O0 to see if it's more clear how the bad call is coming about.  i would focus on that via gdb rather than worry about valgrind.
Comment 13 ng0 2016-05-23 18:28:22 UTC
Created attachment 435120 [details]
gdb gnunet-gtk (after patch)

after the patch schanzen supplied and I adjusted to Gentoo build system, the error changed.
Comment 14 ng0 2016-05-23 18:29:22 UTC
Created attachment 435122 [details]
valgrind gnunet-gtk (after patch)

same. (valgrind output because gdb was connected to valgrind)
Comment 15 SpanKY gentoo-dev 2016-05-23 19:38:57 UTC
unless you're super comfortable with valgrind, i would get it out of the equation entirely.  focus on running the program directly through gdb.
Comment 16 ng0 2016-05-24 13:58:44 UTC
Created attachment 435236 [details]
build log (gnunet-gtk)

this is the new build.log after an updated patch.
Comment 17 ng0 2016-05-24 13:59:31 UTC
Created attachment 435238 [details]
config.log (gnunet-gtk)

this is the config.log after an updated patch
Comment 18 ng0 2016-05-24 14:00:23 UTC
Created attachment 435240 [details]
environment

this is the environment file of gnunet-gtk after an updated patch
Comment 19 ng0 2016-05-24 14:08:02 UTC
Created attachment 435242 [details]
gdb gnunet-gtk (updated patch)

gdb output of 2016-05-24 14:05 UTC, as seen after patch version 2.
Comment 20 SpanKY gentoo-dev 2016-05-24 17:16:23 UTC
that shows some code still trying to strdup(NULL).  if you're at the level of building & debugging the code, you probably want to just work directly with upstream.
Comment 21 ng0 2016-05-24 22:02:12 UTC
resolved with gnunet developers in gnunet-gtk Revision 37201.