Re: [OE-core][gatesgarth]Mongodb segfault on gatesgarth
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: * on behalf of "jaewon via lists.openembedded.org" *Reply-To: *Jaewon Lee *Date: *Tuesday, February 23, 2021 at 2:40 PM *To: *"openembedded-core@lists.openembedded.org" *Cc: *"raj.k...@gmail.com" , "mark.ha...@kernel.crashing.org" *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: * on behalf of "jaewon via lists.openembedded.org" *Reply-To: *Jaewon Lee *Date: *Thursday, February 11, 2021 at 6:07 PM *To: *"openembedded-core@lists.openembedded.org" *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.opene
Re: [OE-core][gatesgarth]Mongodb segfault on gatesgarth
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: on behalf of "jaewon via lists.openembedded.org" Reply-To: Jaewon Lee Date: Tuesday, February 23, 2021 at 2:40 PM To: "openembedded-core@lists.openembedded.org" Cc: "raj.k...@gmail.com" , "mark.ha...@kernel.crashing.org" 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 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: on behalf of "jaewon via lists.openembedded.org" Reply-To: Jaewon Lee Date: Thursday, February 11, 2021 at 6:07 PM To: "openembedded-core@lists.openembedded.org" 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 (#148710): https://lists.openembedded.org/g/openembedded-core/message/148710 Mute This Topic: https://lists.openembedded.org/mt/80574786/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core][gatesgarth]Mongodb segfault on gatesgarth
ow) > > > > 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: on behalf of "jaewon via lists.openembedded.org" > Reply-To: Jaewon Lee > Date: Thursday, February 11, 2021 at 6:07 PM > To: "openembedded-core@lists.openembedded.org" > 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: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core][gatesgarth]Mongodb segfault on gatesgarth
On Tue, Feb 23, 2021 at 2:39 PM jaewon 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: on behalf of "jaewon via > lists.openembedded.org" > Reply-To: Jaewon Lee > Date: Thursday, February 11, 2021 at 6:07 PM > To: "openembedded-core@lists.openembedded.org" > > 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, ‘
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 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: on behalf of "jaewon via lists.openembedded.org" Reply-To: Jaewon Lee Date: Thursday, February 11, 2021 at 6:07 PM To: "openembedded-core@lists.openembedded.org" 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 (#148524): https://lists.openembedded.org/g/openembedded-core/message/148524 Mute This Topic: https://lists.openembedded.org/mt/80574786/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[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 (#147976): https://lists.openembedded.org/g/openembedded-core/message/147976 Mute This Topic: https://lists.openembedded.org/mt/80574786/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-