Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.4100.1614497640385817199 for ; Sat, 27 Feb 2021 23:34:00 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=JbmTM0C5; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: alhe@linux.microsoft.com) Received: from [100.115.92.199] (cpe-68-201-52-49.elp.res.rr.com [68.201.52.49]) by linux.microsoft.com (Postfix) with ESMTPSA id 3905720B6C40; Sat, 27 Feb 2021 23:33:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3905720B6C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1614497639; bh=nWJJCGtoeCd4Wge1L6eneEfyRpWBt+8RZnAJhTctRAk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=JbmTM0C548yqr3v4Xc6oYlIJirzCoI7Kauqp/ao46gF98TnCevUabzL1cP8SaOvMw Y7Jxo45YAMQgr3MdmCRYZ2ypNOz2sGI5io1c3T07GiqLWJclE/MvSEfviPLKS5ssE3 rtOV7mwg9/ibIa2K0V5AmkHnxFOMRr8ygME4CLh4= Subject: Re: [OE-core][gatesgarth]Mongodb segfault on gatesgarth To: jaewon , "openembedded-core@lists.openembedded.org" Cc: "raj.khem@gmail.com" , "mark.hatle@kernel.crashing.org" References: <1662DDF3DEBE137F.7109@lists.openembedded.org> <1666819431BA8376.24730@lists.openembedded.org> From: "Alejandro Hernandez Samaniego" Message-ID: Date: Sun, 28 Feb 2021 00:35:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------5A65CC6BFD6A136F2E7CAA81" Content-Language: en-US --------------5A65CC6BFD6A136F2E7CAA81 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hey Jaewon, Once you're able to build with debugging symbols you'll see the segfault= =20 comes at load time from libunwind, you could either build mongodb=20 without tcmalloc support (PACKAGECONFIG), or you can add=20 -DNO_TCMALLOC_SAMPLES to CPPFLAGS for gperftools, if that works out for=20 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 =C2=A0see= it=20 > using master as well > > Anyone know of this issue? > > Thanks, > > Jaewon > > *From: * on behalf of=20 > "jaewon via lists.openembedded.org"=20 > > *Reply-To: *Jaewon Lee > *Date: *Tuesday, February 23, 2021 at 2:40 PM > *To: *"openembedded-core@lists.openembedded.org"=20 > > *Cc: *"raj.khem@gmail.com" ,=20 > "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=20 > -b gatesgarth > > openembedded (gatesgarth) > > git clonehttps://github.com/openembedded/meta-openembedded.git=20 > -b gatesgarth > > Add meta-oe layers to bblayers > > Add mongodb to IMAGE_INSTALL > > Build and runqemu =C2=A0core-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=20 > this:https://developer.ridgerun.com/wiki/index.php?title=3DPreparing_Yoc= to_Development_Environment_for_Debugging=20 > ) > > IMAGE_INSTALL_append =3D " mongodb mongodb-dbg" > > EXTRA_IMAGE_FEATURES +=3D " tools-debug" > > PACKAGE_DEBUG_SPLIT_STYLE =3D 'debug-file-directory' > > #Specifies to build packages with debugging information > > DEBUG_BUILD =3D "1" > > # Do not remove debug symbols > > INHIBIT_PACKAGE_STRIP =3D "1" > > # OPTIONAL: Do not split debug symbols in a separate file > > INHIBIT_PACKAGE_DEBUG_SPLIT=3D "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, =C2=A0(without=20 > =E2=80=9CPACKAGE_DEBUG_SPLIT_STYLE =3D 'debug-file-directory'=E2=80=9D, = debug files are=20 > here: /usr/bin/.debug/mongod, but=C2=A0/usr/bin/.debug/mongod.debug is= =20 > where gdb is expecting it, if I copy it as such I get the CRC mismatch= =20 > issue below) > > Removed the following from the local.conf and added the following to=20 > mongod recipe: > > +120INHIBIT_PACKAGE_STRIP =3D "1" > > +121INHIBIT_PACKAGE_DEBUG_STRIP =3D "1" > > +122DEBUG_BUILD =3D "1" > > Now I see =C2=A0under mongodb-dbg: > > usr/lib/debug/usr/bin/mongod.debug > > but when running gdb I see > > warning: the debug information found in=20 > "/usr/lib/debug//usr/bin/mongod.debug" does not match=20 > "/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=20 > (0x4d617681 bytes) > > warning: Can't read data for section '.debug_info' in file=20 > '/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=20 > "jaewon via lists.openembedded.org"=20 > > *Reply-To: *Jaewon Lee > *Date: *Thursday, February 11, 2021 at 6:07 PM > *To: *"openembedded-core@lists.openembedded.org"=20 > > *Subject: *[OE-core][gatesgarth]Mongodb segfault on gatesgarth > > Hello all, > > Im seeing a segfault running mongod, tested on pure upstream poky and=20 > 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=20 > zeus release where it was working and same issue. > > hoping to maybe get some pointers in the right direction to pinpoint=20 > issue, also having some trouble setting up debug environment correctly, > > Keep getting either =E2=80=98no debug symbols found=E2=80=99 or, =C2=A0= =E2=80=98the debug info=20 > found in /usr/bin/.debug/mongod.debug does not match /usr/bin/mongod=20 > (CRC mismatch)=E2=80=99 > > With what I think are all the correct flags setup to debug.. > > INHIBIT_PACKAGE_STRIP =3D "1" > > INHIBIT_PACKAGE_DEBUG_STRIP =3D "1" > > INHIBIT_SYSROOT_STRIP =3D "1" > > DEBUG_BUILD =3D "1" > > PACKAGE_DEBUG_SPLIT_STYLE =3D 'debug-file-directory' > > Adding mongodb-dbg,=C2=A0=C2=A0 adding tools-debug > > Any pointers would be much appreciated! > > Thanks, > > Jaewon > > >=20 > --------------5A65CC6BFD6A136F2E7CAA81 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

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 =C2=A0see it using master as well

