pyd icon indicating copy to clipboard operation
pyd copied to clipboard

Garbage Collector playing up...

Open Lord-Evil opened this issue 10 years ago • 2 comments

#0  0x00007ffff749dea2 in pyd.pydobject.PydObject.~this() () from ./lib/libpyd.so
#1  0x00007ffff60b0ffd in rt_finalize2 () from /usr/lib/libphobos2.so.0.67
#2  0x00007ffff60b10d2 in rt_finalizeFromGC () from /usr/lib/libphobos2.so.0.67
#3  0x00007ffff609b7d7 in gc.gc.Gcx.sweep() () from /usr/lib/libphobos2.so.0.67
#4  0x00007ffff609bf04 in gc.gc.Gcx.fullcollect(bool) () from /usr/lib/libphobos2.so.0.67
#5  0x00007ffff609a05b in gc.gc.Gcx.smallAlloc(ubyte, ref ulong, uint) () from /usr/lib/libphobos2.so.0.67
#6  0x00007ffff6097bdc in gc.gc.GC.malloc(ulong, uint, ulong*, const(TypeInfo)) () from /usr/lib/libphobos2.so.0.67
#7  0x00007ffff609e365 in gc_qalloc () from /usr/lib/libphobos2.so.0.67
#8  0x00007ffff608c010 in core.memory.GC.qalloc(ulong, uint, const(TypeInfo)) () from /usr/lib/libphobos2.so.0.67

This happens at random times, but especially when I load multiple scripts at once and then trying to shutdown the app. Another case of this error happens often when script calls callback function in D that does some POST HTTP (normally first time script runs ok, then can fail on any random step). I'm confused. Seems like it's all linked to my module import function:

PydObject my_import(string name) {
    debug assert(Py_IsInitialized(), "python not initialized");
    auto list=new PydObject(PyImport_GetModuleDict());
    string slist=list.toString;
    if(list.has_key(name))
        return new PydObject(PyImport_ReloadModule(PyImport_AddModule(zcc(name))));
    else
        return new PydObject(PyImport_ImportModule(zcc(name)));
}

With standard py_import() no errors jump up :)

Lord-Evil avatar Apr 25 '15 15:04 Lord-Evil

is this a segfault? what's the error message?

ariovistus avatar Apr 25 '15 15:04 ariovistus

Just a segfault. Can't really catch it.

Lord-Evil avatar Apr 25 '15 15:04 Lord-Evil