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

roachtest: gather cores if requested #91632

Merged
merged 2 commits into from
Nov 10, 2022
Merged

Conversation

cucaroach
Copy link
Contributor

@cucaroach cucaroach commented Nov 9, 2022

  • roachtest: allow tests to opt in to core gathering and compress cores
  • roachtest: gather cores on multiregion tests that are timing out

Relates to #90683 CRDB-20887

@cucaroach cucaroach requested a review from a team as a code owner November 9, 2022 21:55
@cucaroach cucaroach requested review from herkolategan and smg260 and removed request for a team November 9, 2022 21:55
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@cucaroach cucaroach changed the title gather cores roachtest: gather cores if requested Nov 9, 2022
@cucaroach cucaroach force-pushed the gather-cores branch 2 times, most recently from 9f30c37 to 3e8d535 Compare November 9, 2022 21:59
Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 4 of 4 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @cucaroach, @herkolategan, @rytaft, @smg260, and @srosenberg)


pkg/roachprod/vm/gce/utils.go line 171 at r1 (raw file):

echo "kernel.core_pattern=$CORE_PATTERN" >> /etc/sysctl.conf

sysctl --system  # reload sysctl settings

Seems like this line is removed, was this intentional?

Some roachtest timeout errors are proving difficult to diagnose with
just the stacks so add a hook for them to optin to core gathering.

Release note: None
Copy link
Contributor Author

@cucaroach cucaroach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @herkolategan, @rytaft, @smg260, @srosenberg, and @yuzefovich)


pkg/roachprod/vm/gce/utils.go line 171 at r1 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

Seems like this line is removed, was this intentional?

No nice catch, it isn't strictly necessary for my purposes but who knows what else it was doing so I put it back.

chmod a+w /mnt/data1/cores
cat <<'EOF' > /bin/gzip_core.sh
#!/bin/sh
exec /bin/gzip -f - > /mnt/data1/cores/core.$1.$2.$3.$4.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pigz might save a few mins if the core is very large. (May need to apt-get install pigz.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a 300MB core its like 3s vs .3s so wow, that's like a 10x speedup but hardly seems worth it.

Copy link
Member

@srosenberg srosenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @cucaroach, @herkolategan, @rytaft, @smg260, and @yuzefovich)


pkg/roachprod/vm/gce/utils.go line 171 at r1 (raw file):

Everytime you make changes to your sysctl configuration file, you must reload it to activate the changes.

🤷‍♂️

@cucaroach
Copy link
Contributor Author

bors r+

Copy link
Contributor Author

@cucaroach cucaroach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @herkolategan, @rytaft, @smg260, @srosenberg, and @yuzefovich)


pkg/roachprod/vm/gce/utils.go line 171 at r1 (raw file):

Previously, srosenberg (Stan Rosenberg) wrote…

Everytime you make changes to your sysctl configuration file, you must reload it to activate the changes.

🤷‍♂️

Right but we already editted the /proc/sys/kernel/core_pattern file so we're good, and editting the sysctl.conf makes it stay that way upon reboot. What does the sysctl --system add? At a minimum it ensures the current state and the state after a reboot will be the same, so thats something.

@craig
Copy link
Contributor

craig bot commented Nov 10, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Nov 10, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Nov 10, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Nov 10, 2022

Build failed:

@cucaroach
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Nov 10, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Nov 10, 2022

Build succeeded:

@craig craig bot merged commit 9e98e4a into cockroachdb:master Nov 10, 2022
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

Successfully merging this pull request may close these issues.

4 participants