Anyone know of this issue?

=C2=A0

Thanks,

Jaewon

=C2=A0

From: <openembedded-core@lists.openembedded.org> on behalf of "jaewon via lists.openembedded.org" <jaewon=3Dxilinx.com@lists.openembedde= d.org>
Reply-To: Jaewon Lee <JAEWON@xilinx.com>
Date: Tuesday, February 23, 2021 at 2:40 PM
To: "openembedded-core@lists.openemb= edded.org" <openembedded-core@lists.openembedded.or= g>
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

=C2=A0

Hi,

=C2=A0

Still struggling with this issue,

To summarize the steps that I took to see the mongodb segfault issue,=C2=A0

=C2=A0

Here are the steps I took,

Download poky (gatesgarth)=C2=A0

git clone=C2=A0https://git.yoctoproject.org/git/po= ky=C2=A0-b gatesgarth

openembedded (gatesgarth)

git clone=C2=A0https://github.com/openembedded/met= a-openembedded.git=C2=A0-b gatesgarth

Add meta-oe layers to bblayers

Add mongodb to IMAGE_INSTALL<= o:p>

=C2=A0

Build and runqemu =C2=A0core-image-minimal using qemuarm64

After just these steps I am seeing segfault.

=C2=A0

Anyone know abou= t this issue/what could possibly be the issue?

=C2=A0

=C2=A0

=C2=A0

If not, would al= so appreciate any pointers on debugging this issues,

=C2=A0

For debugging:

=C2=A0

Added the following to local.conf, (referenced this:=C2=A0<= /span>https://developer.ridgerun.com/wiki= /index.php?title=3DPreparing_Yocto_Development_Environment_for_Debugging)

=C2=A0

IMAGE_INSTALL_append =3D " mongodb mongodb-db= g"

EXTRA_IMAGE_FEATURES +=3D " tools-debug"

PACKAGE_DEBUG_SPLIT_STYLE =3D 'debug-file-directory'

=C2=A0

#Specifies to build packages with debugging information

DEBUG_BUILD =3D "1"

# Do not remove debug symbols

INHIBIT_PACKAGE_STRIP =3D "1"

# OPTIONAL: Do not split debug symbols in a separate file

INHIBIT_PACKAGE_DEBUG_SPLIT=3D "1"

=C2=A0

Then using gdb on mongod, I get:=C2=A0

Reading symbols from=C2=A0mongod...

(No debugging symbols found in=C2=A0mongod)

=C2=A0

Noticed nothing is in the -dbg pkgs of mongod, =C2=A0(without =E2=80=9CPACKAGE_= DEBUG_SPLIT_STYLE =3D 'debug-file-directory'=E2=80=9D, debug files are here: /usr/bin/.debug/mongod, but=C2=A0=C2=A0/usr/bin/.debug/mongod.debug is where gdb is expecting it, if I copy it as such I get the CRC mismatch issue below)

=C2=A0

Removed the following from the local.conf and added the following to mongod recipe:

=C2=A0

+=C2=A0120<= span class=3D"apple-converted-space">=C2=A0INHIBI= T_PACKAGE_STRIP =3D "1"

+=C2=A0121<= span class=3D"apple-converted-space">=C2=A0INHIBI= T_PACKAGE_DEBUG_STRIP =3D "1"

+=C2=A0122<= span class=3D"apple-converted-space">=C2=A0DEBUG_= BUILD =3D "1"

=C2=A0

Now I see =C2=A0under mongodb-dbg:=C2=A0

usr/lib/debug/usr/bin/mongod.debug=C2=A0

=C2=A0

but when running gdb I see=C2=A0

=C2=A0

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=C2=A0mongod)

=C2=A0

=C2=A0

Tried the same experiment in zeus, I get,

=C2=A0

Reading symbols from=C2=A0mongod...

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= = =A0=C2=A0Reading symbols from=C2= =A0/usr/bin/.debug/mon= god...

BFD: error: /usr/bin/.debug/mongod(.debug_info) is too large (0x4d617681 bytes)

= =C2=A0

warning: Can't read data for section '.debug_info' in file '/usr/bin/.debug/mongod'

(No debugging symbols found in /usr/bin/.debug/mongod)

=C2=A0

Am I missing something here?<= o:p>

Any pointers would be much appreciated!<= /span>

=C2=A0

Thanks,

Jaewon=C2=A0

=C2=A0

=C2=A0

=C2=A0

From: <openembedded-core@lists.openembedded.org> on behalf of "jaewon via lists.openembedded.org" <jaewon=3Dxilinx.com@lists.openembedde= d.org>
Reply-To: Jaewon Lee <JAEWON@xilinx.com>
Date: Thursday, February 11, 2021 at 6:07 PM
To: "openembedded-core@lists.openemb= edded.org" <openembedded-core@lists.openembedded.or= g>
Subject: [OE-core][gatesgarth]Mongodb segfault on gatesgarth

=C2=A0

Hello all,=

=C2=A0

Im seeing a segfault running mongod, tested on pure upstream poky and openembedded layers (gatesgarth branch)

Any known issue= s 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 =E2=80=98no debug symbols found=E2=80=99 or, =C2=A0=E2=80= = =98the debug info found in /usr/bin/.debug/mongod.debug does not match /usr/bin/mongod (CRC mismatch)=E2=80=99

With what I thi= nk are all the correct flags setup to debug..

INH= IBIT_PACKAGE_STRIP =3D "1"

INH= IBIT_PACKAGE_DEBUG_STRIP =3D "1"

INH= IBIT_SYSROOT_STRIP =3D "1"

DEB= UG_BUILD =3D "1"

=C2= = =A0

PACKAG= E_DEBUG_SPLIT_STYLE =3D 'deb= ug-file-directory'

Adding mongodb-dbg,=C2=A0=C2=A0 adding tools-debug

=C2=A0

Any pointers would be much appreciated!

=C2=A0

Thanks,

Jaewon

=C2=A0




--------------5A65CC6BFD6A136F2E7CAA81--