DataDog / libdatadog

Datadog shared rust-based library. For now only used in other products (e.g. Ruby or PHP libraries).
Apache License 2.0
47 stars 8 forks source link

[PROF-10656] Add faulting_address to crashtracker reports #663

Closed ivoanjo closed 1 week ago

ivoanjo commented 1 month ago

What does this PR do?

While investigating a customer crash, I found that I dearly missed having the address that caused a segfault.

E.g. given this code:

  char *potato = 0x1234;
  fprintf(stderr, "Value of potato is %c\n", *potato);

...I want to know that the crash was triggered when 0x1234 was dereferenced, as this information may be key in debugging the issue.

We already get this information in our signal handler, so this PR just adds the needed piping to report it to datadog.

Motivation:

Improve debugging of crashes reported by crashtracker.

Additional Notes:

I added the faulting_address as a tag, similar to siginfo and signame. We may want to send it as some other thing; no strong opinions there.

How to test the change?

I was able to test this with the Ruby profiler. I've been trying to update the tests but there's still some failing and I'm kinda struggling with that. Hopefully someone with a bit more rust-fu than me can help out there.

Here's a submitted crash report with a crashing_address tag (renamed since this test): https://app.datadoghq.com/dashboard/uwt-n4k-y9a?fromUser=true&refresh_mode=sliding&tpl_var_org_id%5B0%5D=197728&tpl_var_runtime%5B0%5D=ruby&from_ts=1727956296556&to_ts=1727959896556&live=true

pr-commenter[bot] commented 1 month ago

Benchmarks

Comparison

Benchmark execution time: 2024-10-25 15:27:13

Comparing candidate commit dd111b0 in PR branch ivoanjo/prof-10656-crash-address-in-report with baseline commit 085a91a in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 51 metrics, 2 unstable metrics.

Candidate

Candidate benchmark details ### Group 1 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |----------------------------------------------------------------------------|--------------|-------|-----------------|-----------------|-------|-------|-------|-------|--------------------|--------|--------|-----|-------|----|-----------| |benching deserializing traces from msgpack to their internal representation |execution_time|1.160µs|1.215µs ± 0.021µs|1.218µs ± 0.016µs|1.233µs|1.239µs|1.241µs|1.242µs|2.00% |-0.999 |0.269 |1.73%|0.001µs|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |----------------------------------------------------------------------------|--------------|----------------------------------------|-------------------|------------------------|---------------| |benching deserializing traces from msgpack to their internal representation |execution_time|[1.212µs; 1.218µs] or [-0.241%; +0.241%]|None |None |None | ### Group 2 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |----------------------------------------------------------|--------------|-----------------|----------------------------------|---------------------------------|-----------------|-----------------|-----------------|-----------------|--------------------|--------|--------|-----|-------------|----|-----------| |credit_card/is_card_number/ |execution_time|4.603µs |4.615µs ± 0.002µs |4.615µs ± 0.002µs |4.616µs |4.618µs |4.620µs |4.622µs |0.16% |-0.309 |2.334 |0.05%|0.000µs |1 |200 | |credit_card/is_card_number/ |throughput |216370763.679op/s|216706437.502op/s ± 106601.196op/s|216707747.517op/s ± 74703.944op/s|216782397.269op/s|216859439.004op/s|216917470.789op/s|217239388.387op/s|0.25% |0.316 |2.356 |0.05%|7537.843op/s |1 |200 | |credit_card/is_card_number/ 3782-8224-6310-005 |execution_time|90.292µs |91.275µs ± 0.471µs |91.203µs ± 0.206µs |91.506µs |91.899µs |92.659µs |94.750µs |3.89% |2.404 |14.507 |0.51%|0.033µs |1 |200 | |credit_card/is_card_number/ 3782-8224-6310-005 |throughput |10554043.129op/s |10956179.846op/s ± 55861.032op/s |10964611.717op/s ± 24812.120op/s |10983183.100op/s |11028780.493op/s |11061727.616op/s |11075198.382op/s |1.01% |-2.244 |13.125 |0.51%|3949.971op/s |1 |200 | |credit_card/is_card_number/ 378282246310005 |execution_time|82.705µs |83.629µs ± 0.594µs |83.531µs ± 0.311µs |83.899µs |84.550µs |85.307µs |87.675µs |4.96% |2.112 |10.180 |0.71%|0.042µs |1 |200 | |credit_card/is_card_number/ 378282246310005 |throughput |11405737.143op/s |11958199.963op/s ± 83754.586op/s |11971548.418op/s ± 44503.696op/s |12010519.716op/s |12066718.821op/s |12078369.984op/s |12091188.113op/s |1.00% |-1.956 |8.903 |0.70%|5922.344op/s |1 |200 | |credit_card/is_card_number/37828224631 |execution_time|4.603µs |4.615µs ± 0.002µs |4.615µs ± 0.001µs |4.616µs |4.618µs |4.619µs |4.619µs |0.10% |-0.927 |4.416 |0.04%|0.000µs |1 |200 | |credit_card/is_card_number/37828224631 |throughput |216474130.892op/s|216698402.638op/s ± 95491.559op/s |216695211.036op/s ± 60309.822op/s|216755093.751op/s|216848228.778op/s|216885481.114op/s|217253474.953op/s|0.26% |0.934 |4.460 |0.04%|6752.273op/s |1 |200 | |credit_card/is_card_number/378282246310005 |execution_time|79.440µs |80.478µs ± 0.413µs |80.473µs ± 0.276µs |80.771µs |81.121µs |81.317µs |81.359µs |1.10% |-0.085 |-0.496 |0.51%|0.029µs |1 |200 | |credit_card/is_card_number/378282246310005 |throughput |12291259.990op/s |12426009.182op/s ± 63826.278op/s |12426520.741op/s ± 42663.170op/s |12466678.133op/s |12536107.626op/s |12561460.304op/s |12588080.055op/s |1.30% |0.108 |-0.486 |0.51%|4513.199op/s |1 |200 | |credit_card/is_card_number/37828224631000521389798 |execution_time|59.271µs |59.575µs ± 0.210µs |59.591µs ± 0.168µs |59.731µs |59.943µs |60.081µs |60.105µs |0.86% |0.288 |-0.639 |0.35%|0.015µs |1 |200 | |credit_card/is_card_number/37828224631000521389798 |throughput |16637575.668op/s |16785839.677op/s ± 59228.273op/s |16781175.718op/s ± 47177.952op/s |16846174.529op/s |16868954.720op/s |16870659.874op/s |16871782.687op/s |0.54% |-0.275 |-0.658 |0.35%|4188.071op/s |1 |200 | |credit_card/is_card_number/x371413321323331 |execution_time|7.219µs |7.224µs ± 0.006µs |7.224µs ± 0.002µs |7.225µs |7.229µs |7.230µs |7.293µs |0.96% |9.870 |120.537 |0.08%|0.000µs |1 |200 | |credit_card/is_card_number/x371413321323331 |throughput |137115652.945op/s|138434915.322op/s ± 105733.438op/s|138436845.113op/s ± 37319.425op/s|138483714.316op/s|138506738.353op/s|138517598.938op/s|138520196.245op/s|0.06% |-9.812 |119.564 |0.08%|7476.483op/s |1 |200 | |credit_card/is_card_number_no_luhn/ |execution_time|4.602µs |4.615µs ± 0.004µs |4.615µs ± 0.001µs |4.616µs |4.620µs |4.635µs |4.641µs |0.56% |3.520 |21.702 |0.08%|0.000µs |1 |200 | |credit_card/is_card_number_no_luhn/ |throughput |215491930.687op/s|216680846.057op/s ± 179120.615op/s|216701744.449op/s ± 69994.282op/s|216772700.151op/s|216847572.367op/s|216915939.174op/s|217311732.527op/s|0.28% |-3.492 |21.510 |0.08%|12665.740op/s|1 |200 | |credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 |execution_time|73.804µs |74.420µs ± 0.187µs |74.422µs ± 0.096µs |74.514µs |74.677µs |74.782µs |75.661µs |1.66% |1.138 |9.012 |0.25%|0.013µs |1 |200 | |credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 |throughput |13216868.248op/s |13437413.114op/s ± 33720.103op/s |13436808.705op/s ± 17370.289op/s |13456321.789op/s |13493654.339op/s |13512677.401op/s |13549312.724op/s |0.84% |-1.066 |8.552 |0.25%|2384.371op/s |1 |200 | |credit_card/is_card_number_no_luhn/ 378282246310005 |execution_time|66.325µs |66.820µs ± 0.243µs |66.832µs ± 0.185µs |66.997µs |67.196µs |67.394µs |67.594µs |1.14% |0.329 |-0.488 |0.36%|0.017µs |1 |200 | |credit_card/is_card_number_no_luhn/ 378282246310005 |throughput |14794289.838op/s |14965728.495op/s ± 54365.722op/s |14962960.688op/s ± 41373.607op/s |15012201.175op/s |15040795.677op/s |15063096.456op/s |15077219.487op/s |0.76% |-0.314 |-0.513 |0.36%|3844.237op/s |1 |200 | |credit_card/is_card_number_no_luhn/37828224631 |execution_time|4.603µs |4.615µs ± 0.003µs |4.615µs ± 0.001µs |4.616µs |4.618µs |4.618µs |4.636µs |0.45% |1.870 |23.133 |0.06%|0.000µs |1 |200 | |credit_card/is_card_number_no_luhn/37828224631 |throughput |215711927.467op/s|216701726.155op/s ± 122086.728op/s|216692033.195op/s ± 62647.200op/s|216767468.628op/s|216855960.786op/s|216909184.028op/s|217265404.222op/s|0.26% |-1.833 |22.878 |0.06%|8632.835op/s |1 |200 | |credit_card/is_card_number_no_luhn/378282246310005 |execution_time|62.363µs |62.666µs ± 0.158µs |62.642µs ± 0.122µs |62.770µs |62.940µs |63.128µs |63.219µs |0.92% |0.671 |0.089 |0.25%|0.011µs |1 |200 | |credit_card/is_card_number_no_luhn/378282246310005 |throughput |15817927.743op/s |15957823.248op/s ± 40056.374op/s |15963703.373op/s ± 31022.355op/s |15993356.361op/s |16004857.875op/s |16025346.632op/s |16035071.909op/s |0.45% |-0.659 |0.058 |0.25%|2832.413op/s |1 |200 | |credit_card/is_card_number_no_luhn/37828224631000521389798|execution_time|59.263µs |59.598µs ± 0.244µs |59.606µs ± 0.185µs |59.758µs |60.065µs |60.103µs |60.116µs |0.86% |0.288 |-0.882 |0.41%|0.017µs |1 |200 | |credit_card/is_card_number_no_luhn/37828224631000521389798|throughput |16634491.797op/s |16779263.111op/s ± 68518.321op/s |16776827.010op/s ± 52000.078op/s |16846707.590op/s |16869893.826op/s |16872852.048op/s |16873824.670op/s |0.58% |-0.275 |-0.897 |0.41%|4844.977op/s |1 |200 | |credit_card/is_card_number_no_luhn/x371413321323331 |execution_time|7.218µs |7.223µs ± 0.003µs |7.223µs ± 0.002µs |7.225µs |7.228µs |7.229µs |7.230µs |0.10% |0.537 |-0.649 |0.04%|0.000µs |1 |200 | |credit_card/is_card_number_no_luhn/x371413321323331 |throughput |138316274.493op/s|138447771.888op/s ± 51630.967op/s |138453244.339op/s ± 39528.933op/s|138492043.632op/s|138515006.716op/s|138522599.547op/s|138540814.124op/s|0.06% |-0.536 |-0.651 |0.04%|3650.861op/s |1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |----------------------------------------------------------|--------------|------------------------------------------------------------|-------------------|------------------------|---------------| |credit_card/is_card_number/ |execution_time|[4.614µs; 4.615µs] or [-0.007%; +0.007%] |None |None |None | |credit_card/is_card_number/ |throughput |[216691663.602op/s; 216721211.403op/s] or [-0.007%; +0.007%]|None |None |None | |credit_card/is_card_number/ 3782-8224-6310-005 |execution_time|[91.210µs; 91.340µs] or [-0.072%; +0.072%] |None |None |None | |credit_card/is_card_number/ 3782-8224-6310-005 |throughput |[10948438.044op/s; 10963921.648op/s] or [-0.071%; +0.071%] |None |None |None | |credit_card/is_card_number/ 378282246310005 |execution_time|[83.546µs; 83.711µs] or [-0.098%; +0.098%] |None |None |None | |credit_card/is_card_number/ 378282246310005 |throughput |[11946592.383op/s; 11969807.543op/s] or [-0.097%; +0.097%] |None |None |None | |credit_card/is_card_number/37828224631 |execution_time|[4.614µs; 4.615µs] or [-0.006%; +0.006%] |None |None |None | |credit_card/is_card_number/37828224631 |throughput |[216685168.426op/s; 216711636.849op/s] or [-0.006%; +0.006%]|None |None |None | |credit_card/is_card_number/378282246310005 |execution_time|[80.421µs; 80.536µs] or [-0.071%; +0.071%] |None |None |None | |credit_card/is_card_number/378282246310005 |throughput |[12417163.474op/s; 12434854.891op/s] or [-0.071%; +0.071%] |None |None |None | |credit_card/is_card_number/37828224631000521389798 |execution_time|[59.546µs; 59.604µs] or [-0.049%; +0.049%] |None |None |None | |credit_card/is_card_number/37828224631000521389798 |throughput |[16777631.208op/s; 16794048.146op/s] or [-0.049%; +0.049%] |None |None |None | |credit_card/is_card_number/x371413321323331 |execution_time|[7.223µs; 7.224µs] or [-0.011%; +0.011%] |None |None |None | |credit_card/is_card_number/x371413321323331 |throughput |[138420261.685op/s; 138449568.960op/s] or [-0.011%; +0.011%]|None |None |None | |credit_card/is_card_number_no_luhn/ |execution_time|[4.615µs; 4.616µs] or [-0.011%; +0.011%] |None |None |None | |credit_card/is_card_number_no_luhn/ |throughput |[216656021.663op/s; 216705670.452op/s] or [-0.011%; +0.011%]|None |None |None | |credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 |execution_time|[74.394µs; 74.446µs] or [-0.035%; +0.035%] |None |None |None | |credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 |throughput |[13432739.832op/s; 13442086.396op/s] or [-0.035%; +0.035%] |None |None |None | |credit_card/is_card_number_no_luhn/ 378282246310005 |execution_time|[66.787µs; 66.854µs] or [-0.050%; +0.050%] |None |None |None | |credit_card/is_card_number_no_luhn/ 378282246310005 |throughput |[14958193.929op/s; 14973263.061op/s] or [-0.050%; +0.050%] |None |None |None | |credit_card/is_card_number_no_luhn/37828224631 |execution_time|[4.614µs; 4.615µs] or [-0.008%; +0.008%] |None |None |None | |credit_card/is_card_number_no_luhn/37828224631 |throughput |[216684806.108op/s; 216718646.201op/s] or [-0.008%; +0.008%]|None |None |None | |credit_card/is_card_number_no_luhn/378282246310005 |execution_time|[62.644µs; 62.687µs] or [-0.035%; +0.035%] |None |None |None | |credit_card/is_card_number_no_luhn/378282246310005 |throughput |[15952271.819op/s; 15963374.676op/s] or [-0.035%; +0.035%] |None |None |None | |credit_card/is_card_number_no_luhn/37828224631000521389798|execution_time|[59.565µs; 59.632µs] or [-0.057%; +0.057%] |None |None |None | |credit_card/is_card_number_no_luhn/37828224631000521389798|throughput |[16769767.130op/s; 16788759.091op/s] or [-0.057%; +0.057%] |None |None |None | |credit_card/is_card_number_no_luhn/x371413321323331 |execution_time|[7.223µs; 7.223µs] or [-0.005%; +0.005%] |None |None |None | |credit_card/is_card_number_no_luhn/x371413321323331 |throughput |[138440616.332op/s; 138454927.443op/s] or [-0.005%; +0.005%]|None |None |None | ### Group 3 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |-----------------------|--------------|-------|-----------------|-----------------|-------|-------|-------|-------|--------------------|--------|--------|-----|-------|----|-----------| |tags/replace_trace_tags|execution_time|2.677µs|2.723µs ± 0.025µs|2.719µs ± 0.008µs|2.729µs|2.785µs|2.790µs|2.791µs|2.65% |0.951 |1.055 |0.92%|0.002µs|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |-----------------------|--------------|----------------------------------------|-------------------|------------------------|---------------| |tags/replace_trace_tags|execution_time|[2.719µs; 2.726µs] or [-0.128%; +0.128%]|None |None |None | ### Group 4 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |------------------------|--------------|--------|------------------|------------------|--------|--------|--------|--------|--------------------|--------|--------|-----|-------|----|-----------| |sql/obfuscate_sql_string|execution_time|72.226µs|72.351µs ± 0.155µs|72.320µs ± 0.041µs|72.372µs|72.509µs|72.849µs|74.048µs|2.39% |7.376 |73.146 |0.21%|0.011µs|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |------------------------|--------------|------------------------------------------|-------------------|------------------------|---------------| |sql/obfuscate_sql_string|execution_time|[72.329µs; 72.372µs] or [-0.030%; +0.030%]|None |None |None | ### Group 5 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |-------------------------------------------------------------------------------------------------------|--------------|----------------|--------------------------------|--------------------------------|----------------|----------------|----------------|----------------|--------------------|--------|--------|-----|------------|----|-----------| |normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000...|execution_time|622.951µs |624.719µs ± 1.078µs |624.651µs ± 0.306µs |624.950µs |625.333µs |626.599µs |637.013µs |1.98% |8.286 |87.443 |0.17%|0.076µs |1 |200 | |normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000...|throughput |1569827.204op/s |1600723.493op/s ± 2722.877op/s |1600894.488op/s ± 784.949op/s |1601731.701op/s |1602782.293op/s |1603782.958op/s |1605263.245op/s |0.27% |-8.179 |85.761 |0.17%|192.536op/s |1 |200 | |normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて |execution_time|461.066µs |461.843µs ± 0.394µs |461.813µs ± 0.287µs |462.116µs |462.462µs |462.803µs |463.243µs |0.31% |0.472 |0.019 |0.09%|0.028µs |1 |200 | |normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて |throughput |2158692.532op/s |2165239.296op/s ± 1847.031op/s |2165378.874op/s ± 1342.897op/s |2166600.890op/s |2167883.660op/s |2168552.818op/s |2168885.151op/s |0.16% |-0.467 |0.010 |0.09%|130.605op/s |1 |200 | |normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters |execution_time|177.990µs |178.351µs ± 0.154µs |178.342µs ± 0.067µs |178.402µs |178.559µs |178.845µs |179.299µs |0.54% |2.078 |9.904 |0.09%|0.011µs |1 |200 | |normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters |throughput |5577278.223op/s |5606937.716op/s ± 4821.993op/s |5607216.022op/s ± 2108.865op/s |5609504.088op/s |5613182.749op/s |5614747.329op/s |5618297.782op/s |0.20% |-2.058 |9.777 |0.09%|340.966op/s |1 |200 | |normalization/normalize_service/normalize_service/[empty string] |execution_time|46.589µs |46.799µs ± 0.107µs |46.776µs ± 0.063µs |46.866µs |46.998µs |47.054µs |47.087µs |0.66% |0.633 |-0.294 |0.23%|0.008µs |1 |200 | |normalization/normalize_service/normalize_service/[empty string] |throughput |21237258.766op/s|21368176.185op/s ± 48778.925op/s|21378281.924op/s ± 28996.371op/s|21403050.606op/s|21431456.214op/s|21453966.493op/s|21464235.746op/s|0.40% |-0.624 |-0.305 |0.23%|3449.191op/s|1 |200 | |normalization/normalize_service/normalize_service/test_ASCII |execution_time|48.962µs |49.283µs ± 0.134µs |49.283µs ± 0.098µs |49.378µs |49.523µs |49.610µs |49.649µs |0.74% |0.268 |-0.353 |0.27%|0.009µs |1 |200 | |normalization/normalize_service/normalize_service/test_ASCII |throughput |20141260.390op/s|20291263.966op/s ± 55245.755op/s|20290854.583op/s ± 40344.395op/s|20333917.192op/s|20370374.411op/s|20399849.707op/s|20423819.497op/s|0.66% |-0.255 |-0.363 |0.27%|3906.465op/s|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |-------------------------------------------------------------------------------------------------------|--------------|----------------------------------------------------------|-------------------|------------------------|---------------| |normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000...|execution_time|[624.570µs; 624.869µs] or [-0.024%; +0.024%] |None |None |None | |normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000...|throughput |[1600346.129op/s; 1601100.858op/s] or [-0.024%; +0.024%] |None |None |None | |normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて |execution_time|[461.788µs; 461.898µs] or [-0.012%; +0.012%] |None |None |None | |normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて |throughput |[2164983.315op/s; 2165495.277op/s] or [-0.012%; +0.012%] |None |None |None | |normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters |execution_time|[178.329µs; 178.372µs] or [-0.012%; +0.012%] |None |None |None | |normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters |throughput |[5606269.434op/s; 5607605.998op/s] or [-0.012%; +0.012%] |None |None |None | |normalization/normalize_service/normalize_service/[empty string] |execution_time|[46.784µs; 46.814µs] or [-0.032%; +0.032%] |None |None |None | |normalization/normalize_service/normalize_service/[empty string] |throughput |[21361415.895op/s; 21374936.475op/s] or [-0.032%; +0.032%]|None |None |None | |normalization/normalize_service/normalize_service/test_ASCII |execution_time|[49.264µs; 49.301µs] or [-0.038%; +0.038%] |None |None |None | |normalization/normalize_service/normalize_service/test_ASCII |throughput |[20283607.436op/s; 20298920.497op/s] or [-0.038%; +0.038%]|None |None |None | ### Group 6 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |----------------------------|--------------|--------|------------------|------------------|--------|--------|--------|--------|--------------------|--------|--------|-----|-------|----|-----------| |redis/obfuscate_redis_string|execution_time|37.541µs|38.208µs ± 1.247µs|37.638µs ± 0.040µs|37.693µs|40.928µs|41.029µs|41.319µs|9.78% |1.706 |0.934 |3.26%|0.088µs|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |----------------------------|--------------|------------------------------------------|-------------------|------------------------|---------------| |redis/obfuscate_redis_string|execution_time|[38.035µs; 38.381µs] or [-0.452%; +0.452%]|None |None |None | ### Group 7 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |----------------------------------------------|--------------|---------|-------------------|-------------------|---------|---------|---------|---------|--------------------|--------|--------|-----|-------|----|-----------| |benching string interning on wordpress profile|execution_time|143.530µs|144.435µs ± 0.381µs|144.349µs ± 0.148µs|144.562µs|145.028µs|145.792µs|147.166µs|1.95% |2.661 |14.219 |0.26%|0.027µs|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |----------------------------------------------|--------------|--------------------------------------------|-------------------|------------------------|---------------| |benching string interning on wordpress profile|execution_time|[144.383µs; 144.488µs] or [-0.037%; +0.037%]|None |None |None | ### Group 8 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |--------------------|--------------|-------|-----------------|-----------------|-------|-------|--------|--------|--------------------|--------|--------|------|-------|----|-----------| |write only interface|execution_time|1.442µs|3.198µs ± 1.397µs|3.048µs ± 0.022µs|3.068µs|3.105µs|13.809µs|14.877µs|388.04% |7.604 |57.897 |43.57%|0.099µs|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |--------------------|--------------|----------------------------------------|-------------------|------------------------|---------------| |write only interface|execution_time|[3.004µs; 3.392µs] or [-6.054%; +6.054%]|None |None |None | ### Group 9 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |-------------------------------------------------------------------------------------------------------|--------------|----------------|---------------------------------|---------------------------------|----------------|----------------|----------------|----------------|--------------------|--------|--------|-----|-------------|----|-----------| |normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo...|execution_time|190.792µs |193.719µs ± 0.764µs |193.644µs ± 0.406µs |194.076µs |194.939µs |196.008µs |196.107µs |1.27% |0.353 |1.398 |0.39%|0.054µs |1 |200 | |normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo...|throughput |5099255.038op/s |5162194.474op/s ± 20326.968op/s |5164107.046op/s ± 10829.137op/s |5174843.361op/s |5189252.522op/s |5202698.012op/s |5241305.682op/s |1.49% |-0.314 |1.412 |0.39%|1437.334op/s |1 |200 | |normalization/normalize_name/normalize_name/bad-name |execution_time|18.170µs |18.204µs ± 0.027µs |18.189µs ± 0.014µs |18.224µs |18.237µs |18.280µs |18.316µs |0.70% |0.930 |0.834 |0.15%|0.002µs |1 |200 | |normalization/normalize_name/normalize_name/bad-name |throughput |54596770.462op/s|54933031.054op/s ± 81469.516op/s |54979244.173op/s ± 42376.293op/s |55001417.569op/s|55017828.807op/s|55027590.700op/s|55036800.030op/s|0.10% |-0.921 |0.796 |0.15%|5760.765op/s |1 |200 | |normalization/normalize_name/normalize_name/good |execution_time|11.294µs |11.351µs ± 0.034µs |11.350µs ± 0.017µs |11.366µs |11.403µs |11.428µs |11.584µs |2.07% |1.726 |9.768 |0.30%|0.002µs |1 |200 | |normalization/normalize_name/normalize_name/good |throughput |86325151.777op/s|88100716.483op/s ± 262546.026op/s|88109123.150op/s ± 132823.006op/s|88241888.942op/s|88469861.232op/s|88532889.544op/s|88543813.969op/s|0.49% |-1.649 |9.142 |0.30%|18564.808op/s|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |-------------------------------------------------------------------------------------------------------|--------------|----------------------------------------------------------|-------------------|------------------------|---------------| |normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo...|execution_time|[193.613µs; 193.825µs] or [-0.055%; +0.055%] |None |None |None | |normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo...|throughput |[5159377.351op/s; 5165011.596op/s] or [-0.055%; +0.055%] |None |None |None | |normalization/normalize_name/normalize_name/bad-name |execution_time|[18.200µs; 18.208µs] or [-0.021%; +0.021%] |None |None |None | |normalization/normalize_name/normalize_name/bad-name |throughput |[54921740.163op/s; 54944321.946op/s] or [-0.021%; +0.021%]|None |None |None | |normalization/normalize_name/normalize_name/good |execution_time|[11.346µs; 11.355µs] or [-0.042%; +0.042%] |None |None |None | |normalization/normalize_name/normalize_name/good |throughput |[88064330.129op/s; 88137102.837op/s] or [-0.041%; +0.041%]|None |None |None | ### Group 10 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |--------------------------------------|--------------|-------|-----------------|-----------------|-------|-------|-------|-------|--------------------|--------|--------|-----|-------|----|-----------| |concentrator/add_spans_to_concentrator|execution_time|9.083ms|9.113ms ± 0.015ms|9.111ms ± 0.009ms|9.122ms|9.138ms|9.155ms|9.188ms|0.84% |1.028 |3.246 |0.16%|0.001ms|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |--------------------------------------|--------------|----------------------------------------|-------------------|------------------------|---------------| |concentrator/add_spans_to_concentrator|execution_time|[9.111ms; 9.115ms] or [-0.023%; +0.023%]|None |None |None | ### Group 11 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |----------------------------------------|--------------|---------|--------------------|-------------------|---------|---------|---------|---------|--------------------|--------|--------|-----|-------|----|-----------| |normalization/normalize_trace/test_trace|execution_time|257.273ns|268.954ns ± 13.359ns|263.591ns ± 4.507ns|271.955ns|292.567ns|314.724ns|315.016ns|19.51% |1.854 |3.048 |4.95%|0.945ns|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |----------------------------------------|--------------|--------------------------------------------|-------------------|------------------------|---------------| |normalization/normalize_trace/test_trace|execution_time|[267.103ns; 270.806ns] or [-0.688%; +0.688%]|None |None |None | ### Group 12 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|------------------------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|dd111b0 |1729869403 |ivoanjo/prof-10656-crash-address-in-report| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |-----------------|--------------|--------|-------------------|------------------|--------|--------|--------|---------|--------------------|--------|--------|------|-------|----|-----------| |two way interface|execution_time|18.414µs|25.324µs ± 12.336µs|19.152µs ± 0.344µs|21.231µs|48.372µs|54.492µs|101.622µs|430.60% |2.439 |8.008 |48.59%|0.872µs|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |-----------------|--------------|------------------------------------------|-------------------|------------------------|---------------| |two way interface|execution_time|[23.615µs; 27.034µs] or [-6.751%; +6.751%]|None |None |None |

Baseline

Omitted due to size.

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 12.50000% with 35 lines in your changes missing coverage. Please review.

Project coverage is 71.77%. Comparing base (085a91a) to head (dd111b0).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #663 +/- ## ======================================= Coverage 71.76% 71.77% ======================================= Files 271 271 Lines 41032 41064 +32 ======================================= + Hits 29447 29472 +25 - Misses 11585 11592 +7 ``` | [Components](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [crashtracker](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `20.15% <12.50%> (-0.13%)` | :arrow_down: | | [crashtracker-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `8.97% <0.00%> (-0.10%)` | :arrow_down: | | [datadog-alloc](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `98.73% <ø> (ø)` | | | [data-pipeline](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `91.92% <ø> (ø)` | | | [data-pipeline-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `0.00% <ø> (ø)` | | | [ddcommon](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `82.74% <ø> (ø)` | | | [ddcommon-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `69.12% <ø> (ø)` | | | [ddtelemetry](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `59.10% <ø> (ø)` | | | [ddtelemetry-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `22.13% <ø> (ø)` | | | [dogstatsd](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `88.86% <ø> (ø)` | | | [dogstatsd-client](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `79.77% <ø> (ø)` | | | [ipc](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `82.65% <ø> (ø)` | | | [profiling](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `84.30% <ø> (ø)` | | | [profiling-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `77.46% <ø> (ø)` | | | [serverless](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `0.00% <ø> (ø)` | | | [sidecar](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `36.09% <ø> (ø)` | | | [sidecar-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `0.00% <ø> (ø)` | | | [spawn-worker](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `50.36% <ø> (ø)` | | | [tinybytes](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `94.77% <ø> (ø)` | | | [trace-mini-agent](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `72.45% <ø> (ø)` | | | [trace-normalization](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `98.25% <ø> (ø)` | | | [trace-obfuscation](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `95.77% <ø> (ø)` | | | [trace-protobuf](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `77.67% <ø> (ø)` | | | [trace-utils](https://app.codecov.io/gh/DataDog/libdatadog/pull/663/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `93.11% <ø> (ø)` | |
ivoanjo commented 1 month ago

