[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: procfs crashing on shudown/reboot



On Fri, Apr 16, 2021 at 01:50:49PM +0200, Samuel Thibault wrote:
> That will build a procfs.static that you can settrans -a by hand.

Had to use settrans -fga to displace the original running translator.
Below is the backtrace of the core file.

Regards,
João

GNU gdb (Debian 10.1-2) 10.1.90.20210103-git
Copyright (C) 2021 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 "i686-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://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 procfs.static...

warning: core file may not match specified executable file.
[New process 689]
[New process 1]
[New process 2]
[New process 3]

warning: Unexpected size of section `.reg2/689' in core file.
Core was generated by `/root/procfs.static --compatible'.
Program terminated with signal SIGABRT, Aborted.

warning: Unexpected size of section `.reg2/689' in core file.
#0  0x080b91ec in mach_msg_trap ()
[Current thread is 1 (process 689)]

Thread 4 (process 3):
warning: Unexpected size of section `.reg2/3' in core file.
#0  0x080b91ec in mach_msg_trap ()
No symbol table info available.
#1  0x08071046 in mach_msg ()
No symbol table info available.
#2  0x08071399 in mach_msg_server_timeout ()
No symbol table info available.
#3  0x08068592 in thread_function (arg=0x0) at ../../libports/manage-multithread.c:259
        thread = {color = 1}
        master = <optimized out>
        timeout = 120000
        err = <optimized out>
        startover = <optimized out>
#4  0x0806c69f in entry_point (self=<optimized out>, start_routine=<optimized out>, arg=<optimized out>) at pt-create.c:62
No locals.
#5  0x00000000 in ?? ()
No symbol table info available.

Thread 3 (process 2):
warning: Unexpected size of section `.reg2/2' in core file.
#0  0x080b91ec in mach_msg_trap ()
No symbol table info available.
#1  0x08071046 in mach_msg ()
No symbol table info available.
#2  0x08118a2c in msg_sig_post ()
No symbol table info available.
#3  0x080d495c in kill_pid ()
No symbol table info available.
#4  0x080d4c86 in kill ()
No symbol table info available.
#5  0x080d3fda in raise ()
No symbol table info available.
#6  0x080482c8 in abort ()
No symbol table info available.
#7  0x08048170 in __assert_fail_base_backtrace (fmt=0x81301a0 "%s: %s:%u: %s: Assertion '%s' failed.\n", assertion=0x812f290 "! (r.hard == 1 && r.weak == 0) || !\"refcount detected use-after-free!\"", file=0x812f22c "../../libshouldbeinlibc/refcount.h", line=170, function=0x812f3a8 <__PRETTY_FUNCTION__.3> "refcounts_ref") at ../../libshouldbeinlibc/assert-backtrace.c:57
        size = 128
        skip = 2
        nptrs = 16
        buffer = 0x2811990
#8  0x0806c53d in __assert_fail_backtrace (assertion=0x812f290 "! (r.hard == 1 && r.weak == 0) || !\"refcount detected use-after-free!\"", file=0x812f22c "../../libshouldbeinlibc/refcount.h", line=170, function=0x812f3a8 <__PRETTY_FUNCTION__.3> "refcounts_ref") at ../../libshouldbeinlibc/assert-backtrace.c:64
No locals.
#9  0x0804e69e in refcounts_ref (result=0x0, ref=0x10002c70) at ../../libshouldbeinlibc/refcount.h:170
        r = {hard = <optimized out>, weak = <optimized out>}
        r = {hard = <optimized out>, weak = <optimized out>}
        __PRETTY_FUNCTION__ = "refcounts_ref"
#10 netfs_nref (np=0x10002bc0) at ../../libnetfs/nref.c:26
No locals.
#11 0x0804b514 in rootdir_make_translated_node (dir_hook=0x100016d0, entry_hook=0x8190180 <__compound_literal.8>) at ../../procfs/rootdir.c:674
        ops = 0x8190180 <__compound_literal.8>
        np = 0x10002bc0
        prev = <optimized out>
#12 0x08049803 in procfs_dir_lookup (hook=0x10001950, name=0x2811efc "mounts", np=0x2811d98) at ../../procfs/procfs_dir.c:88
        dir = 0x10001950
        ent = 0x812eb40 <rootdir_entries+128>
#13 0x08048f30 in procfs_lookup (np=0x10001980, name=0x2811efc "mounts", npp=0x2811d98) at ../../procfs/procfs.c:185
        err = <optimized out>
#14 0x0804b605 in dircat_lookup (hook=0x10001a90, name=0x2811efc "mounts", np=0x2811d98) at ../../procfs/dircat.c:76
        dcn = 0x10001a90
        err = <optimized out>
        i = 1
#15 0x08048f30 in procfs_lookup (np=0x10001ac0, name=0x2811efc "mounts", npp=0x2811d98) at ../../procfs/procfs.c:185
        err = <optimized out>
#16 0x0804948f in netfs_attempt_lookup (user=0x102170, dir=0x10001ac0, name=0x2811efc "mounts", np=0x2811d98) at ../../procfs/netfs.c:212
        err = <optimized out>
#17 0x0805906a in netfs_S_dir_lookup (dircred=<optimized out>, filename=0x2811efc "mounts", flags=<optimized out>, mode=<optimized out>, do_retry=<optimized out>, retry_name=<optimized out>, retry_port=<optimized out>, retry_port_type=<optimized out>) at ../../libnetfs/dir-lookup.c:175
        create = <optimized out>
        excl = <optimized out>
        mustbedir = <optimized out>
        lastcomp = <optimized out>
        newnode = <optimized out>
        nsymlinks = <optimized out>
        dnp = 0x10001ac0
        np = 0x0
        nextname = <optimized out>
        relpath = <optimized out>
        err = <optimized out>
        newpi = <optimized out>
        user = 0x8055638 <_Xfsys_getroot+456>
        filename_start = <optimized out>
        __PRETTY_FUNCTION__ = "netfs_S_dir_lookup"
        rendezvous = <optimized out>
        lock = {l_type = 2, l_whence = 0, l_start = 1152952085042437076, l_len = 4336992028, l_pid = 42024748}
#18 0x08052265 in _Xdir_lookup (InHeadP=0x2811ee0, OutHeadP=0x2813ef0) at fsServer.c:1840
        In0P = 0x2811ee0
        OutP = 0x2813ef0
        msgh_simple = <optimized out>
        file_nameCheck = {msgt_name = 12, msgt_size = 8, msgt_number = 1024, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}
        flagsCheck = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}
        modeCheck = {msgt_name = 2, msgt_size = 32, msgt_number = 1, msgt_inline = 1, msgt_longform = 0, msgt_deallocate = 0, msgt_unused = 0}
        do_retryType = {msgt_name = <optimized out>, msgt_size = <optimized out>, msgt_number = <optimized out>, msgt_inline = <optimized out>, msgt_longform = <optimized out>, msgt_deallocate = <optimized out>, msgt_unused = <optimized out>}
        retry_nameType = {msgt_name = <optimized out>, msgt_size = <optimized out>, msgt_number = <optimized out>, msgt_inline = <optimized out>, msgt_longform = <optimized out>, msgt_deallocate = <optimized out>, msgt_unused = <optimized out>}
        resultType = {msgt_name = <optimized out>, msgt_size = <optimized out>, msgt_number = <optimized out>, msgt_inline = <optimized out>, msgt_longform = <optimized out>, msgt_deallocate = <optimized out>, msgt_unused = <optimized out>}
        start_dir = 0x102230
        resultPoly = 20
#19 0x0804eb3a in netfs_demuxer (inp=0x2811ee0, outp=0x2813ef0) at ../../libnetfs/demuxer.c:44
        routine = <optimized out>
#20 0x08068458 in internal_demuxer (outheadp=0x2813ef0, inp=0x2811ee0) at ../../libports/manage-multithread.c:212
        cancel_threshold = <optimized out>
        err = <optimized out>
        status = <optimized out>
        pi = 0x102230
        link = {thread = 26, next = 0x0, prevp = 0x10224c, notifies = 0x0, interrupted_next = 0x8071019 <mach_msg+9>}
        outp = 0x2813ef0
        status = <optimized out>
        pi = <optimized out>
        link = {thread = <optimized out>, next = <optimized out>, prevp = <optimized out>, notifies = <optimized out>, interrupted_next = <optimized out>}
        outp = <optimized out>
        RetCodeType = {msgt_name = <optimized out>, msgt_size = <optimized out>, msgt_number = <optimized out>, msgt_inline = <optimized out>, msgt_longform = <optimized out>, msgt_deallocate = <optimized out>, msgt_unused = <optimized out>}
        pthread_id = <optimized out>
        err = <optimized out>
        err = <optimized out>
        cancel_threshold = <optimized out>
#21 synchronized_demuxer (inp=0x2811ee0, outheadp=0x2813ef0) at ../../libports/manage-multithread.c:239
        r = <optimized out>
#22 0x080713b0 in mach_msg_server_timeout ()
No symbol table info available.
#23 0x08068592 in thread_function (arg=0x0) at ../../libports/manage-multithread.c:259
        thread = {color = 1}
        master = <optimized out>
        timeout = 120000
        err = <optimized out>
        startover = <optimized out>
#24 0x0806c69f in entry_point (self=<optimized out>, start_routine=<optimized out>, arg=<optimized out>) at pt-create.c:62
No locals.
#25 0x00000000 in ?? ()
No symbol table info available.

Thread 2 (process 1):
warning: Unexpected size of section `.reg2/1' in core file.
#0  0x080b91ec in mach_msg_trap ()
No symbol table info available.
#1  0x08071046 in mach_msg ()
No symbol table info available.
#2  0x0811a92e in crash_dump_task ()
No symbol table info available.
#3  0x080788c8 in post_signal ()
No symbol table info available.
#4  0x08079395 in _hurd_internal_post_signal ()
No symbol table info available.
#5  0x08079635 in _S_msg_sig_post ()
No symbol table info available.
#6  0x081205b5 in _Xmsg_sig_post ()
No symbol table info available.
#7  0x08120927 in _S_msg_server ()
No symbol table info available.
#8  0x080bc155 in msgport_server ()
No symbol table info available.
#9  0x080713b0 in mach_msg_server_timeout ()
No symbol table info available.
#10 0x080714d8 in mach_msg_server ()
No symbol table info available.
#11 0x080bc1ce in _hurd_msgport_receive ()
No symbol table info available.
#12 0x0806c69f in entry_point (self=<optimized out>, start_routine=<optimized out>, arg=<optimized out>) at pt-create.c:62
No locals.
#13 0x00000000 in ?? ()
No symbol table info available.

Thread 1 (process 689):
#0  0x080b91ec in mach_msg_trap ()
No symbol table info available.
#1  0x08071046 in mach_msg ()
No symbol table info available.
#2  0x08071399 in mach_msg_server_timeout ()
No symbol table info available.
#3  0x08068592 in thread_function (arg=0x1) at ../../libports/manage-multithread.c:259
        thread = {color = 1}
        master = <optimized out>
        timeout = 0
        err = <optimized out>
        startover = <optimized out>
#4  0x080687fe in ports_manage_port_operations_multithread (bucket=0x100017c0, demuxer=0x804eb10 <netfs_demuxer>, thread_timeout=120000, global_timeout=600000, hook=0x0) at ../../libports/manage-multithread.c:290
        totalthreads = 3
        nreqthreads = 2
        attr = {__schedparam = {sched_priority = 0}, __stackaddr = 0x0, __stacksize = 65536, __guardsize = 1, __detachstate = __PTHREAD_CREATE_JOINABLE, __inheritsched = __PTHREAD_EXPLICIT_SCHED, __contentionscope = __PTHREAD_SCOPE_SYSTEM, __schedpolicy = 0}
#5  0x0804e3c7 in netfs_server_loop () at ../../libnetfs/init-loop.c:33
        err = <optimized out>
#6  0x080489e0 in main (argc=2, argv=0x2003ee4) at ../../procfs/main.c:313
        pc = 0x100016d0
        bootstrap = 10
        err = <optimized out>
        __PRETTY_FUNCTION__ = "main"

Reply to: