public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "eigelc at gmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug rust/29550] Segmentation fault in infrun.c Date: Thu, 08 Sep 2022 08:31:09 +0000 [thread overview] Message-ID: <bug-29550-4717-vW07z0k7xE@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29550-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29550 --- Comment #2 from Cristian Eigel <eigelc at gmail dot com> --- 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 run 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 144 (or before the fork is called) and then next from there. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-09-08 8:31 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-06 9:55 [Bug rust/29550] New: " eigelc at gmail dot com 2022-09-07 14:23 ` [Bug rust/29550] " simon.marchi at polymtl dot ca 2022-09-08 8:31 ` eigelc at gmail dot com [this message] 2022-09-08 15:29 ` simon.marchi at polymtl dot ca
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29550-4717-vW07z0k7xE@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).