diff mbox series

[ovs-dev] lib/fatal-signal: Drop logging of failed dummy backtrace.

Message ID 20230822084015.2248811-1-frode.nordahl@canonical.com
State Accepted
Headers show
Series [ovs-dev] lib/fatal-signal: Drop logging of failed dummy backtrace. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Frode Nordahl Aug. 22, 2023, 8:40 a.m. UTC
Some systems may provide backtrace() in libc but for some reason
not provide any frames when attempting to use it.

On those systems the fatal_signal_init() function currently logs
this debug message: "Capturing of dummy backtrace has failed."

A consequence of this logging may be false negative test results.

Logging the fact that backtrace() does not work has limited value
on a production system and I propose we drop it.

Fixes: 759a29dc2d97 ("backtrace: Extend the backtrace functionality.")
Reported-at: https://launchpad.net/bugs/2032623
Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
---
 lib/fatal-signal.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Ales Musil Aug. 22, 2023, 8:54 a.m. UTC | #1
On Tue, Aug 22, 2023 at 10:40 AM Frode Nordahl <frode.nordahl@canonical.com>
wrote:

> Some systems may provide backtrace() in libc but for some reason
> not provide any frames when attempting to use it.
>
> On those systems the fatal_signal_init() function currently logs
> this debug message: "Capturing of dummy backtrace has failed."
>
> A consequence of this logging may be false negative test results.
>
> Logging the fact that backtrace() does not work has limited value
> on a production system and I propose we drop it.
>
> Fixes: 759a29dc2d97 ("backtrace: Extend the backtrace functionality.")
> Reported-at: https://launchpad.net/bugs/2032623
> Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
> ---
>  lib/fatal-signal.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c
> index 77f0c87dd..953150074 100644
> --- a/lib/fatal-signal.c
> +++ b/lib/fatal-signal.c
> @@ -138,10 +138,6 @@ fatal_signal_init(void)
>
>          backtrace_capture(&dummy_bt);
>
> -        if (!dummy_bt.n_frames) {
> -            VLOG_DBG("Capturing of dummy backtrace has failed.");
> -        }
> -
>          fatal_signal_create_wakeup_events();
>
>  #ifdef _WIN32
> --
> 2.40.1
>
>
Hi Frode,

I wonder why the test fails on the debug message? Nevertheless I don't mind
dropping it whatsoever.

Acked-by: Ales Musil <amusil@redhat.com>

Thanks,
Ales
Ilya Maximets Aug. 25, 2023, 4:02 p.m. UTC | #2
On 8/22/23 10:54, Ales Musil wrote:
> On Tue, Aug 22, 2023 at 10:40 AM Frode Nordahl <frode.nordahl@canonical.com>
> wrote:
> 
>> Some systems may provide backtrace() in libc but for some reason
>> not provide any frames when attempting to use it.
>>
>> On those systems the fatal_signal_init() function currently logs
>> this debug message: "Capturing of dummy backtrace has failed."
>>
>> A consequence of this logging may be false negative test results.
>>
>> Logging the fact that backtrace() does not work has limited value
>> on a production system and I propose we drop it.
>>
>> Fixes: 759a29dc2d97 ("backtrace: Extend the backtrace functionality.")
>> Reported-at: https://launchpad.net/bugs/2032623
>> Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
>> ---
>>  lib/fatal-signal.c | 4 ----
>>  1 file changed, 4 deletions(-)
>>
>> diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c
>> index 77f0c87dd..953150074 100644
>> --- a/lib/fatal-signal.c
>> +++ b/lib/fatal-signal.c
>> @@ -138,10 +138,6 @@ fatal_signal_init(void)
>>
>>          backtrace_capture(&dummy_bt);
>>
>> -        if (!dummy_bt.n_frames) {
>> -            VLOG_DBG("Capturing of dummy backtrace has failed.");
>> -        }
>> -
>>          fatal_signal_create_wakeup_events();
>>
>>  #ifdef _WIN32
>> --
>> 2.40.1
>>
>>
> Hi Frode,
> 
> I wonder why the test fails on the debug message?

It's a separate binary for which we do not filter output.  We could have
add some checks to this particular test, but it seems like the log is
indeed not very useful

> Nevertheless I don't mind dropping it whatsoever.
> 
> Acked-by: Ales Musil <amusil@redhat.com>

Thanks, Frode and Ales!  Applied and backported to 3.2.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c
index 77f0c87dd..953150074 100644
--- a/lib/fatal-signal.c
+++ b/lib/fatal-signal.c
@@ -138,10 +138,6 @@  fatal_signal_init(void)
 
         backtrace_capture(&dummy_bt);
 
-        if (!dummy_bt.n_frames) {
-            VLOG_DBG("Capturing of dummy backtrace has failed.");
-        }
-
         fatal_signal_create_wakeup_events();
 
 #ifdef _WIN32