Skip to content

rust pkg --help segfaults #9207

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

Closed
glycerine opened this issue Sep 15, 2013 · 1 comment
Closed

rust pkg --help segfaults #9207

glycerine opened this issue Sep 15, 2013 · 1 comment

Comments

@glycerine
Copy link

ubuntu 12.04 amd64:

$ rustc -v
rustc 0.8-pre (124eb21 2013-09-06 23:35:57 -0700)
host: x86_64-unknown-linux-gnu
/rust$ rust pkg --help
Usage: rustpkg [options] <cmd> [args..]

Where <cmd> is one of:
    build, clean, do, info, install, list, prefer, test, uninstall, unprefer

Options:

    -h, --help                  Display this message
    <cmd> -h, <cmd> --help      Display help for <cmd>
pthread_mutex_lock(&_mutex) failed in src/rt/sync/lock_and_signal.cpp at line 79, result = 22 (Invalid argument)
Aborted (core dumped)
/rust$ 

gdb on the core dump for a backtrace:

me@host:/rust$ gdb rust core
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/local/bin/rust...(no debugging symbols found)...done.
[New LWP 16300]
[New LWP 16296]
[New LWP 16295]
[New LWP 16293]
[New LWP 16298]
[New LWP 16297]
[New LWP 16301]
[New LWP 16299]
[New LWP 16294]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `rust pkg --help'.
Program terminated with signal 6, Aborted.
#0  0x00007f0d3cdc6425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007f0d3cdc6425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007f0d3cdc9b8b in __GI_abort () at abort.c:91
#2  0x00007f0d3d15b8d7 in lock (this=<optimized out>, this=<optimized out>) at src/rt/sync/lock_and_signal.cpp:79
#3  scoped_lock::scoped_lock (this=<optimized out>, lock=...) at src/rt/sync/lock_and_signal.cpp:163
#4  0x00007f0d3d15c3e5 in rust_initialize_rt_tls_key (key=0x7f0d3fa578f0) at src/rt/rust_builtin.cpp:465
#5  0x00007f0d3f748cb6 in rt::sched::Scheduler::bootstrap::_d21ac889de393218Ha8::v0.8$x2dpre ()
   from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#6  0x00007f0d3f7d0ed4 in rt::run_::anon::expr_fn_49737 ()
   from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#7  0x00007f0d3d15baea in rust_thread_start (ptr=0x3fa5) at src/rt/sync/rust_thread.cpp:36
#8  0x00007f0d3cb7ae9a in start_thread (arg=0x7f0d391fd700) at pthread_create.c:308
#9  0x00007f0d3ce83ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()
(gdb) i th
  Id   Target Id         Frame 
  9    Thread 0x7f0d3ffab700 (LWP 16294) 0x00007f0d3b8a41e0 in llvm::cl::opt<(anonymous namespace)::VersionPrinter, true, llvm::cl::parser<bool> >::~opt() () from /usr/local/bin/../lib/./librustllvm.so
  8    Thread 0x7f0d392fe700 (LWP 16299) syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:39
  7    Thread 0x7f0d38bff700 (LWP 16301) __lll_lock_wait_private ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:93
  6    Thread 0x7f0d39d6d700 (LWP 16297) syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:39
  5    Thread 0x7f0d393ff700 (LWP 16298) syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:39
  4    Thread 0x7f0d3ffad780 (LWP 16293) 0x00007f0d3cb7c148 in pthread_join (threadid=139694884697856, 
    thread_return=0x0) at pthread_join.c:89
  3    Thread 0x7f0d39f6f700 (LWP 16295) syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:39
  2    Thread 0x7f0d39e6e700 (LWP 16296) syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:39
* 1    Thread 0x7f0d391fd700 (LWP 16300) 0x00007f0d3cdc6425 in __GI_raise (sig=<optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
(gdb) 
@alexcrichton
Copy link
Member

I believe that this is a dupe of #8870, but thanks for the report!

flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 28, 2022
Check for `todo!` on every expression in `SpanlessEq`

fixes rust-lang#9204
changelog: [`match_same_arms`](https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms): Don't lint on arms with `todo!`
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