git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 3/3] trace2: emit "signal" events after calling BUG()

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
May 26, 2022, 03:04 UTC
Message-ID
<Yo7uIG6JOx2lHOqE@debian.me>
In-Reply-To
<RFC-patch-3.3-b099a3a4a96-20220525T234908Z-avarab@gmail.com>
On Thu, May 26, 2022 at 02:30:44AM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 6 quoted lines
>  `"exit"`::
> -	This event is emitted when git calls `exit()`.
> +	This event is emitted when git calls `exit()`. This event will
> +	be produced for all regular ending of the git process, but it
> +	might also exit via a "signal".
>  +

The second 'this' can be elided, thus says "This event is emitted ... and will be produced ...".

Show 9 quoted lines
>  ------------
>  {
> @@ -435,7 +437,7 @@ only present on the "start" and "atexit" events.
>  `"atexit"`::
>  	This event is emitted by the Trace2 `atexit` routine during
>  	final shutdown.  It should be the last event emitted by the
> -	process.
> +	process, unless it was aborted (see "signal").
>  +
Looks OK.
Show 12 quoted lines
> @@ -452,8 +454,11 @@ completed.)
>  
>  `"signal"`::
>  	This event is emitted when the program is terminated by a user
> -	signal.  Depending on the platform, the signal event may
> -	prevent the "atexit" event from being generated.
> +	signal, which includes git itself calling abort(3). Depending
> +	on the platform, the signal event may prevent the "exit"
> +	and/or "atexit" events from being generated. E.g. if BUG() was
> +	invoked we'll emit an "error" event followed by a "signal"
> +	event, and nothing else.
>  +

So in case of BUG() trigger, there may not be exit event due to user signal right? I'm expecting system (not user) signal in that case.

-- 
An old man doll... just what I always wanted! - Clara
Previous: Ævar Arnfjörð BjarmasonNext: Josh Steadmon
Message 13 of 16 in “trace2: log "signal" end events if we invoke BUG()”
  1. 0/3 trace2: log "signal" end events if we invoke BUG()Ævar Arnfjörð Bjarmason, May 26, 2022
  2. 2/3 refs API: rename "abort" callback to avoid macro clashÆvar Arnfjörð Bjarmason, May 26, 2022
  3. 1/3 test-tool: don't fake up BUG() exits as code 99Ævar Arnfjörð Bjarmason, May 26, 2022
  4. Junio C HamanoJun 3, 2022
  5. Junio C HamanoJun 3, 2022
  6. Ævar Arnfjörð BjarmasonJun 3, 2022
  7. Jeff KingJun 8, 2022
  8. Junio C HamanoJun 8, 2022
  9. Ævar Arnfjörð BjarmasonJun 9, 2022
  10. Jeff KingJun 9, 2022
  11. Ævar Arnfjörð BjarmasonJun 3, 2022
  12. 3/3 trace2: emit "signal" events after calling BUG()Ævar Arnfjörð Bjarmason, May 26, 2022
  13. Bagas SanjayaMay 26, 2022
  14. Josh SteadmonMay 31, 2022
  15. Junio C HamanoMay 26, 2022
  16. Josh SteadmonMay 31, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.