Skip to content

Segfaults on FreeBSD in some cases since 1.37.0 #64013

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
andoriyu opened this issue Aug 30, 2019 · 3 comments
Closed

Segfaults on FreeBSD in some cases since 1.37.0 #64013

andoriyu opened this issue Aug 30, 2019 · 3 comments

Comments

@andoriyu
Copy link
Contributor

I have a crate that links to library in base for FreeBSD, up until 1.37 it was working fine. Since 1.37 and after it started segfaulting on certain calls.

I can't reproduce it outside of FreeBSD, but here is is the "minimal" example.

Here is backtrace:

GNU gdb (GDB) 8.3 [GDB v8.3 for FreeBSD]
Copyright (C) 2019 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-portbld-freebsd12.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from target/debug/examples/libvn_sigsegv...
warning: Unsupported auto-load script at offset 0 in section .debug_gdb_scripts
of file /usr/home/andoriyu/dev/github.com/Inner-Heaven/libnv-rs/target/debug/examples/libvn_sigsegv.
Use `info auto-load python-scripts [REGEXP]' to list them.
(gdb) run
Starting program: /usr/home/andoriyu/dev/github.com/Inner-Heaven/libnv-rs/target/debug/examples/libvn_sigsegv

Program received signal SIGSEGV, Segmentation fault.
0x00000008010addc3 in nvlist_exists () from /lib/libnvpair.so.2
(gdb) bt
#0  0x00000008010addc3 in nvlist_exists () from /lib/libnvpair.so.2
warning: (Internal error: pc 0x1033179 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x1032f90 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x1033179 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x1033179 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x1033179 in read in psymtab, but not in symtab.)

#1  0x000000000103317a in libnv::libnv::NvList::contains_key (warning: (Internal error: pc 0x1033179 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x1033179 in read in psymtab, but not in symtab.)

self=0x7fffffffe668, warning: (Internal error: pc 0x1033179 in read in psymtab, but not in symtab.)

name=...) at src/libnv.rs:450
#2  0x0000000001032442 in libvn_sigsegv::main () at examples/libvn_sigsegv.rs:10

OS: FreeBSD 3558 12.0-RELEASE-p10 FreeBSD 12.0-RELEASE-p10 GENERIC amd64
Rust: rustc 1.37.0 (eae3437 2019-08-13)

I comfirmed that it was working between 1.30.0 and 1.36.0 (inclusive).

@andoriyu
Copy link
Contributor Author

andoriyu commented Aug 30, 2019

After digging into this a little bit: this only happens with rust installed from rustup, version from ports works fine.

Err, minimal test works now, but full test suite still segfaults.

@jonas-schievink
Copy link
Contributor

Presumably a duplicate of #64006, so closing in favor of that

@andoriyu
Copy link
Contributor Author

@jonas-schievink that's what I thought. I wasn't sure because the other issue about build.rs and this one is at runtime.

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