All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [OE-core][gatesgarth]Mongodb segfault on gatesgarth
       [not found] <1662DDF3DEBE137F.7109@lists.openembedded.org>
@ 2021-02-23 22:39 ` jaewon
  2021-02-24  0:39   ` Andre McCurdy
       [not found] ` <1666819431BA8376.24730@lists.openembedded.org>
  1 sibling, 1 reply; 6+ messages in thread
From: jaewon @ 2021-02-23 22:39 UTC (permalink / raw)
  To: openembedded-core; +Cc: raj.khem, mark.hatle

[-- Attachment #1: Type: text/plain, Size: 3886 bytes --]

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: <openembedded-core@lists.openembedded.org> on behalf of "jaewon via lists.openembedded.org" <jaewon=xilinx.com@lists.openembedded.org>
Reply-To: Jaewon Lee <JAEWON@xilinx.com>
Date: Thursday, February 11, 2021 at 6:07 PM
To: "openembedded-core@lists.openembedded.org" <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


[-- Attachment #2: Type: text/html, Size: 25489 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core][gatesgarth]Mongodb segfault on gatesgarth
  2021-02-23 22:39 ` [OE-core][gatesgarth]Mongodb segfault on gatesgarth jaewon
@ 2021-02-24  0:39   ` Andre McCurdy
  2021-02-24 22:00     ` jaewon
  0 siblings, 1 reply; 6+ messages in thread
From: Andre McCurdy @ 2021-02-24  0:39 UTC (permalink / raw)
  To: jaewon; +Cc: openembedded-core

On Tue, Feb 23, 2021 at 2:39 PM jaewon <jaewon@xilinx.com> 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: <openembedded-core@lists.openembedded.org> on behalf of "jaewon via lists.openembedded.org" <jaewon=xilinx.com@lists.openembedded.org>
> Reply-To: Jaewon Lee <JAEWON@xilinx.com>
> Date: Thursday, February 11, 2021 at 6:07 PM
> To: "openembedded-core@lists.openembedded.org" <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
>
>
>
>
> 
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core][gatesgarth]Mongodb segfault on gatesgarth
  2021-02-24  0:39   ` Andre McCurdy
@ 2021-02-24 22:00     ` jaewon
  0 siblings, 0 replies; 6+ messages in thread
From: jaewon @ 2021-02-24 22:00 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: openembedded-core

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" <armccurdy@gmail.com> wrote:

    On Tue, Feb 23, 2021 at 2:39 PM jaewon <jaewon@xilinx.com> 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: <openembedded-core@lists.openembedded.org> on behalf of "jaewon via lists.openembedded.org" <jaewon=xilinx.com@lists.openembedded.org>
    > Reply-To: Jaewon Lee <JAEWON@xilinx.com>
    > Date: Thursday, February 11, 2021 at 6:07 PM
    > To: "openembedded-core@lists.openembedded.org" <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
    >
    >
    >
    >
    > 
    >


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core][gatesgarth]Mongodb segfault on gatesgarth
       [not found] ` <1666819431BA8376.24730@lists.openembedded.org>
@ 2021-02-26 22:17   ` jaewon
  2021-02-28  7:35     ` Alejandro Hernandez Samaniego
  0 siblings, 1 reply; 6+ messages in thread
From: jaewon @ 2021-02-26 22:17 UTC (permalink / raw)
  To: openembedded-core; +Cc: raj.khem, mark.hatle

[-- Attachment #1: Type: text/plain, Size: 4530 bytes --]

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: <openembedded-core@lists.openembedded.org> on behalf of "jaewon via lists.openembedded.org" <jaewon=xilinx.com@lists.openembedded.org>
Reply-To: Jaewon Lee <JAEWON@xilinx.com>
Date: Tuesday, February 23, 2021 at 2:40 PM
To: "openembedded-core@lists.openembedded.org" <openembedded-core@lists.openembedded.org>
Cc: "raj.khem@gmail.com" <raj.khem@gmail.com>, "mark.hatle@kernel.crashing.org" <mark.hatle@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: <openembedded-core@lists.openembedded.org> on behalf of "jaewon via lists.openembedded.org" <jaewon=xilinx.com@lists.openembedded.org>
Reply-To: Jaewon Lee <JAEWON@xilinx.com>
Date: Thursday, February 11, 2021 at 6:07 PM
To: "openembedded-core@lists.openembedded.org" <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


[-- Attachment #2: Type: text/html, Size: 27602 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core][gatesgarth]Mongodb segfault on gatesgarth
  2021-02-26 22:17   ` jaewon
@ 2021-02-28  7:35     ` Alejandro Hernandez Samaniego
  0 siblings, 0 replies; 6+ messages in thread
From: Alejandro Hernandez Samaniego @ 2021-02-28  7:35 UTC (permalink / raw)
  To: jaewon, openembedded-core; +Cc: raj.khem, mark.hatle

[-- Attachment #1: Type: text/plain, Size: 5465 bytes --]

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: *<openembedded-core@lists.openembedded.org> on behalf of 
> "jaewon via lists.openembedded.org" 
> <jaewon=xilinx.com@lists.openembedded.org>
> *Reply-To: *Jaewon Lee <JAEWON@xilinx.com>
> *Date: *Tuesday, February 23, 2021 at 2:40 PM
> *To: *"openembedded-core@lists.openembedded.org" 
> <openembedded-core@lists.openembedded.org>
> *Cc: *"raj.khem@gmail.com" <raj.khem@gmail.com>, 
> "mark.hatle@kernel.crashing.org" <mark.hatle@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: *<openembedded-core@lists.openembedded.org> on behalf of 
> "jaewon via lists.openembedded.org" 
> <jaewon=xilinx.com@lists.openembedded.org>
> *Reply-To: *Jaewon Lee <JAEWON@xilinx.com>
> *Date: *Thursday, February 11, 2021 at 6:07 PM
> *To: *"openembedded-core@lists.openembedded.org" 
> <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
>
>
> 
>

[-- Attachment #2: Type: text/html, Size: 33775 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [OE-core][gatesgarth]Mongodb segfault on gatesgarth
@ 2021-02-12  2:07 jaewon
  0 siblings, 0 replies; 6+ messages in thread
From: jaewon @ 2021-02-12  2:07 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 3428 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-28  7:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1662DDF3DEBE137F.7109@lists.openembedded.org>
2021-02-23 22:39 ` [OE-core][gatesgarth]Mongodb segfault on gatesgarth jaewon
2021-02-24  0:39   ` Andre McCurdy
2021-02-24 22:00     ` jaewon
     [not found] ` <1666819431BA8376.24730@lists.openembedded.org>
2021-02-26 22:17   ` jaewon
2021-02-28  7:35     ` Alejandro Hernandez Samaniego
2021-02-12  2:07 jaewon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.