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

range start index 4 out of range #1460

Closed
proukornew opened this issue Dec 27, 2024 · 11 comments · Fixed by #1464
Closed

range start index 4 out of range #1460

proukornew opened this issue Dec 27, 2024 · 11 comments · Fixed by #1464
Labels
backend bug Something isn't working
Milestone

Comments

@proukornew
Copy link

Describe the bug
thread 'tracer-11332' panicked at crates\trippy-core\src\state.rs:636:59:
range start index 4 out of range for slice of length 2
stack backtrace:
0: 0x7ff7b2badfb3 -
1: 0x7ff7b29e486a -
2: 0x7ff7b2b9d3e7 -
3: 0x7ff7b2baf9a5 -
4: 0x7ff7b2baf7dd -
5: 0x7ff7b2baf4ed -
6: 0x7ff7b2bafbb1 -
7: 0x7ff7b2bafa89 -
8: 0x7ff7b2baf9df -
9: 0x7ff7b2baf9ce -
10: 0x7ff7b2e9b5d1 -
11: 0x7ff7b2e9b53e -
12: 0x7ff7b2c575d8 -
13: 0x7ff7b2c3e6ce -
14: 0x7ff7b2c4bf93 -
15: 0x7ff7b2c5356e -
16: 0x7ff7b2c530d2 -
17: 0x7ff7b2bad54d -
18: 0x7ffaf1ce7034 - BaseThreadInitThunk
19: 0x7ffaf28a2651 - RtlUserThreadStart
To Reproduce

trip -6 --udp -R dublin --tui-custom-columns holsravbwdtC -m pretty -C5 -S5000 -P33437 -i20msec -T200msec -f4 -t 5 (some ipv6prefix)::1
Bug +/- stable with same parameters on some ports&ips. But disappears with (some ipv6prefix)::2 or changing -S or -P.
Key problem parameter(s) -f and -t (slicing)

@c-git
Copy link
Collaborator

c-git commented Dec 27, 2024

Thank you very much for reporting this. Can you do trip -V and give me the version of trippy you are running please?

@justin0u0
Copy link

I got the same issue with version 0.12.1.

Simply trip intel.com -f 20 sometimes panick with range start index 19 out of range for slice of length 4.

@c-git
Copy link
Collaborator

c-git commented Dec 31, 2024

Thank you @justin0u0. Appreciate the information. If it happens again and it's possible for you to capture the panic message that would also be appreciated but no worries what you provided so far already helps.

@justin0u0
Copy link

Hi @c-git, this is what I got with RUST_BACKTRACE=full trip intel.com -f 20. Hope this help!

thread 'tracer-24894' panicked at crates/trippy-core/src/state.rs:636:59:
range start index 19 out of range for slice of length 4
stack backtrace:
   0:     0x5ee62beb8c29 - <unknown>
   1:     0x5ee62bd0fa80 - <unknown>
   2:     0x5ee62bea87ac - <unknown>
   3:     0x5ee62beb89be - <unknown>
   4:     0x5ee62be98c00 - <unknown>
   5:     0x5ee62be98743 - <unknown>
   6:     0x5ee62be9947e - <unknown>
   7:     0x5ee62beb90b0 - <unknown>
   8:     0x5ee62beb9006 - <unknown>
   9:     0x5ee62be98f7f - <unknown>
  10:     0x5ee62bc62544 - <unknown>
  11:     0x5ee62bc62ad1 - <unknown>
  12:     0x5ee62bf51c5a - <unknown>
  13:     0x5ee62bf393c2 - <unknown>
  14:     0x5ee62bf55491 - <unknown>
  15:     0x5ee62bf560a4 - <unknown>
  16:     0x5ee62bf56312 - <unknown>
  17:     0x5ee62be9c0d5 - <unknown>
  18:     0x7d7db0894ac3 - start_thread
                               at ./nptl/pthread_create.c:442:8
  19:     0x7d7db0926850 - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  20:                0x0 - <unknown>

@c-git
Copy link
Collaborator

c-git commented Dec 31, 2024

Yes it does, thank you.

@fujiapple852 fujiapple852 added bug Something isn't working and removed triage labels Jan 2, 2025
@fujiapple852 fujiapple852 self-assigned this Jan 2, 2025
@fujiapple852 fujiapple852 added this to the 0.12.2 milestone Jan 2, 2025
@fujiapple852
Copy link
Owner

@proukornew @justin0u0 thank you both for the bug report.

This is a regression in 0.12.0. It was caused by #1288.

I have a fix in #1464. The logic here is bit tricky so I've added fair extensive test cases.

The fix will be included in an upcoming 0.12.2 patch release.

@fujiapple852
Copy link
Owner

fujiapple852 commented Jan 2, 2025

It may able to be worth enabling debug symbols for release builds, something I have previously considered.

In this case it was obviously enough from the error message (thread 'tracer-11332' panicked at crates\trippy-core\src\state.rs:636:59) and the description given ("Key problem parameter(s) -f and -t (slicing)") but that will not always be the case.

Raised an issue: #1465

Edit: I think perhaps strip may have been run on the executables? Even without debug symbols, I get a reasonable backtrace on Linux and macOS. I would be very interested to know how you obtained trip(.exe) for both examples above (which appear to be on Windows and Linux respectively).

@justin0u0
Copy link

Edit: I think perhaps strip may have been run on the executables? Even without debug symbols, I get a reasonable backtrace on Linux and macOS. I would be very interested to know how you obtained trip(.exe) for both examples above (which appear to be on Windows and Linux respectively).

My executable was installed using the Ubuntu PPA.

@fujiapple852
Copy link
Owner

Thanks, the PPA does strip symbols:

trippy/ubuntu-ppa/rules

Lines 18 to 19 in 8bdb6a5

override_dh_strip:
dh_strip --no-automatic-dbgsym

I don't know if that is necessary for PPA or not.

@proukornew
Copy link
Author

shindows o_O

@fujiapple852
Copy link
Owner

@proukornew can you tell us how did you install it on Windows? (i.e. winget, scoop, choco, binary download, from source etc?). I'd like to understand if any of those strip (or whatever the equivalent is on Windows) the binary of symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants