From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZV2x-0002ZD-4p for ptxdist@pengutronix.de; Fri, 15 May 2020 09:46:19 +0200 Received: from mol by dude02.lab.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1jZV2w-0006LH-RC for ptxdist@pengutronix.de; Fri, 15 May 2020 09:46:18 +0200 Date: Fri, 15 May 2020 09:46:18 +0200 From: Michael Olbrich Message-ID: <20200515074618.GB32420@pengutronix.de> References: <83b41b28-4b4a-5c1b-f10a-da3753cecfa5@ppc-ag.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <83b41b28-4b4a-5c1b-f10a-da3753cecfa5@ppc-ag.de> Subject: Re: [ptxdist] Segmentation fault with ptxdist-2020.05.0 List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de On Thu, May 14, 2020 at 03:36:44PM +0200, Mircea Ciocan wrote: > Hello list, > = > I have the most strange error with the ptxdist-2020.05.0 while trying to > compile a simple image for the iMX6ULL EVK, the shell segfaults !!! > = > Here are some information, that you could find useful: > = > Distribution: Ubuntu 18.04 LTS, 8GB RAM, current updates. > = > System shell set to bash. > = > The compilation of everything goes perfectly OK, but while building the r= oot > filesystem image it crashes, always in the same place (100% reproducible), > when adding the net-dns-perl package, with the following message; > = > info: selected ptxconfig: > =A0=A0=A0=A0=A0 'configs/platform-mcimx6ull-evk/ptxconfig.tiny' > ptxdist: warning: No dev packages found in 'Firmware/packages-MCIMX6ULL-E= VK' > = > ...[snip]... > = > [compilation goes OK] > = > ---------------- > target: root.tgz > ---------------- > ...[snip]... > = > Configuring readline. > Configuring net-dns-perl. > environment: line 1: 31523 Done=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 { echo "cd '${work_dir}' > || exit"; ptxd_dopermissions "${ptxd_reply_perm_files[@]}"; echo ":"; } > =A0=A0=A0=A0 31524 Segmentation fault=A0=A0=A0=A0=A0 (core dumped) | sh > ./Software/ptxdist-2020.05.0/rules/image-root-tgz.make:29: recipe for tar= get > './Software/Firmware/platform-MCIMX6ULL-EVK/images/root.tgz' failed > = > make: *** [./Software/Firmware/platform-MCIMX6ULL-EVK/images/root.tgz] Er= ror > 139 > = > = > In the system log I get something like: > = > "vmunix: [132753.581596] sh[10747]: segfault at 7ffe5bdf1fe8 ip > 00007fdb0b04930e sp 00007ffe5bdf1fe0 error 6 in > libc-2.27.so[7fdb0afb5000+1e7000]" > = > = > I have to say that I rarely, if ever, see this type of crash, and the bui= ld > finishes OK with ptxdist-2020.02.0. Any pointer on how can I fix or debug > this are greatly appreciated. Huh, I've never seen anything like this. Some things to test. Take a look at scripts/lib/ptxd_make_image_prepare_work_dir.sh in PTXdist. The relevant code is there. Line 50ff. If you change line 56 to something like this: } | tee /tmp/ptxdist-sh-test.txt | sh && Then this will save the exact code that the shell executes when it crashed. Maybe we can find some clues there. But It's probably a bug in 'sh'. What's your /bin/sh anyways? For me it's a link to 'dash' but sometimes it's a bash. You could explicitly try the other here instead of 'sh' to see if that crashes as well. Michael -- = Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de