-
-
Notifications
You must be signed in to change notification settings - Fork 200
tests: create a tmp image that has coredumps enabled for testing #1754
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
base: develop
Are you sure you want to change the base?
Conversation
these changes will NOT be merged into develop or promoted to production
## Using GDB: | ||
To analyze a coredump: | ||
``` | ||
sudo gdb postmaster -c /pg_coredump_debug/<core_file> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to pass full path instead of just postmaster
:
sudo gdb /nix/store/56va3gd07cakgapybcw4iq1irhx9lryx-postgresql-and-plugins-17_11/bin/.postgres-wrapped -c /pg_coredump_debug/core..postgres-wrapp.2150.1755075766
I'm not sure how properly can I find the path. One can try:
ls -lh /nix/store/*/bin/.postgres-wrapped
-r-xr-xr-x 3 root root 11M Jan 1 1970 /nix/store/56va3gd07cakgapybcw4iq1irhx9lryx-postgresql-and-plugins-17_11/bin/.postgres-wrapped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can also find it in /var/lib/postgresql/.nix-profile/bin so there actually is already a conventional location (I just used the same "home" dir for the postgres user that infra team created before I did all the nix packaging, to make it easier for people to orient themselves who were already familiar with /var/lib/postgresql homedir)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my case I had to use the .postgres-wrapped
file which isn't in /var/lib/postgresql/.nix-profile/bin
. TBH not sure how it is related to the original postgres
binary file.
Co-authored-by: Artur Zakirov <[email protected]>
We'll end up converting this from ansible to a nix package configuration that can be installed/uninstalled this was just a short term measure/test to see if this would work |
these changes will NOT be merged into develop or promoted to production
The purpose of this draft pr is to create an image that has coredumps enabled per our internal playbook, for testing segfault issues. We will not merge this PR, or release the images created with it. It will be closed without merging when testing is completed.