git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <rsbecker@nexbridge.com>
To: "'Jeff King'" <peff@peff.net>
Cc: "'D. Ben Knoble'" <ben.knoble@gmail.com>, <git@vger.kernel.org>
Subject: RE: [BUG] Strange git notes completion behaviour
Date: Fri, 24 Oct 2025 13:33:02 -0400	[thread overview]
Message-ID: <029a01dc450c$4318dfe0$c94a9fa0$@nexbridge.com> (raw)
In-Reply-To: <20251023124837.GB1163932@coredump.intra.peff.net>

On October 23, 2025 8:49 AM, Jeff King wrote:
>On Wed, Oct 22, 2025 at 10:27:01AM -0400, rsbecker@nexbridge.com wrote:
>
>> I tried running with --no-pager. No difference. Interesting:
>>
>> git show $(git notes list HEAD)
>>
>> works correctly with no error report (from inside gdb), while the run of
>>
>> git --no-pager notes show HEAD
>>
>> still reports:
>> Run till exit from #0  main (argc=5, argv=0x811d000)
>>     at /home/jenkinsbuild/.jenkins/workspace/Git_Pipeline/common-main.c:8
>> Process (0,896) exited with code 037777777764.
>>
>> Is there a path where just an implied return is used? I have seen the optimizer
>> return whatever is in an x86 register - rsx and rsi are both 12 at git.c:982
>> - on occasion.
>
>Not that I know of (and I'd expect the compiler to complain if we ever
>had a code path that didn't return).  It is weird that git-show produces
>the right exit code, but our execvp() of it does not. In your place I
>guess I'd try walking through the debugger all the way down to the exec
>system call (and ideally convincing the debugger to keep going in the
>exec'd process image).

What I found is this:

Git drops into sane_execvp and converts the

git notes show HEAD

to

git show 1aa950256829721750e809788e7b858db79a934a.

When execvp is called, it immediately fails with a -12 - not returned,
just terminates. The -12 is an NonStop-specific execvp error indicating
the process failed because the object is invalid (strange and likely
an artifact rather than a real problem).

When I use the arguments as presented to execvp via bash directly, I get:

error: no note found for object 1aa950256829721750e809788e7b858db79a934a.

and gdb correctly reports

Process (0,709) exited with code 01.

There is no commit with that hash. HEAD is actually 3fc1917e0e69b23265f5c49f90fdb6f4ed98f4a3
so git show is correctly failing. This is Indicating that notes is not invoking git
correctly.


  reply	other threads:[~2025-10-24 17:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 21:06 [BUG] Strange git notes completion behaviour rsbecker
2025-10-21 21:32 ` D. Ben Knoble
2025-10-21 21:52   ` rsbecker
2025-10-22  9:27     ` Jeff King
2025-10-22 14:27       ` rsbecker
2025-10-23 12:48         ` Jeff King
2025-10-24 17:33           ` rsbecker [this message]
2025-10-24 17:46             ` Jeff King
2025-10-24 18:38               ` rsbecker
2025-10-24 18:52                 ` Jeff King
2025-10-24 19:02                   ` rsbecker
2025-10-24 20:16                     ` Jeff King

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='029a01dc450c$4318dfe0$c94a9fa0$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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;
as well as URLs for NNTP newsgroup(s).