Hmm... there's still two tests that hang and time out in CI:

test test_crash_tracking_bin_debug_stdin ... FAILED
test test_crash_tracking_bin_debug_unix_socket ... FAILED

I have no idea how to debug these tests :/ . Anyone has any hints on how to find what's failing?

ivoanjo commented 1 month ago

Renamed crash_address to faulting_address in https://github.com/DataDog/libdatadog/pull/663/commits/0d4bb98e732dce251a1d06a1ba5fa35b116fff4a . There's still 2 tests failing, I'm still looking into them.

ivoanjo commented 3 weeks ago

Unfortunately I wasn't able yet to figure out what's up with the failing tests... I've ping'd @danielsn to see if he has any idea on how to fix those.

nsrip-dd commented 1 week ago

Unfortunately I wasn't able yet to figure out what's up with the failing tests... I've ping'd @danielsn to see if he has any idea on how to fix those.

FWIW I tried those tests locally on an x86_64 Alpine image on the commit this PR is based on (67d4f7a) and main (a76c5ad as of this writing) and they still fail. If I comment out these lines they pass. Strangely though, the tests seem to be passing on main and a recent PR. So... I don't know why they fail, but I don't think this PR breaks them?

ivoanjo commented 1 week ago

FWIW I tried those tests locally on an x86_64 Alpine image on the commit this PR is based on (https://github.com/DataDog/libdatadog/commit/67d4f7a19afd7f7301423e400008d42cc9284c04) and main (https://github.com/DataDog/libdatadog/commit/a76c5ade40c8ac83418fc7ed6bb2f319a874b327 as of this writing) and they still fail. If I comment out these lines they pass. Strangely though, the tests seem to be passing on main and a https://github.com/DataDog/libdatadog/pull/680. So... I don't know why they fail, but I don't think this PR breaks them?

Thanks for giving it a stab! I wonder if the issue is still related to some of the test assertions, but I've found these tests are a bit weird... when they fail they don't give a lot of info; some of the fixes in this PR were kinda trial-and-error. :eyes:

(I've also merged main into this PR, to make sure it doesn't fall behind)

ivoanjo commented 1 week ago

I'm... still stuck on this one. I suspect it may be a real issue; specifically, I see the issue going away if I replace

        if !sig_info.is_null() && (signum == libc::SIGSEGV || signum == libc::SIGBUS) {
            unsafe { Some((*sig_info).si_addr() as usize) }
        }

with something else that does not touch the sig_info. I suspect it may have to do something with chaining the signal handlers. :(

ivoanjo commented 1 week ago

Ok so after investigation it turns out the failure in the tests was indeed a real issue -- that was caused by us being so close to the altstack limit in some cases that the small changes in this PR were the "straw that broke the camel's back".

Now that https://github.com/DataDog/libdatadog/pull/693 is merged, I've merged master into this PR and CI should finally be green.