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

segmentation fault with address sanitizer #16360

Open
2 tasks done
Shbinging opened this issue Jul 10, 2024 · 2 comments
Open
2 tasks done

segmentation fault with address sanitizer #16360

Shbinging opened this issue Jul 10, 2024 · 2 comments
Labels
triage Needs further investigation

Comments

@Shbinging
Copy link
Contributor

Shbinging commented Jul 10, 2024

Description

When I add --enable-address-sanitizer to configure and compile, there will be a probability of segmentation fault when running zebra or mgmtd even vtysh. The specific error message is as follows

AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
Segmentation fault (core dumped)

In the absence of seg fault, when exiting zebra, there will be the following output

==128==LeakSanitizer has encountered a fatal error.
==128==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==128==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)

Version

FRRouting 10.2-dev-my-manual-build (c1f2b43ca294) on Linux(6.5.0-35-generic)
Ubuntu 22.04

How to reproduce

add --enable-address-sanitizer to configure and compile, then run zebra

I use the dockerfile provided by the dev doc(https://docs.frrouting.org/projects/dev-guide/en/latest/building-docker.html)

Expected behavior

normal operation

Actual behavior

segmentation fault

Additional context

No response

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@Shbinging Shbinging added the triage Needs further investigation label Jul 10, 2024
@Shbinging Shbinging changed the title Zebra segmentation fault with address sanitizer zebra segmentation fault with address sanitizer Jul 10, 2024
@Shbinging Shbinging changed the title zebra segmentation fault with address sanitizer segmentation fault with address sanitizer Jul 10, 2024
@rzalamena
Copy link
Member

I ran into a similar issue sometime ago. In my case I was running out of memory due to bad defaults.

To check if it is the same issue: What's the output of ulimit -n? If FRR maximum file descriptors is not configured it will use that value.

Possible solutions:

  1. Set a lower ulimit -n or configure /etc/security/limits.conf (example: * hard nofile 4096, replace * as appropriated).
  2. Configure MAX_FDS in /etc/frr/daemons (if using watchfrr)
  3. Use the command line: --limit-fds 4096 in all daemons (documentation)

@Shbinging
Copy link
Contributor Author

I followed your instructions, but even after launching 3 to 4 times, I still encounter this issue once.

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

No branches or pull requests

2 participants