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

if “logs.logLevel.audio debug” then “Error in `.': corrupted double-linked list:” #641

Closed
illwieckz opened this issue Feb 27, 2015 · 5 comments
Assignees

Comments

@illwieckz
Copy link
Member

Hi, I'm running Unvanquished this way:

daemon +set logs.logLevel.common.commands debug +set logs.logLevel.audio debug +nocurses +set vm.cgame.type 4 +set vm.game.type 4 +devmap mapname

And sometime at quit I get that:

]*** Error in `.': corrupted double-linked list: 0x000000000ab02520 ***
Received signal 6

Then daemon is stuck. If I kill it, it prints:

DOUBLE SIGNAL FAULT: Received signal 15, exiting...
Received signal 15

But does not exit, only kill -9 is able to kill it.

This behavior appeared since I use +set logs.logLevel.audio debug, with +set logs.logLevel.common.commands debug I never had such error.

@illwieckz
Copy link
Member Author

backtrace:

]*** Error in `daemon': corrupted double-linked list: 0x000000000a58c930 ***

Program received signal SIGABRT, Aborted.
0x00007ffff3a3be37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.
(gdb) bt
#0  0x00007ffff3a3be37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff3a3d528 in __GI_abort () at abort.c:89
#2  0x00007ffff3a7db04 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff3b86a80 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff3a84542 in malloc_printerr (ptr=<optimized out>, str=0x7ffff3b82b3c "corrupted double-linked list", action=1) at malloc.c:4996
#4  malloc_consolidate (av=av@entry=0x7ffff3dc3760 <main_arena>) at malloc.c:4165
#5  0x00007ffff3a85013 in _int_free (av=0x7ffff3dc3760 <main_arena>, p=<optimized out>, have_lock=0) at malloc.c:4057
#6  0x000000000045b89b in __tcf_0 ()
#7  0x00007ffff3a3f6a9 in __run_exit_handlers (status=0, listp=0x7ffff3dc36c8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#8  0x00007ffff3a3f6f5 in __GI_exit (status=<optimized out>) at exit.c:104
#9  0x000000000047c2e9 in Sys_Exit(int) ()
#10 0x000000000047c52b in Sys_Quit() ()
#11 0x0000000000456628 in Com_Quit_f() ()
#12 0x00000000004545b9 in ProxyCmd::Run(Cmd::Args const&) const ()
#13 0x000000000042e0c6 in Cmd::ExecuteCommand(Str::BasicStringRef<char>, bool, Cmd::Environment*) ()
#14 0x000000000042ed14 in Cmd::ExecuteCommandBuffer() ()
#15 0x000000000045763c in Com_Frame(void (*)(), void (*)()) ()
#16 0x0000000000419317 in main ()

@Kangz Kangz self-assigned this Feb 27, 2015
@illwieckz
Copy link
Member Author

Hi someone asked me to test it on 0.37.0, the bug is still there:

]*** Error in `daemon': corrupted double-linked list: 0x000000000a473d40 ***

Program received signal SIGABRT, Aborted.
0x00007ffff3be7e37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.
(gdb) bt
#0  0x00007ffff3be7e37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff3be9528 in __GI_abort () at abort.c:89
#2  0x00007ffff3c29b04 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff3d32a80 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff3c30542 in malloc_printerr (ptr=<optimized out>, str=0x7ffff3d2eb3c "corrupted double-linked list", action=1) at malloc.c:4996
#4  malloc_consolidate (av=av@entry=0x7ffff3f6f760 <main_arena>) at malloc.c:4165
#5  0x00007ffff3c31013 in _int_free (av=0x7ffff3f6f760 <main_arena>, p=<optimized out>, have_lock=0) at malloc.c:4057
#6  0x0000000000470241 in __tcf_0 ()
#7  0x00007ffff3beb6a9 in __run_exit_handlers (status=1, listp=0x7ffff3f6f6c8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#8  0x00007ffff3beb6f5 in __GI_exit (status=<optimized out>) at exit.c:104
#9  0x000000000045b9ba in Sys::Error(Str::BasicStringRef<char>) ()
#10 0x000000000045d73e in void Sys::Error<char const*>(Str::BasicStringRef<char>, char const*&&) ()
#11 0x0000000000423282 in main ()

@Kangz
Copy link
Member

Kangz commented Mar 31, 2015

Heads-up: I investigated this and while I cannot make sense of the error, I think it is something along the lines of: the order of global destructors is undefined and that the logger data destructor is called before this. @Amanieu would you be ok adding a global per process "processTerminating" flag so that we can 1) skip some destructors to quit faster (no need to free things after all) 2) not use some systems that might already have been deinitialized?

@Amanieu
Copy link
Contributor

Amanieu commented Apr 1, 2015

@Kangz feel free to add the flag, I have no objections. You could even use it to make the operator delete override a no-op (src/common/System.cpp).

As for this bug, if you can reproduce it, I think it would be helpful to do so while running under valgrind.

@Kangz
Copy link
Member

Kangz commented Apr 13, 2015

Fixed in 01fb67b

@Kangz Kangz closed this as completed Apr 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants