From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 111D33858D39; Thu, 8 Sep 2022 08:31:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 111D33858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1662625870; bh=gAgCiY0i8IX7utsGV6m8ivUfh0TxGiIwdkP/9TORJpw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rA3S5rQLiHcnZRITsSlNHTkZsT9eBkzq3Jc0Mu+0kV9TtY79wqxmeXlXmZmFJY1l6 S4pvzJ+12eBGZ3cbWV2pjS4q8X5RvRGjem5jmyCLlYGLJx7sShIze1iDQ3vvf31RVq uQolxLWT7AGkozOgD8NTw2X1iGw3x7SQSri6uHYg= From: "eigelc at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug rust/29550] Segmentation fault in infrun.c Date: Thu, 08 Sep 2022 08:31:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: rust X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eigelc at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29550 --- Comment #2 from Cristian Eigel --- This is going to be rather complex and you need rust 1.63 to reproduce (the project is written in rust). This can only be done in Linux. The project I = was debugging is this: https://github.com/esrlabs/northstar. Please download it. >From the quickstart (in the Readme) run these steps: ``` sudo apt-get install build-essential libclang1 squashfs-tools ./examples/build_examples.sh cargo run --release --bin northstar ``` The last command will ask for an elevation of privilege. The script which is doing that is .cargo/runner-x86_64-unknown-linux-gnu (in case you want to inspect what's it trying to do). The script is running because the .cargo/config has it set as a runner. In yet another console, run ps -a and get the pid of northstar-fork. Then r= un sudo gdb --pid {THAT_PID_ABOVE} Once in gdb run these commands ``` set follow-fork-mode child b northstar-runtime/src/runtime/fork/init/mod.rs:150 continue ``` These should be after the fork call in the function run. Now in another console: ``` cargo run --release --bin northstar-nstar -- start console ``` At these point the gdb would get the seg-fault. If you want to stop just before the seg-fault, then put the break at line 1= 44 (or before the fork is called) and then next from there. --=20 You are receiving this mail because: You are on the CC list for the bug.=