Hi Andre,
Thanks for the reply,
Yeah definitely agreed, I think near the end I had everything mixed up but
initially I did try the two different routes clearly,
will list the combos, (double checked these just now)
(inhibiting strip, checked mongod binary using objdump to make sure debug
symbols are there):
IMAGE_INSTALL_append = " mongodb"
EXTRA_IMAGE_FEATURES += " tools-debug"
DEBUG_BUILD = "1"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_STRIP = "1"
Results in:
Reading symbols from mongod...
(No debugging symbols found in mongod)
(stripping, adding -dbg package, setting debug-file-directory):
IMAGE_INSTALL_append = " mongodb mongodb-dbg"
EXTRA_IMAGE_FEATURES += " tools-debug"
DEBUG_BUILD = "1"
PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
Results in:
Reading symbols from mongod...
warning: the debug information found in
"/usr/lib/debug//usr/bin/mongod.debug" does not match "/usr/bin/mongod" (CRC
mismatch).
(No debugging symbols found in mongod)
devtool deploy-target was a great idea,
but am now getting:
ERROR: No files to deploy - have you built the mongodb recipe? If so, the
install step has not installed any files.
This is after doing devtool modify (had to take out a patch, Ive ran into this
before, something to do with devtool/bitbake using different commands to apply
patches, the missing patch wouldn’t affect what im trying to do)
and devtool build on mongodb,
Possibly doesn’t work with scons built packages? Didn’t go too much further in
trying to fix this
Any other thoughts would be much appreciated
Thanks,
Jaewon
On 2/23/21, 4:39 PM, "Andre McCurdy" <[email protected]> wrote:
On Tue, Feb 23, 2021 at 2:39 PM jaewon <[email protected]> wrote:
>
>
> Still struggling with this issue,
Perhaps first decide what you are actually trying to do. The choice is
between including debug symbols in the mongodb binary installed on the
target (e.g. modifying INHIBIT_PACKAGE_STRIP and/or
INHIBIT_PACKAGE_DEBUG_SPLIT) or splitting the debug symbols into a
separate package (ie the default) but then including that package on
the target and trying to have gdb find and use it (e.g. modifying
PACKAGE_DEBUG_SPLIT_STYLE and/or adding mongodb-dbg to IMAGE_INSTALL).
Mixing the two approaches as you seem to be doing probably isn't the
best approach...
Alternatively you can install an unstripped mongodb binary on the
target at run time using "devtool deploy-target". In that case you
might not need to mess with any of the build or packaging related
debug options at all.
> To summarize the steps that I took to see the mongodb segfault issue,
>
>
>
> Here are the steps I took,
>
> Download poky (gatesgarth)
>
> git clone https://git.yoctoproject.org/git/poky -b gatesgarth
>
> openembedded (gatesgarth)
>
> git clone https://github.com/openembedded/meta-openembedded.git -b
gatesgarth
>
> Add meta-oe layers to bblayers
>
> Add mongodb to IMAGE_INSTALL
>
>
>
> Build and runqemu core-image-minimal using qemuarm64
>
> After just these steps I am seeing segfault.
>
>
>
> Anyone know about this issue/what could possibly be the issue?
>
>
>
>
>
>
>
> If not, would also appreciate any pointers on debugging this issues,
>
>
>
> For debugging:
>
>
>
> Added the following to local.conf, (referenced this:
https://developer.ridgerun.com/wiki/index.php?title=Preparing_Yocto_Development_Environment_for_Debugging)
>
>
>
> IMAGE_INSTALL_append = " mongodb mongodb-dbg"
>
> EXTRA_IMAGE_FEATURES += " tools-debug"
>
> PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
>
>
>
> #Specifies to build packages with debugging information
>
> DEBUG_BUILD = "1"
>
> # Do not remove debug symbols
>
> INHIBIT_PACKAGE_STRIP = "1"
>
> # OPTIONAL: Do not split debug symbols in a separate file
>
> INHIBIT_PACKAGE_DEBUG_SPLIT= "1"
>
>
>
> Then using gdb on mongod, I get:
>
> Reading symbols from mongod...
>
> (No debugging symbols found in mongod)
>
>
>
> Noticed nothing is in the -dbg pkgs of mongod, (without
“PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'”, debug files are here:
/usr/bin/.debug/mongod, but /usr/bin/.debug/mongod.debug is where gdb is
expecting it, if I copy it as such I get the CRC mismatch issue below)
>
>
>
> Removed the following from the local.conf and added the following to
mongod recipe:
>
>
>
> + 120 INHIBIT_PACKAGE_STRIP = "1"
>
> + 121 INHIBIT_PACKAGE_DEBUG_STRIP = "1"
>
> + 122 DEBUG_BUILD = "1"
>
>
>
> Now I see under mongodb-dbg:
>
> usr/lib/debug/usr/bin/mongod.debug
>
>
>
> but when running gdb I see
>
>
>
> warning: the debug information found in
"/usr/lib/debug//usr/bin/mongod.debug" does not match "/usr/bin/mongod" (CRC
mismatch).
>
> (No debugging symbols found in mongod)
>
>
>
>
>
> Tried the same experiment in zeus, I get,
>
>
>
> Reading symbols from mongod...
>
> Reading symbols from /usr/bin/.debug/mongod...
>
> BFD: error: /usr/bin/.debug/mongod(.debug_info) is too large (0x4d617681
bytes)
>
>
>
> warning: Can't read data for section '.debug_info' in file
'/usr/bin/.debug/mongod'
>
> (No debugging symbols found in /usr/bin/.debug/mongod)
>
>
>
> Am I missing something here?
>
> Any pointers would be much appreciated!
>
>
>
> Thanks,
>
> Jaewon
>
>
>
>
>
>
>
> From: <[email protected]> on behalf of "jaewon via
lists.openembedded.org" <[email protected]>
> Reply-To: Jaewon Lee <[email protected]>
> Date: Thursday, February 11, 2021 at 6:07 PM
> To: "[email protected]"
<[email protected]>
> Subject: [OE-core][gatesgarth]Mongodb segfault on gatesgarth
>
>
>
> Hello all,
>
>
>
> Im seeing a segfault running mongod, tested on pure upstream poky and
openembedded layers (gatesgarth branch)
>
> Any known issues here on mongod in gatesgarth?
>
>
> Not a perfect test by any means but also tried mongodb version from zeus
release where it was working and same issue.
>
> hoping to maybe get some pointers in the right direction to pinpoint
issue, also having some trouble setting up debug environment correctly,
>
> Keep getting either ‘no debug symbols found’ or, ‘the debug info found
in /usr/bin/.debug/mongod.debug does not match /usr/bin/mongod (CRC mismatch)’
>
> With what I think are all the correct flags setup to debug..
>
> INHIBIT_PACKAGE_STRIP = "1"
>
> INHIBIT_PACKAGE_DEBUG_STRIP = "1"
>
> INHIBIT_SYSROOT_STRIP = "1"
>
> DEBUG_BUILD = "1"
>
>
>
> PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
>
> Adding mongodb-dbg, adding tools-debug
>
>
>
> Any pointers would be much appreciated!
>
>
>
> Thanks,
>
> Jaewon
>
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148570):
https://lists.openembedded.org/g/openembedded-core/message/148570
Mute This Topic: https://lists.openembedded.org/mt/80574786/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-