Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash in function : NameMatchesPatternList #899

Open
ChunelFeng opened this issue Sep 27, 2024 · 14 comments
Open

crash in function : NameMatchesPatternList #899

ChunelFeng opened this issue Sep 27, 2024 · 14 comments

Comments

@ChunelFeng
Copy link

hi, find a coredump question, have you ever meet?

when a kill a perfetto process to catch buffer, the process use write_api sometimes coredump on this function.
about happen once in 100 times dump file.

image

we see that , patterns is error address.

image

config file is :

duration_ms: 0

incremental_state_config: {
  clear_period_ms: 500
}

buffers {
  size_kb: 96605
  fill_policy: RING_BUFFER
}


data_sources {
  config {
    name: "linux.ftrace"
    target_buffer: 0
    ftrace_config {
      drain_period_ms: 120
      compact_sched: {
        enabled: true
      }
    ftrace_events: "sched/*"
    ftrace_events: "irq/*"
    ftrace_events: "task/task_newtask"
    ftrace_events: "task/task_rename"
    }
  }
}

# User-defined data source
data_sources: {
    config {
        name: "track_event"
         track_event_config {
           enabled_categories: "ros2"
           enabled_categories: "fastdds"
           enabled_categories: "percep"
           enabled_categories: "pnc"
           enabled_categories: "hmi"
           enabled_categories: "sensor"
         }
        target_buffer: 0
    }
}

...
@LalitMaganti
Copy link
Collaborator

From what I know, we've never observed any similar crash and we trace a lot. Maybe @ddiproietto would have ideas.

@ddiproietto
Copy link
Collaborator

Thanks, no I've never observed a crash like this.

Can I ask you to share more?

  • Can you copy paste the backtrace (at least the top of the stack with perfetto functions)
  • Can you confirm the exact version of perfetto.h and perfetto.cc you're using?
  • Can you share the line of your code that calls into perfetto on that backtrace? i.e. TRACE_EVENT("category", ...)
  • If the "category" you're using a static or dynamic category (https://perfetto.dev/docs/instrumentation/track-events#dynamic-and-test-only-categories)? I.e. is the category you're using registered beforehand with PERFETTO_DEFINE_CATEGORIES?

Thanks

@ChunelFeng
Copy link
Author

thank you very much.

some private code, no good to show here.

can you send me your email, i well send details to you if it helps.

case the question is very low frequency occurs,
so i think we use PERFETTO_DEFINE_CATEGORIES registered correct.

@LalitMaganti
Copy link
Collaborator

Please send it to [email protected]. I can forward to @ddiproietto and anyone else necesssary.

@ChunelFeng
Copy link
Author

@LalitMaganti

hi, send some important info to your email,
thanks for your help.

@LalitMaganti
Copy link
Collaborator

I've forwarded to ddiproietto.

@ChunelFeng
Copy link
Author

thank you

@ChunelFeng
Copy link
Author

hi, @ddiproietto any new message?

@ddiproietto
Copy link
Collaborator

You mentioned that you're using v30.0, which is quite old at this point

Can you try with a more recent version? I suspect https://r.android.com/2406614 could be related.

Otherwise, with the info we have it's hard to understand what the problem could be.

@ChunelFeng
Copy link
Author

many teams in company use this sdk together,
is is not easy to update perfetto version.

i write a simple perfetto write demo with asan,
will provide more detail info when it crash.
please hold on this issue

and i will try to review the code.

@ChunelFeng
Copy link
Author

You mentioned that you're using v30.0, which is quite old at this point

Can you try with a more recent version? I suspect https://r.android.com/2406614 could be related.

Otherwise, with the info we have it's hard to understand what the problem could be.

i tried this method , still crashed at same point.

any article help me to know how --config file info worked and passed from perfetto to traced in my process?

@LalitMaganti
Copy link
Collaborator

any article help me to know how --config file info worked and passed from perfetto to traced in my process?

https://perfetto.dev/docs/concepts/service-model is probably what you are looking for.

@ChunelFeng
Copy link
Author

please tell me, is there any diff between i send sigterm and sigint to perfetto process by python?

os.kill(perfetto_pid, signal.SIGINT)


os.kill(perfetto_pid, signal.SIGTERM)

something i can not understand.

@LalitMaganti
Copy link
Collaborator

LalitMaganti commented Oct 14, 2024

There is no difference between INT and TERM for Perfetto. The important thing is that you wait for perfetto exiting by polling /prod/pid/status before you try and read the trace file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants