RejectedSoftware Forums

Sign up

0x0000000000aff7bf in vibe.core.driver.deleteEventDriver()

hi all

i have a long running process in my vibe.d app (as a command line option - vibe is not even started). i don't know why and how vibe interferes with it but i get the following segfault (on freebsd) and the errors i get is becoming so annoying, i'm going to port my program to another language.

#0  0x0000000000aff7bf in vibe.core.driver.deleteEventDriver() () at ../../../../home/search-master/.dub/packages/vibe-d-0.8.1/vibe-d/core/vibe/core/driver.d:54
54			s_driver.dispose();
[Current thread is 1 (LWP 100738)]
(gdb) bt full
#0  0x0000000000aff7bf in vibe.core.driver.deleteEventDriver() () at ../../../../home/search-master/.dub/packages/vibe-d-0.8.1/vibe-d/core/vibe/core/driver.d:54
No locals.
#1  0x0000000000af900d in vibe.core.core._staticDtor32() () at ../../../../home/search-master/.dub/packages/vibe-d-0.8.1/vibe-d/core/vibe/core/core.d:1792
        thisthr = 0x801084300
        is_main_thread = false
        __sync4974 = 0x801086540
        idx = 1
        __dollar = 4734619037844522536
        __dollar = 7
        __pitmp4980 = 7
        __flag = 6
        __EAX = 0x0
        __exception_object = 0xbf61b2 <rt.lifetime._staticDtor423()+50>
#2  0x0000000000af90cd in vibe.core.core.__moddtor() ()
No locals.
#3  0x0000000000bf8601 in rt.minfo.runModuleFuncsRev!(rt.minfo.ModuleGroup.runTlsDtors().__lambda1).runModuleFuncsRev(const(immutable(object.ModuleInfo)*)[]) ()
No symbol table info available.
#4  0x0000000000bf8301 in rt.minfo.ModuleGroup.runTlsDtors() ()
No symbol table info available.
#5  0x0000000000ba37dc in rt.minfo.rt_moduleTlsDtor().__foreachbody1(ref rt.sections_elf_shared.DSO) ()
No symbol table info available.
#6  0x0000000000ba3bc5 in rt.sections_elf_shared.DSO.opApplyReverse(scope int(ref rt.sections_elf_shared.DSO) delegate) ()
No symbol table info available.
#7  0x0000000000ba37c5 in rt_moduleTlsDtor ()
No symbol table info available.
#8  0x0000000000beaf57 in thread_entryPoint ()
No symbol table info available.
#9  0x00000008020e3bc5 in ?? () from /lib/libthr.so.3
No symbol table info available.
#10 0x0000000000000000 in ?? ()
No symbol table info available.
Backtrace stopped: Cannot access memory at address 0x7fffdfffe000

Re: 0x0000000000aff7bf in vibe.core.driver.deleteEventDriver()

Am 26.09.2017 um 21:59 schrieb Mengu:

hi all

i have a long running process in my vibe.d app (as a command line option - vibe is not even started). i don't know why and how vibe interferes with it but i get the following segfault (on freebsd) and the errors i get is becoming so annoying, i'm going to port my program to another language.

#0  0x0000000000aff7bf in vibe.core.driver.deleteEventDriver() () at ../../../../home/search-master/.dub/packages/vibe-d-0.8.1/vibe-d/core/vibe/core/driver.d:54
54			s_driver.dispose();
[Current thread is 1 (LWP 100738)]
(gdb) bt full
#0  0x0000000000aff7bf in vibe.core.driver.deleteEventDriver() () at ../../../../home/search-master/.dub/packages/vibe-d-0.8.1/vibe-d/core/vibe/core/driver.d:54
(...)
Backtrace stopped: Cannot access memory at address 0x7fffdfffe000

It looks like something may be going wrong with thread-local storage. At
least I don't see a high-level explanation for the error when looking at
the code (which is pretty isolated from other side effects). The problem
is that the global TLS variable s_driver seemingly contains garbage
when the thread is being teared down and the module destructor gets called.

Can you try if this also happens with LDC or vice-versa? If not, that
would support the TLS assumption.

I can sympathize with you regarding such errors, they tend to be really
annoying and expensive in terms of development time loss. But on the
positive side, these things have gotten a lot less frequent in the
recent years, since a rigorous regression test policy has been
implemented. The important part is getting them reported on
issues.dlang.org with a test case and ideally flagging them as a
regression if they are - then they tend to get fixed very quickly and
are more or less guaranteed to never come back.

My personal pain point that remains though is Optlink on Windows, which
is not as well maintained as DMD itself and has some nasty bugs that I
currently can't even find workarounds for.