From owner-freebsd-hackers@freebsd.org Wed Jan 24 00:45:31 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6E11ED6A1A for ; Wed, 24 Jan 2018 00:45:31 +0000 (UTC) (envelope-from chuck@tuffli.net) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66CFC6F71F for ; Wed, 24 Jan 2018 00:45:31 +0000 (UTC) (envelope-from chuck@tuffli.net) Received: by mail-io0-x22e.google.com with SMTP id 72so2973917iom.10 for ; Tue, 23 Jan 2018 16:45:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuffli-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8DCWxXceq1XRyNa61N1I/H+oz0f0PiKWND6NeC2sAjk=; b=LfH76WaPU6RWjqpexVkbrYv3+3hl54i7BfI5EeFkvbnq/iRrVdTOiCfcQFA+CiPL5L 0a7vRmfN1VbzYzpDF4tetELmcihB2+T+ABzg9ibRBXR7f4pXHov2D52oeApBucQTdZp5 F0wuyjh0jQ3XJqT6nswznLDfrny6RihDDYbSOZgIbj7/b10v+lCG5frTsqkTBMtKzT81 dgcbHdt71jdiwRTfCQa0bw3QE9A5GkVJV0jcehtarOi3Aan8glT7KHWcoMQmL2gCvFha A4yiEwZwpVqrHgBhQfBGMD1HJFxADB9I1SrjlMSm2HJbXHNJiQbhbi3DV/AcpB60WATL paBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8DCWxXceq1XRyNa61N1I/H+oz0f0PiKWND6NeC2sAjk=; b=PuEpTCgPH0UKAVSgkwoScWV5YvYAo43ESqsBWJdCxhYs28RytTRs817zot5RoDKvp2 WnmhgZxXZnxAFnJIPZjvU3q0xJ7SgeVMgwntIAzf/IdBnRi5pPFu+Tk9qnjIwULQNOUD 2VddpFNERYCUvXUYG7VxmiulAJZZs42HQMPZnqxU8ZOx9btFUSROtcDSWc0nSzctQGH/ UVrMYhMBh97DaDXmCuAJQDFZLECIOKakCtYnFMkVvzA9ECwmt9EH4BqjlqOXPh85eOIR AzDwFwZ3Yw/TnpJwJZfRgmWAmLW0DsXYReAIf1b9mgiWvtN3F7cCpmsbgmx+s2fbAq5e y/GQ== X-Gm-Message-State: AKwxytdTmtOKg1s0oNWORJ9c0ZUWIB4MBtNLzl0tmdi9mGEy4zqFDGxB D1RrT9Bx6cOuDrL6EEaPX0oP0rVjoJNWCLTgXn+bew== X-Google-Smtp-Source: AH8x224n2h2z5Dbg+JzBP8BHXdBcZ6P79vB66I0dM+QQerY5Tjg+DoUZcWHEBw+6qWDEatv9v2ttoz+KyYmB4YDlCek= X-Received: by 10.107.51.149 with SMTP id z143mr6446840ioz.287.1516754730483; Tue, 23 Jan 2018 16:45:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.21.86 with HTTP; Tue, 23 Jan 2018 16:45:30 -0800 (PST) In-Reply-To: <32C3FADA-073C-4942-B12F-AEB7F345766E@dons.net.au> References: <20180116095908.GQ1684@kib.kiev.ua> <32C3FADA-073C-4942-B12F-AEB7F345766E@dons.net.au> From: Chuck Tuffli Date: Tue, 23 Jan 2018 16:45:30 -0800 Message-ID: Subject: Re: examining Linux core file? To: "O'Connor, Daniel" Cc: Konstantin Belousov , FreeBSD Hackers , Pedro Giffuni Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 00:45:32 -0000 On Tue, Jan 16, 2018 at 5:30 PM, O'Connor, Daniel wrote: > > >> On 16 Jan 2018, at 20:29, Konstantin Belousov wrote: >>> >>> My memory is sketchy but you may need to build a complete >>> cross-toolchain for that. Long-long ago we actually did that but the >>> resulting linux binaries were weird and needed branding always. >> >> No cross-toolchain will help there. Problem is that the binary is Linux, >> while core is FreeBSD. There are enough details significant to the debugger >> that make such combination a new platform. > > Using ktrace / linux_kdump might help - or at least give some clues as to where it's failing too. The ktrace output is interesting. Is there any way to show the address causing the segfault? dmesg shows: pid 1123 (apt-get), uid 0: exited on signal 11 (core dumped) ktrace shows: ... 1123 apt-get 1516724569.278210 CALL L64 write(0x1,0x800644000,0x21) 1123 apt-get 1516724569.284901 GIO L64 fd 1 wrote 33 bytes "\rBuilding dependency tree... 50%\r" 1123 apt-get 1516724569.291711 RET L64 write 33/0x21 1123 apt-get 1516724569.298353 CALL L64 gettimeofday(0x7fffffffd410,0) 1123 apt-get 1516724569.305308 RET L64 gettimeofday 0 1123 apt-get 1516724569.312174 PSIG L64 SIGSEGV SIG_DFL code=SEGV_MAPERR 1123 apt-get 1516724569.312183 NAMI L64 "apt-get.core" --chuck