Skip to content

Segfaults on FreeBSD in some cases since 1.37.0 #64013

Closed
@andoriyu

Description

@andoriyu

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions