Hey Jaewon,
Once you're able to build with debugging symbols you'll see the segfault
comes at load time from libunwind, you could either build mongodb
without tcmalloc support (PACKAGECONFIG), or you can add
-DNO_TCMALLOC_SAMPLES to CPPFLAGS for gperftools, if that works out for
you send a patch to meta-oe.
Alejandro
On 2/26/21 3:17 PM, jaewon wrote:
Turns out this mongodb segfault is not unique to gatesgarth, I see it
using master as well
Anyone know of this issue?
Thanks,
Jaewon
*From: *<[email protected]> on behalf of
"jaewon via lists.openembedded.org"
<[email protected]>
*Reply-To: *Jaewon Lee <[email protected]>
*Date: *Tuesday, February 23, 2021 at 2:40 PM
*To: *"[email protected]"
<[email protected]>
*Cc: *"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>
*Subject: *Re: [OE-core][gatesgarth]Mongodb segfault on gatesgarth
Hi,
Still struggling with this issue,
To summarize the steps that I took to see the mongodb segfault issue,
Here are the steps I took,
Download poky (gatesgarth)
git clonehttps://git.yoctoproject.org/git/poky
<https://git.yoctoproject.org/git/poky>-b gatesgarth
openembedded (gatesgarth)
git clonehttps://github.com/openembedded/meta-openembedded.git
<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
<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 frommongod...
(No debugging symbols found inmongod)
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:
+120INHIBIT_PACKAGE_STRIP = "1"
+121INHIBIT_PACKAGE_DEBUG_STRIP = "1"
+122DEBUG_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 inmongod)
Tried the same experiment in zeus, I get,
Reading symbols frommongod...
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 (#148734):
https://lists.openembedded.org/g/openembedded-core/message/148734
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]]
-=-=-=-=-=-=-=-=-=-=-=-