From: Srikar Dronamraju <srikar@linux.ibm.com>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Brian Johannesmeyer <bjohannesmeyer@gmail.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Revert "scripts/faddr2line: Combine three readelf calls into one"
Date: Thu, 3 Dec 2026 12:16:07 +0530 [thread overview]
Message-ID: <axEQL1m8J67r2YcO@linux.ibm.com> (raw)
In-Reply-To: <axDyXQcsAIA7O7v9@jpoimboe>
* Josh Poimboeuf <jpoimboe@kernel.org> [2026-12-02 20:49:52]:
> > As you can see, the last executed line line is
> >
> > ELF_SECHEADERS=$(sed -n '/There are [0-9]* section headers, starting at offset\|Section Headers:/,$p' "$tmpfile" | sed -n '/Symbol table .* contains [0-9]* entries:/q;p')
> > which it self is called from run_readelf
> >
> > since sed -o errexit is set in the script, sed returns an non-zero error
> > and that causes the script to exit if the line is not found.
>
> Hm... since it's a silent failure it really seems like a pipefail.
>
> Can you run "echo $" immediately after the script to get the exit code?
echo $? returned 141 which meant the script failed due to SIGPIPE.
> And then after that, change the ELF_SECHEADERS line to:
>
> ELF_SECHEADERS=$(sed -n '/There are [0-9]* section headers, starting at offset\|Section Headers:/,$p' "$tmpfile" | sed -n '/Symbol table .* contains [0-9]* entries:/q;p'; echo "PIPESTATUS=${PIPESTATUS[*]} SHELLOPTS=$SHELLOPTS" >&2)
>
faddr2line output with this change.
./scripts/faddr2line build/master/vmlinux __switch_to+0xfc/0x190 ; echo $?
braceexpand:hashall:interactive-comments:pipefail
PIPESTATUS=141 0
+SHELLOPTS=braceexpand:hashall:interactive-comments:nounset:pipefail
__switch_to+0xfc/0x190:
__switch_to at arch/powerpc/kernel/process.c:1351
Then I looked at why faddr2line is showing pipefail but not on my shell.
So apparently I have a BASH_ENV pointing to a file that has set -o pipefail.
Once I unset BASH_ENV, faddr2line works again.
> and then run again and see what is shown for PIPESTATUS and SHELLOPTS.
>
> --
> Josh
--
Thanks and Regards
Srikar Dronamraju
prev parent reply other threads:[~2026-12-03 6:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-05 1:24 Srikar Dronamraju
2026-09-14 19:00 ` Josh Poimboeuf
2026-09-15 2:15 ` Srikar Dronamraju
2026-09-23 9:26 ` Srikar Dronamraju
2026-11-25 15:47 ` Srikar Dronamraju
2026-12-02 23:27 ` Josh Poimboeuf
2026-12-03 2:37 ` Srikar Dronamraju
2026-12-03 4:49 ` Josh Poimboeuf
2026-12-03 6:46 ` Srikar Dronamraju [this message]
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=axEQL1m8J67r2YcO@linux.ibm.com \
--to=srikar@linux.ibm.com \
--cc=bjohannesmeyer@gmail.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
/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: link
Be 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
all inboxes | Powered by JetHome®