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

Core dump occurs sometimes when drop for bytes #575

Open
tryor opened this issue Nov 7, 2022 · 2 comments
Open

Core dump occurs sometimes when drop for bytes #575

tryor opened this issue Nov 7, 2022 · 2 comments

Comments

@tryor
Copy link

tryor commented Nov 7, 2022

When I use bytes, I sometimes get a coredump, but I don't know what the possible cause is.

Bytes version: 0.5.6

Where to use bytes in my project:

  • my project
  • tokio v0.2.25
  • tokio-util v0.2.0
  • hyper v0.13.10
  • reqwest v0.10.10
  • prost v0.6.1
  • tonic v0.3.1
  • warp v0.2.5
  • bytestring v0.1.5

ALLOC: jemallocator = "0.3.2"

Rust toolchains: 1.64-x86_64-unknown-linux-gnu

The GDB trace is as follows:

Program terminated with signal SIGSEGV, Segmentation fault.
Dwarf Error: Cannot find DIE at 0x230 referenced from DIE at 0x171f07 [in module /root/myprogram]
#-1 0x00000000009e8503 in _$LT$bytes..bytes..Bytes$u20$as$u20$core..ops..drop..Drop$GT$::drop::h3588b858d9340711 (self=<optimized out>)
    at /cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/bytes-0.5.6/src/bytes.rs:492

(gdb) disassemble

   0x00000000009e84e7 <+87>:    mov    0x28(%r14),%rdi
   0x00000000009e84eb <+91>:    xor    %edx,%edx
   0x00000000009e84ed <+93>:    callq  *0x9b2945(%rip)        # 0x139ae38
   0x00000000009e84f3 <+99>:    mov    0x58(%r14),%rax
   0x00000000009e84f7 <+103>:   lea    0x50(%r14),%rdi
   0x00000000009e84fb <+107>:   mov    0x40(%r14),%rsi
   0x00000000009e84ff <+111>:   mov    0x48(%r14),%rdx
=> 0x00000000009e8503 <+115>:   callq  *0x8(%rax)
   0x00000000009e8506 <+118>:   mov    0x78(%r14),%rax
   0x00000000009e850a <+122>:   lea    0x70(%r14),%rdi
   0x00000000009e850e <+126>:   mov    0x60(%r14),%rsi
   0x00000000009e8512 <+130>:   mov    0x68(%r14),%rdx
   0x00000000009e8516 <+134>:   callq  *0x8(%rax)

##564

@Darksonn
Copy link
Contributor

Darksonn commented Nov 9, 2022

It's hard to say what the issue is, but it seems like it only affects the old v0.5.x series considering that we now have two bug reports that use the older version.

@tryor
Copy link
Author

tryor commented Nov 10, 2022

In addition, musl is also used, target=x86_64-unknown-linux-musl. Hope that helps with the positioning problem

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

No branches or pull requests

2 participants