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

Cargo Attempts to mmap 139656422572032, bytes of memory then dies with SIGSEGV #1233

Closed
dkhenry opened this issue Jan 27, 2015 · 5 comments
Closed

Comments

@dkhenry
Copy link

dkhenry commented Jan 27, 2015

While attempting to build https://github.com/danburkert/lmdb-rs.git Cargo will exit with an error 4. While running strace I see the error being encountered is

[pid 27781] mmap(NULL, 139656422572032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
[pid 27781] mmap(NULL, 139656422572032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
[pid 27781] brk(0)                      = 0x7f0450606000
[pid 27781] brk(0xfe089bd61000)         = 0x7f0450606000
[pid 27781] mmap(NULL, 139656422703104, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)

After these errors there is a SIGSEGV and then the program exits.

Here is the verison information this is occuring on

cargo 0.0.1-pre-nightly (bb28e71 2015-01-22 06:06:34 +0000)
@alexcrichton
Copy link
Member

I can't seem to get bindgen to cooperate with me at all, so I can't reproduce :(

A few questions though:

  • Can you minimize this at all? Not requiring bindgen would be super helpful for me
  • Can you get a stack trace at the time of the segfault?
  • Can you gist the full logs of the cargo build?

@dkhenry
Copy link
Author

dkhenry commented Jan 27, 2015

I haven't been able to get it to happen outside of bindgen yet, but I am working on it

Here is the stack trace
Breakpoint 1, 0x00007ffff70b9620 in mmap64 () from /lib64/libc.so.6
#0 0x00007ffff70b9620 in mmap64 () from /lib64/libc.so.6
#1 0x0000555555aebdfb in je_chunk_alloc_mmap ()
#2 0x0000555555adab50 in chunk_alloc_core ()
#3 0x0000555555adac2f in je_chunk_alloc_arena ()
#4 0x0000555555adf39e in arena_chunk_init_hard ()
#5 0x0000555555ae42a2 in je_arena_malloc_large ()
#6 0x0000555555acf04d in je_mallocx ()
#7 0x0000555555a9dc41 in thunk::F.Invoke$LT$A$C$$u{20}R$GT$::invoke::h9970043498555055643 ()
#8 0x0000555555a9c7ef in rt::unwind::try::try_fn::h2573532462187215149 ()
#9 0x0000555555ac59c9 in rust_try_inner ()
#10 0x0000555555ac59b6 in rust_try ()
#11 0x0000555555a9d305 in thunk::F.Invoke$LT$A$C$$u{20}R$GT$::invoke::h4483539203640032782 ()
#12 0x0000555555abff0f in sys::thread::thread_start::h4faa993964f784ad5Nw ()
#13 0x00007ffff75a5ee5 in start_thread () from /lib64/libpthread.so.0
#14 0x00007ffff70beb8d in clone () from /lib64/libc.so.6

Here is the full gist of the run its kinda long

https://gist.github.com/210518b1ae5084ddeef4.git

@alexcrichton
Copy link
Member

Does this still reproduce?

@dkhenry
Copy link
Author

dkhenry commented May 19, 2015

Haven't tried it in a while. I will give it a whirl and see if I can get it to break.

@alexcrichton
Copy link
Member

Ok, haven't seen this in awhile so I'm gonna close.

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