2025-07-30 08:53 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0006255Spring engineLinuxpublic2019-07-20 17:00
Reporteresainane 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilityrandom
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version104.0 +git 
Summary0006255: 104.0.1-1305-gf2c1261 Deadlock (?) logging error messages
DescriptionAfter some time in the Zero-K menu, the engine freezes. Inspecting the thread states, the main spring thread is frozen trying to acquire a lock. Stepping into this system call, it never returns.

This happens as the menu tries to log an error about an invalid clan image. I am not sure whether this deadlock is caused by that problem, or if that problem just makes this deadlock easier to encounter.

Also, the watchdog thread also seems to be doing something similar, getting stuck trying to log an error about how it has detected a hang in the main thread.

So far, this appears to be worked around by removing the invalid image. I am not sure if this has entirely worked around the problem, or just removed a common cause of it.
Steps To Reproduce- Run latest Zero-K
- Have LuaUI/Configs/Clans/??nďîc.png be a file consisting entirely of of one null byte
- ??? something to cause this to be drawn or preloaded?
- Hang
Additional InformationThread info:
  Id Target Id Frame
  1 Thread 0x7fa7f2162880 (LWP 1989) "spring-main" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  2 Thread 0x7fa7f1895700 (LWP 1990) "watchdog" __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:103
  3 Thread 0x7fa7de273700 (LWP 3840) "worker1" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  4 Thread 0x7fa7dccf2700 (LWP 3841) "worker1" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  5 Thread 0x7fa7d7fff700 (LWP 3842) "worker2" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  6 Thread 0x7fa7d77fe700 (LWP 3843) "worker2" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  7 Thread 0x7fa7d6ffd700 (LWP 3845) "audio" 0x00007fa7f4a7cbf0 in __GI___nanosleep (requested_time=requested_time@entry=0x7fa7d6fecc80, remaining=remaining@entry=0x0)
    at ../sysdeps/unix/sysv/linux/nanosleep.c:28
  8 Thread 0x7fa7d67fc700 (LWP 3846) "threaded-ml" 0x00007fa7f4544819 in __GI___poll (fds=0x7fa7c8009cb0, nfds=3, timeout=488) at ../sysdeps/unix/sysv/linux/poll.c:29
  9 Thread 0x7fa7dc4f1700 (LWP 3847) "openal" futex_wait_cancelable (private=0, expected=0, futex_word=0x7fa7c4000fdc) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  10 Thread 0x7fa7dc2f0700 (LWP 3848) "openal" futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7fa7c4001db0) at ../sysdeps/unix/sysv/linux/futex-internal.h:205


Thread 0 (spring-main) full backtrace:
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
No locals.
#1 0x0000000000a571a7 in spring_futex::lock (this=this@entry=0x1f5fb30) at ../../rts/System/Platform/Linux/Futex.cpp:32
        c = <optimized out>
#2 0x0000000000945908 in std::lock_guard<spring_futex>::lock_guard (__m=..., this=<synthetic pointer>) at /usr/include/c++/5/mutex:386
No locals.
0000003 TexMemPool::Alloc (size=130, this=0x1f5fb00) at ../../rts/Rendering/Textures/Bitmap.cpp:67
        lck = <optimized out>
        lck = <optimized out>
0000004 TexMemPool::AllocIdx (size=<optimized out>, this=0x1f5fb00) at ../../rts/Rendering/Textures/Bitmap.cpp:62
No locals.
0000005 CBitmap::CBitmap (this=0x476c61a0, data=0x4d265d80 "", _xsize=<optimized out>, _ysize=<optimized out>, _channels=<optimized out>) at ../../rts/Rendering/Textures/Bitmap.cpp:301
No locals.
#6 0x0000000000974451 in __gnu_cxx::new_allocator<CBitmap>::construct<CBitmap, unsigned char*&, int const&, int const&, int> (__p=<optimized out>, this=0x4782af30)
    at /usr/include/c++/5/ext/new_allocator.h:120
No locals.
#7 std::allocator_traits<std::allocator<CBitmap> >::construct<CBitmap, unsigned char*&, int const&, int const&, int> (__p=<optimized out>, __a=...)
    at /usr/include/c++/5/bits/alloc_traits.h:530
No locals.
#8 std::vector<CBitmap, std::allocator<CBitmap> >::emplace_back<unsigned char*&, int const&, int const&, int> (this=0x4782af30) at /usr/include/c++/5/bits/vector.tcc:96
No locals.
#9 CFontTexture::LoadGlyph (this=this@entry=0x4781adf0, f=std::shared_ptr<FontFace> (use count 3, weak count 1) = {...}, ch=256 U'Ā', index=<optimized out>)
    at ../../rts/Rendering/Fonts/CFontTexture.cpp:674
        pred = <optimized out>
        iter = <optimized out>
        glyph = <optimized out>
        slot = <optimized out>
        xbearing = <optimized out>
        ybearing = <optimized out>
        width = 10
        height = 13
        olSize = <optimized out>
0000010 0x000000000097590e in CFontTexture::LoadBlock (this=this@entry=0x4781adf0, start=256 U'Ā', end=384 U'ƀ') at ../../rts/Rendering/Fonts/CFontTexture.cpp:539
        index = <optimized out>
        it = 256 U'Ā'
        lk = {_M_device = @0x16601a0}
        f = std::shared_ptr<FontFace> (use count 3, weak count 1) = {get() = 0x47483890}
        alreadyCheckedFonts = {_hasher = {<std::__hash_base<unsigned long, std::shared_ptr<FontFace> >> = {<No data fields>}, <No data fields>}, _comp = {<No data fields>},
          _states = 0x98948e80, _keys = 0x4afdae40, _num_buckets = 4, _num_filled = 1, _max_probe_length = 0, _mask = 3}
        map = Python Exception <class 'gdb.error'> value has been optimized out:

#11 0x0000000000978906 in CFontTexture::GetGlyph (this=this@entry=0x4781adf0, ch=ch@entry=271 U'ď') at ../../rts/Rendering/Fonts/CFontTexture.cpp:480
        it = {_map = 0x4782aec0, _bucket = <optimized out>}
        start = <optimized out>
        end = <optimized out>
0000012 0x000000000097a885 in CglFont::GetTextWidth_ (this=this@entry=0x4781adf0, text=...) at ../../rts/Rendering/Fonts/glFont.cpp:270
        idx = 26
        end = <optimized out>
        curw = <optimized out>
        maxw = <optimized out>
        prvGlyphIdx = 110 U'n'
        curGlyphIdx = 271 U'ď'
        prvGlyphPtr = 0x4782d768
        curGlyphPtr = <optimized out>
0000013 0x0000000000981476 in CglFont::GetTextWidth (text="\"LuaUI/Configs/Clans/??nďîc.png\"", this=0x4781adf0) at ../../rts/Rendering/Fonts/glFont.h:136
No locals.
0000014 CTextWrap::SplitTextInWords (this=this@entry=0x4781adf0, text=..., words=words@entry=0x7fffc1e1dc30, colorcodes=colorcodes@entry=0x7fffc1e1dc50)
    at ../../rts/Rendering/Fonts/TextWrap.cpp:432
        c = <optimized out>
        pos = 68
        length = 91
        spaceAdvance = 0.285714298
        w = 0x84cb4090
        numChar = 63
#15 0x0000000000982965 in CTextWrap::WrapInPlace (this=this@entry=0x4781adf0, text=..., _fontSize=<optimized out>, _fontSize@entry=14, maxWidth=maxWidth@entry=773.200012,
    maxHeight=maxHeight@entry=1e+09) at ../../rts/Rendering/Fonts/TextWrap.cpp:576
        maxWidthf = <optimized out>
        maxHeightf = <optimized out>
        numSpaceStrings = 11
        words = std::__cxx11::list = {[0] = {width = 2.71428585,
            text = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "Error:", <No data fields>}, isSpace = false, isLineBreak = false,
            isColorCode = false, numSpaces = 0, pos = 0}, [1] = {width = 0.285714298,
            text = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "", <No data fields>}, isSpace = true, isLineBreak = false,
            isColorCode = false, numSpaces = 1, pos = 6}, [2] = {width = 6.14285755,
            text = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "[BMP::Load]", <No data fields>}, isSpace = false, isLineBreak = false,
            isColorCode = false, numSpaces = 0, pos = 6}, [3] = {width = 0.285714298,
            text = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "", <No data fields>}, isSpace = true, isLineBreak = false,
            isColorCode = false, numSpaces = 1, pos = 17}, [4] = {width = 2.71428585,
            text = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "failed", <No data fields>}, isSpace = false, isLineBreak = false,
            isColorCode = false, numSpaces = 0, pos = 17}, [5] = {width = 0.285714298,
            text = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "", <No data fields>}, isSpace = true, isLineBreak = false,
            isColorCode = false, numSpaces = 1, pos = 23}, [6] = {width = 1,
            text = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "to", <No data fields>}, isSpace = false, isLineBreak = false,
            isColorCode = false, numSpaces = 0, pos = 23}, [7] = {width = 0.285714298,
            text = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "", <No data fields>}, isSpace = true, isLineBreak = false,
            isColorCode = false, numSpaces = 1, pos = 25}, [8] = {width = 2.14285707,
            text = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "load", <No data fields>}, isSpace = false, isLineBreak = false,
            isColorCode = false, numSpaces = 0, pos = 25}, [9] = {width = 0.285714298,
            text = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "", <No data fields>}, isSpace = true, isLineBreak = false,
            isColorCode = false, numSpaces = 1, pos = 29}, [10] = {width = 0,
            text = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "\"LuaUI/Configs/Clans/??nďîc.png\"", <No data fields>}, isSpace = false,
            isLineBreak = false, isColorCode = false, numSpaces = 0, pos = 29}}
        colorcodes = empty std::__cxx11::list
        numlines = <optimized out>
#16 0x0000000000982bd6 in CTextWrap::Wrap (this=0x4781adf0, text=..., _fontSize=14, maxWidth=773.200012, maxHeight=maxHeight@entry=1e+09) at ../../rts/Rendering/Fonts/TextWrap.cpp:613
        out = {<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >> = "Error: [BMP::Load] failed to load \"LuaUI/Configs/Clans/??nďîc.png\" or invalid format 6409", <No data fields>}
#17 0x0000000000637f00 in CTextWrap::Wrap (maxHeight=1e+09, maxWidth=<optimized out>, fontSize=<optimized out>,
    text="Error: [BMP::Load] failed to load \"LuaUI/Configs/Clans/??nďîc.png\" or invalid format 6409", this=<optimized out>) at ../../rts/Rendering/Fonts/TextWrap.h:91
No locals.
#18 CInfoConsole::RecordLogMessage (this=0x1679ee0, level=50, section=..., message="Error: [BMP::Load] failed to load \"LuaUI/Configs/Clans/??nďîc.png\" or invalid format 6409")
    at ../../rts/Game/UI/InfoConsole.cpp:203
        scoped_lock = {_M_device = @0x167a0a8}
        wrappedText = <optimized out>
        unicodeText = <optimized out>
#19 0x0000000000a4bcff in LogSinkHandler::RecordLogMessage (this=this@entry=0x165f4a0, level=level@entry=50, section="",
    message="Error: [BMP::Load] failed to load \"LuaUI/Configs/Clans/??nďîc.png\" or invalid format 6409") at ../../rts/System/Log/LogSinkHandler.cpp:48
        sink = <optimized out>
        __for_range = @0x165f4a0: {_hasher = {<std::__hash_base<unsigned long, ILogSink*>> = {<No data fields>}, <No data fields>}, _comp = {<No data fields>}, _states = 0x46f00860,
          _keys = 0x46d8aa30, _num_buckets = 4, _num_filled = 1, _max_probe_length = 0, _mask = 3}
        __for_begin = <optimized out>
        __for_end = <optimized out>
        sink = <optimized out>
        __for_range = <optimized out>
        __for_begin = <optimized out>
        __for_end = <optimized out>
0000020 0x0000000000a4beb4 in LogSinkHandler::RecordLogMessage (message="Error: [BMP::Load] failed to load \"LuaUI/Configs/Clans/??nďîc.png\" or invalid format 6409", section="",
    level=50, this=<optimized out>) at /usr/include/c++/5/bits/char_traits.h:290
        sink = <optimized out>
        __for_range = <optimized out>
        __for_begin = <optimized out>
        __for_end = <optimized out>
#21 log_sink_record_logSinkHandler (level=50, section=0x131c382 "", record=<optimized out>) at ../../rts/System/Log/LogSinkHandler.cpp:14
No locals.
#22 0x0000000000a49aaf in log_backend_record(int, const char *, const char *, typedef __va_list_tag __va_list_tag *) (level=level@entry=50, section=section@entry=0x131c382 "",
    fmt=fmt@entry=0x12a7d98 "[BMP::%s] failed to load \"%s\" or invalid format %d", arguments=arguments@entry=0x7fffc1e1df00) at ../../rts/System/Log/Backend.cpp:122
        i = 2
        sinks = @0x1f97f00: {_M_elems = {0xa4c3d0 <log_sink_record_console(int, char const*, char const*)>, 0xa4d760 <log_sink_record_file(int, char const*, char const*)>,
            0xa4bd30 <log_sink_record_logSinkHandler(int, char const*, char const*)>, 0x0, 0x0, 0x0, 0x0, 0x0}}
        cmp = <optimized out>
#23 0x0000000000a4a45a in log_filter_record (arguments=0x7fffc1e1df00, fmt=0x12a7d98 "[BMP::%s] failed to load \"%s\" or invalid format %d", section=0x131c382 "", level=50)
    at ../../rts/System/Log/DefaultFilter.cpp:230
No locals.
0000024 log_frontend_record (level=level@entry=50, section=section@entry=0x131c382 "", fmt=fmt@entry=0x12a7d98 "[BMP::%s] failed to load \"%s\" or invalid format %d")
    at ../../rts/System/Log/DefaultFilter.cpp:294
        arguments = <error reading variable arguments (Attempt to dereference a generic pointer.)>
#25 0x000000000094495c in CBitmap::Load (this=this@entry=0x7fffc1e1e350, filename="LuaUI/Configs/Clans/??nďîc.png", defaultAlpha=defaultAlpha@entry=255 '\377')
    at ../../rts/Rendering/Textures/Bitmap.cpp:527
        lck = {_M_device = @0x1f5fb30}
        imageID = 2
        buffer = std::vector of length 1, capacity 1 = {0 '\000'}
        isLoaded = <optimized out>
        isValid = <optimized out>
        noAlpha = false
        loadDDS = false
        flipDDS = <optimized out>
        curMemSize = <optimized out>
        file = {_vptr.CFileHandler = 0x13576b8, fileName = "LuaUI/Configs/Clans/??nďîc.png", ifs = <incomplete type>, fileBuffer = std::vector of length 0, capacity 0, filePos = 0,
          fileSize = 1, loadCode = -3}
        __func__ = "Load"
0000026 0x00000000009503fb in CNamedTextures::Load (texName="LuaUI/Configs/Clans/??nďîc.png", texID=962) at ../../rts/Rendering/Textures/NamedTextures.cpp:208
        filename = "LuaUI/Configs/Clans/??nďîc.png"
        border = false
        clamped = false
        nearest = false
        linear = false
        aniso = false
        invert = false
        greyed = false
        tint = false
        tintColor = {17365, 0, -6.2609574e+28}
        resize = false
        resizeDimensions = {static creg_class = {baseClass = 0x0, flags = creg::CF_None, hasVTable = false, isCregStruct = true, members = std::vector of length 2, capacity 2 = {{
                name = 0x12d2f87 "x", Python Exception <class 'TypeError'> expected string or bytes-like object:
type = {_M_t = std::tuple containing = {[1] = 0x466c2670, [2] = {<std::default_delete<creg::IType>> = {<No data fields>}, <No data fields>}}},
                offset = 0, alignment = 4, flags = 0}, {name = 0x12d1eef "y", Python Exception <class 'TypeError'> expected string or bytes-like object:
type = {_M_t = std::tuple containing = {[1] = 0x466d29d0,
                    [2] = {<std::default_delete<creg::IType>> = {<No data fields>}, <No data fields>}}}, offset = 4, alignment = 4, flags = 0}}, name = 0x131649c "int2", size = 8,
            alignment = 4, constructor = 0x9ffa70 <type2<int>::_ConstructInstance(void*)>, destructor = 0x9ffdd0, poolAlloc = 0x0, poolFree = 0x0, serializeProc = 0x0,
            postLoadProc = 0x0, getSizeProc = 0x0}, static creg_isStruct = <optimized out>, x = 0, y = 0}
        bitmap = {memIdx = 18446744073709551615, xsize = 0, ysize = 0, channels = 4, textype = 3553, ddsimage = {m_format = 0, m_components = 0, m_type = nv_dds::TextureNone,
            m_valid = false, m_images = std::vector of length 0, capacity 0}, compressed = false}
        texInfo = {id = 0, xsize = -1, ysize = -1, alpha = false, persist = false}
0000027 0x0000000000950d3b in CNamedTextures::GenLoadTex (texName="LuaUI/Configs/Clans/??nďîc.png") at ../../rts/Rendering/Textures/NamedTextures.cpp:281
        texID = 962
#28 0x0000000000951410 in CNamedTextures::GetInfo (texName="LuaUI/Configs/Clans/??nďîc.png", forceLoad=forceLoad@entry=true, persist=<optimized out>,
    secondaryGLContext=secondaryGLContext@entry=false) at ../../rts/Rendering/Textures/NamedTextures.cpp:375
        inListCompile = 0 '\000'
        texIdx = 18446744073709551615
0000029 0x000000000073e591 in LuaOpenGLUtils::ParseTextureImage (L=L@entry=0x46f1ce80, texUnit=..., image="LuaUI/Configs/Clans/??nďîc.png") at ../../rts/Lua/LuaOpenGLUtils.cpp:451
        luaHandle = <optimized out>
        texInfo = <optimized out>
#30 0x0000000000736b06 in LuaOpenGL::TextureInfo (L=0x46f1ce80) at ../../rts/Lua/LuaOpenGL.cpp:3262
        tex = {type = LuaMatTexture::LUATEX_NONE, data = 0x0, state = 0x46f1ce80, enable = false, static maxTexUnits = 16}
#31 0x0000000000cc278b in luaD_precall (L=L@entry=0x46f1ce80, func=func@entry=0x4df73e20, nresults=nresults@entry=1) at ../../rts/lib/lua/src/ldo.cpp:320
        ci = <optimized out>
        n = <optimized out>
        cl = <optimized out>
        funcr = <optimized out>
#32 0x0000000000cd0a11 in luaV_execute (L=L@entry=0x46f1ce80, nexeccalls=23, nexeccalls@entry=1) at ../../rts/lib/lua/src/lvm.cpp:613
        b = <optimized out>
        nresults = 1
        i = <optimized out>
        ra = 0x4df73e20
        cl = 0x47cd6a60
        base = <optimized out>
        k = 0x47cc1d60
        pc = 0x46e1f048
#33 0x0000000000cc2a6d in luaD_call (L=0x46f1ce80, func=0x4df73490, nResults=<optimized out>) at ../../rts/lib/lua/src/ldo.cpp:378
No locals.
0000034 0x0000000000cc1e3a in luaD_rawrunprotected (L=L@entry=0x46f1ce80, f=f@entry=0xcbab00 <f_call(lua_State*, void*)>, ud=ud@entry=0x7fffc1e1e820) at ../../rts/lib/lua/src/ldo.cpp:116
        lj = {previous = 0x7fffc1e1e9a0, b = 1, status = 0}
0000035 0x0000000000cc2c0b in luaD_pcall (L=L@entry=0x46f1ce80, func=func@entry=0xcbab00 <f_call(lua_State*, void*)>, u=u@entry=0x7fffc1e1e820, old_top=624, ef=<optimized out>)
    at ../../rts/lib/lua/src/ldo.cpp:464
        status = <optimized out>
        oldnCcalls = 3
        old_ci = 360
        old_allowhooks = 1 '\001'
        old_errfunc = 432
#36 0x0000000000cbc2f9 in lua_pcall (L=L@entry=0x46f1ce80, nargs=nargs@entry=0, nresults=nresults@entry=-1, errfunc=errfunc@entry=1) at ../../rts/lib/lua/src/lapi.cpp:833
        c = {func = 0x4df73490, nresults = -1}
        status = <optimized out>
        func = <optimized out>
#37 0x0000000000cbe36c in luaB_xpcall (L=0x46f1ce80) at ../../rts/lib/lua/src/lbaselib.cpp:389
        status = <optimized out>
#38 0x0000000000cc278b in luaD_precall (L=L@entry=0x46f1ce80, func=func@entry=0x4df73470, nresults=nresults@entry=-1) at ../../rts/lib/lua/src/ldo.cpp:320
        ci = <optimized out>
        n = <optimized out>
        cl = <optimized out>
        funcr = <optimized out>
0000039 0x0000000000cd0a11 in luaV_execute (L=L@entry=0x46f1ce80, nexeccalls=2, nexeccalls@entry=1) at ../../rts/lib/lua/src/lvm.cpp:613
        b = <optimized out>
        nresults = -1
        i = <optimized out>
        ra = 0x4df73470
        cl = 0x47377010
        base = <optimized out>
        k = 0x473d4d00
        pc = 0x470b28e8
#40 0x0000000000cc2a6d in luaD_call (L=0x46f1ce80, func=0x4df733e0, nResults=<optimized out>) at ../../rts/lib/lua/src/ldo.cpp:378
No locals.
#41 0x0000000000cc1e3a in luaD_rawrunprotected (L=L@entry=0x46f1ce80, f=f@entry=0xcbab00 <f_call(lua_State*, void*)>, ud=ud@entry=0x7fffc1e1ea20) at ../../rts/lib/lua/src/ldo.cpp:116
        lj = {previous = 0x7fffc1e1eba0, b = 1, status = 0}
0000042 0x0000000000cc2c0b in luaD_pcall (L=L@entry=0x46f1ce80, func=func@entry=0xcbab00 <f_call(lua_State*, void*)>, u=u@entry=0x7fffc1e1ea20, old_top=448, ef=<optimized out>)
    at ../../rts/lib/lua/src/ldo.cpp:464
        status = <optimized out>
        oldnCcalls = 2
        old_ci = 240
        old_allowhooks = 1 '\001'
        old_errfunc = 0
0000043 0x0000000000cbc2f9 in lua_pcall (L=L@entry=0x46f1ce80, nargs=nargs@entry=0, nresults=nresults@entry=-1, errfunc=errfunc@entry=1) at ../../rts/lib/lua/src/lapi.cpp:833
        c = {func = 0x4df733e0, nresults = -1}
        status = <optimized out>
        func = <optimized out>
0000044 0x0000000000cbe36c in luaB_xpcall (L=0x46f1ce80) at ../../rts/lib/lua/src/lbaselib.cpp:389
        status = <optimized out>
0000045 0x0000000000cc278b in luaD_precall (L=L@entry=0x46f1ce80, func=func@entry=0x4df733c0, nresults=nresults@entry=-1) at ../../rts/lib/lua/src/ldo.cpp:320
        ci = <optimized out>
        n = <optimized out>
        cl = <optimized out>
        funcr = <optimized out>
0000046 0x0000000000cd0a11 in luaV_execute (L=L@entry=0x46f1ce80, nexeccalls=2, nexeccalls@entry=1) at ../../rts/lib/lua/src/lvm.cpp:613
        b = <optimized out>
        nresults = -1
        i = <optimized out>
        ra = 0x4df733c0
        cl = 0x47377010
        base = <optimized out>
        k = 0x473d4d00
        pc = 0x470b28e8
0000047 0x0000000000cc2a6d in luaD_call (L=0x46f1ce80, func=0x4df73320, nResults=<optimized out>) at ../../rts/lib/lua/src/ldo.cpp:378
No locals.
0000048 0x0000000000cc1e3a in luaD_rawrunprotected (L=L@entry=0x46f1ce80, f=f@entry=0xcbab00 <f_call(lua_State*, void*)>, ud=ud@entry=0x7fffc1e1ec20) at ../../rts/lib/lua/src/ldo.cpp:116
        lj = {previous = 0x7fffc1e1eda0, b = 13434207, status = 0}
0000049 0x0000000000cc2c0b in luaD_pcall (L=L@entry=0x46f1ce80, func=func@entry=0xcbab00 <f_call(lua_State*, void*)>, u=u@entry=0x7fffc1e1ec20, old_top=256, ef=<optimized out>)
    at ../../rts/lib/lua/src/ldo.cpp:464
        status = <optimized out>
        oldnCcalls = 1
        old_ci = 120
        old_allowhooks = 1 '\001'
        old_errfunc = 0
0000050 0x0000000000cbc2f9 in lua_pcall (L=L@entry=0x46f1ce80, nargs=<optimized out>, nresults=nresults@entry=-1, errfunc=errfunc@entry=0) at ../../rts/lib/lua/src/lapi.cpp:833
        c = {func = 0x4df73320, nresults = -1}
        status = <optimized out>
        func = <optimized out>
0000051 0x0000000000cbe308 in luaB_pcall (L=0x46f1ce80) at ../../rts/lib/lua/src/lbaselib.cpp:377
        status = <optimized out>
0000052 0x0000000000cc278b in luaD_precall (L=L@entry=0x46f1ce80, func=func@entry=0x4df73310, nresults=nresults@entry=-1) at ../../rts/lib/lua/src/ldo.cpp:320
        ci = <optimized out>
        n = <optimized out>
        cl = <optimized out>
        funcr = <optimized out>
0000053 0x0000000000cd0a11 in luaV_execute (L=L@entry=0x46f1ce80, nexeccalls=2, nexeccalls@entry=1) at ../../rts/lib/lua/src/lvm.cpp:613
        b = <optimized out>
        nresults = -1
        i = <optimized out>
        ra = 0x4df73310
        cl = 0x474a0620
        base = <optimized out>
        k = 0x472641d0
        pc = 0x47337e8c
#54 0x0000000000cc2a6d in luaD_call (L=0x46f1ce80, func=0x4df73230, nResults=<optimized out>) at ../../rts/lib/lua/src/ldo.cpp:378
No locals.
0000055 0x0000000000cc1e3a in luaD_rawrunprotected (L=L@entry=0x46f1ce80, f=f@entry=0xcbab00 <f_call(lua_State*, void*)>, ud=ud@entry=0x7fffc1e1ee20) at ../../rts/lib/lua/src/ldo.cpp:116
        lj = {previous = 0x0, b = 1183296000, status = 0}
0000056 0x0000000000cc2c0b in luaD_pcall (L=L@entry=0x46f1ce80, func=func@entry=0xcbab00 <f_call(lua_State*, void*)>, u=u@entry=0x7fffc1e1ee20, old_top=16, ef=<optimized out>)
    at ../../rts/lib/lua/src/ldo.cpp:464
        status = <optimized out>
        oldnCcalls = 0
        old_ci = 0
        old_allowhooks = 1 '\001'
        old_errfunc = 0
0000057 0x0000000000cbc2f9 in lua_pcall (L=L@entry=0x46f1ce80, nargs=nargs@entry=2, nresults=nresults@entry=0, errfunc=errfunc@entry=0) at ../../rts/lib/lua/src/lapi.cpp:833
        c = {func = 0x4df73230, nresults = 0}
        status = <optimized out>
        func = <optimized out>
0000058 0x00000000006ff53e in CLuaHandle::ScopedLuaCall::ScopedLuaCall (_popErrFunc=false, _errFuncIdx=0, _nOutArgs=0, _nInArgs=2, func=0x1683380 "DrawScreen", state=0x46f1ce80,
    handle=0x471bc1c0, this=<synthetic pointer>) at ../../rts/Lua/LuaHandle.cpp:326
        canDraw = <optimized out>
        prevMatState = {mode = 5888, modelView = 0, projection = 0, texture = 0}
        matTracker = @0x471bc3c0: {matrixData = {mode = 5888, modelView = 10, projection = 0, texture = 0}, listMode = false}
        canDraw = <optimized out>
        prevMatState = <optimized out>
        matTracker = <optimized out>
#59 CLuaHandle::RunCallInTraceback (this=this@entry=0x471bc1c0, L=L@entry=0x46f1ce80, hs=hs@entry=0x1683380, ts=ts@entry=0x7fffc1e1ef30, inArgs=inArgs@entry=2,
    outArgs=outArgs@entry=0, errFuncIndex=0, popErrorFunc=false) at ../../rts/Lua/LuaHandle.cpp:412
        fe = <optimized out>
        call = {luaState = 0x46f1ce80, luaHandle = 0x471bc1c0, luaFunc = <optimized out>, nInArgs = <optimized out>, nOutArgs = <optimized out>, errFuncIdx = <optimized out>,
          popErrFunc = <optimized out>, top = <optimized out>, error = <optimized out>}
0000060 0x00000000006ffcb5 in CLuaHandle::RunCallInTraceback (this=this@entry=0x471bc1c0, L=0x46f1ce80, hs=..., inArgs=inArgs@entry=2, outArgs=outArgs@entry=0,
    errFuncIndex=errFuncIndex@entry=0, popErrFunc=false) at ../../rts/Lua/LuaHandle.cpp:422
        traceStr = ""
        error = <optimized out>
        hn = <optimized out>
        hsn = <optimized out>
        es = 0x2 <error: Cannot access memory at address 0x2>
        __func__ = "RunCallInTraceback"
0000061 0x000000000070cc1c in CLuaHandle::RunCallIn (outArgs=0, inArgs=2, hs=..., L=<optimized out>, this=0x471bc1c0) at ../../rts/Lua/LuaHandle.h:364
No locals.
0000062 CLuaHandle::DrawScreenCommon (cmdStr=..., this=0x471bc1c0) at ../../rts/Lua/LuaHandle.cpp:1821
        cmdStr = @0x1683380: {str = "DrawScreen", '\000' <repeats 21 times>, slen = 10, hash = 3651032054}
        this = 0x471bc1c0
0000063 CLuaHandle::DrawScreen (this=0x471bc1c0) at ../../rts/Lua/LuaHandle.cpp:1832
        __stnr = {<spring::noncopyable> = {<No data fields>}, <No data fields>}
        __scopedTimer = {<BasicTimer> = {<spring::noncopyable> = {<No data fields>}, nameHash = 193463719, startTime = {static creg_class = {baseClass = 0x0, flags = creg::CF_None,
                hasVTable = false, isCregStruct = true, members = std::vector of length 1, capacity 1 = {{name = 0x12d2f87 "x", Python Exception <class 'TypeError'> expected string or bytes-like object:
type = {_M_t = std::tuple containing = {
                        [1] = 0x466b8f90, [2] = {<std::default_delete<creg::IType>> = {<No data fields>}, <No data fields>}}}, offset = 0, alignment = 8, flags = 0}},
                name = 0x12f658e "spring_time", size = 8, alignment = 8, constructor = 0x9d3350 <spring_time::_ConstructInstance(void*)>,
                destructor = 0x9d3360 <spring_time::_DestructInstance(void*)>, poolAlloc = 0x0, poolFree = 0x0,
                serializeProc = 0x9d3790 <spring_time::<lambda(void*, creg::ISerializer*)>::_FUN(void *, creg::ISerializer *)>, postLoadProc = 0x0, getSizeProc = 0x0},
              static creg_isStruct = true, x = 1629628969182, static xs = 1563625729812025883}}, autoShowGraph = false, specialTimer = true}
        __func__ = "DrawScreen"
        cmdStr = {str = "DrawScreen", '\000' <repeats 21 times>, slen = 10, hash = 3651032054}
0000064 0x00000000009af7a8 in CEventHandler::DrawScreen (this=0x1f824e0) at ../../rts/System/EventHandler.cpp:629
No locals.
#65 0x0000000000982e76 in CLuaMenuController::Draw (this=0x473cfe90) at ../../rts/Menu/LuaMenuController.cpp:122
        allowDraw = <optimized out>
        forceDraw = <optimized out>
0000066 0x00000000009e344b in SpringApp::Update (this=this@entry=0x7fffc1e1f4d0) at ../../rts/System/SpringApp.cpp:764
        swap = true
0000067 0x00000000009e6840 in SpringApp::Run (this=this@entry=0x7fffc1e1f4d0) at ../../rts/System/SpringApp.cpp:802
        threadError = 0x1fa8cc0
        __func__ = "Run"
0000068 0x00000000009cf659 in Run (argc=argc@entry=3, argv=argv@entry=0x7fffc1e1f698) at ../../rts/System/Main.cpp:43
        app = {inputFile = "", clientSetup = std::shared_ptr<ClientSetup> (use count 1, weak count 0) = {get() = 0x4afc1c90}}
0000069 0x0000000000571b1a in main (argc=argc@entry=3, argv=argv@entry=0x7fffc1e1f698) at ../../rts/System/Main.cpp:94
No locals.
#70 0x00007fa7f447a09b in __libc_start_main (main=0x571a60 <main(int, char**)>, argc=3, argv=0x7fffc1e1f698, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
    stack_end=0x7fffc1e1f688) at ../csu/libc-start.c:308
        self = <optimized out>
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 4772718734915676132, 5838560, 140736446199440, 0, 0, -4772799696143898652, -4795224496088406044}, mask_was_saved = 0}}, priv = {
            pad = {0x0, 0x0, 0x0, 0x7fa7f4c3b190}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
0000071 0x0000000000591709 in _start ()


Thread 1 (watchdog) full backtrace:
#0 __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:103
No locals.
#1 0x00007fa7f4a757d1 in __GI___pthread_mutex_lock (mutex=0x167a0a8) at ../nptl/pthread_mutex_lock.c:115
        ignore1 = <optimized out>
        ignore2 = <optimized out>
        ignore3 = <optimized out>
        id = 1990
        type = <optimized out>
        __PRETTY_FUNCTION__ = "__pthread_mutex_lock"
        id = <optimized out>
#2 0x0000000000637d4f in __gthread_mutex_lock (__mutex=0x167a0a8) at /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:748
No locals.
0000003 __gthread_recursive_mutex_lock (__mutex=0x167a0a8) at /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:810
No locals.
0000004 std::recursive_mutex::lock (this=0x167a0a8) at /usr/include/c++/5/mutex:176
        __e = <optimized out>
        __e = <optimized out>
0000005 std::lock_guard<std::recursive_mutex>::lock_guard (__m=..., this=<synthetic pointer>) at /usr/include/c++/5/mutex:386
No locals.
#6 CInfoConsole::RecordLogMessage (this=0x1679ee0, level=40, section="", message="Warning: [Watchdog] Hang detection triggered for Spring 104.0.1-1305-gf2c1261 maintenance.")
    at ../../rts/Game/UI/InfoConsole.cpp:185
        scoped_lock = {_M_device = @0x167a0a8}
        wrappedText = <optimized out>
        unicodeText = <optimized out>
#7 0x0000000000a4bcff in LogSinkHandler::RecordLogMessage (this=this@entry=0x165f4a0, level=level@entry=40, section="",
    message="Warning: [Watchdog] Hang detection triggered for Spring 104.0.1-1305-gf2c1261 maintenance.") at ../../rts/System/Log/LogSinkHandler.cpp:48
        sink = <optimized out>
        __for_range = @0x165f4a0: {_hasher = {<std::__hash_base<unsigned long, ILogSink*>> = {<No data fields>}, <No data fields>}, _comp = {<No data fields>}, _states = 0x46f00860, _keys = 0x46d8aa30,
          _num_buckets = 4, _num_filled = 1, _max_probe_length = 0, _mask = 3}
        __for_begin = <optimized out>
        __for_end = <optimized out>
        sink = <optimized out>
        __for_range = <optimized out>
        __for_begin = <optimized out>
        __for_end = <optimized out>
#8 0x0000000000a4beb4 in LogSinkHandler::RecordLogMessage (message="Warning: [Watchdog] Hang detection triggered for Spring 104.0.1-1305-gf2c1261 maintenance.", section="", level=40, this=<optimized out>)
    at /usr/include/c++/5/bits/char_traits.h:290
        sink = <optimized out>
        __for_range = <optimized out>
        __for_begin = <optimized out>
        __for_end = <optimized out>
#9 log_sink_record_logSinkHandler (level=40, section=0x131c382 "", record=<optimized out>) at ../../rts/System/Log/LogSinkHandler.cpp:14
No locals.
0000010 0x0000000000a49aaf in log_backend_record(int, const char *, const char *, typedef __va_list_tag __va_list_tag *) (level=level@entry=40, section=section@entry=0x131c382 "",
    fmt=fmt@entry=0x12a9800 "[Watchdog] Hang detection triggered for Spring %s.", arguments=arguments@entry=0x7fa7f1884c70) at ../../rts/System/Log/Backend.cpp:122
        i = 2
        sinks = @0x1f97f00: {_M_elems = {0xa4c3d0 <log_sink_record_console(int, char const*, char const*)>, 0xa4d760 <log_sink_record_file(int, char const*, char const*)>,
            0xa4bd30 <log_sink_record_logSinkHandler(int, char const*, char const*)>, 0x0, 0x0, 0x0, 0x0, 0x0}}
        cmp = <optimized out>
#11 0x0000000000a4a45a in log_filter_record (arguments=0x7fa7f1884c70, fmt=0x12a9800 "[Watchdog] Hang detection triggered for Spring %s.", section=0x131c382 "", level=40)
    at ../../rts/System/Log/DefaultFilter.cpp:230
No locals.
0000012 log_frontend_record (level=level@entry=40, section=section@entry=0x131c382 "", fmt=fmt@entry=0x12a9800 "[Watchdog] Hang detection triggered for Spring %s.") at ../../rts/System/Log/DefaultFilter.cpp:294
        arguments = <error reading variable arguments (Attempt to dereference a generic pointer.)>
0000013 0x00000000009dfda0 in Watchdog::HangDetectorLoop () at ../../rts/System/Platform/Watchdog.cpp:144
        curtime = <optimized out>
        hangDetected = <optimized out>
        hangThreads = {true, false, false, false}
0000014 0x0000000001263d20 in ?? ()
No symbol table info available.
#15 0x00007fa7f4a72fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
        ret = <optimized out>
        pd = <optimized out>
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140359288575744, 4772716322574313444, 140736446196558, 140736446196559, 140359288575744, 1182561248, -4795213038544214044, -4795223667597236252}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#16 0x00007fa7f454f4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95


End of infolog.txt:
[...]
[f=-000001]
[f=-000001] [SpringApp::MainEventHandler][SDL_WINDOWEVENT_SIZE_CHANGED][1] fullScreen=0
[f=-000001] [GR::UpdateGLConfigs]
[f=-000001] [GR::UpdateGLGeometry][1] winSize=<1918,1138>
[f=-000001] [GR::UpdateGLGeometry][2] winSize=<1918,1138>
[f=-000001] [GR::InitGLState]
[f=-000001] [GR::LogDisplayMode] display-mode set to 1918x1138x24bpp@60Hz (windowed::decorated)
[f=-000001] [~ScopedOnceTimer][GlobalRendering::UpdateGL] 0ms
[f=-000001] [~ScopedOnceTimer][ActiveController::ResizeEvent] 0ms
[f=-000001] [SpringApp::MainEventHandler][SDL_WINDOWEVENT_SIZE_CHANGED][2]

[f=-000001] Error: [BMP::Load] failed to load "LuaMenu/Images/MinimapThumbnailstrololo_v2.jpg" or invalid format 6409
[f=-000001] Warning: Couldn't find texture "LuaMenu/Images/MinimapThumbnailstrololo_v2.jpg"!
[f=-000001] Error: [BMP::Load] failed to load "LuaMenu/Images/MinimapThumbnailshotlips001.jpg" or invalid format 6409
[f=-000001] Warning: Couldn't find texture "LuaMenu/Images/MinimapThumbnailshotlips001.jpg"!
[f=-000001] Error: [BMP::Load] failed to load "LuaMenu/Images/MinimapThumbnailsCT_Fishbone_Ridgev10.jpg" or invalid format 6409

Other errors are in the process of being logged, but the application deadlocks partway through.
TagsNo tags attached.
Checked infolog.txt for ErrorsYes
Attached Files

-Relationships
+Relationships

-Notes

~0020035

Kloot (developer)

Last edited: 2019-07-20 16:59

View 3 revisions

Thanks for this detailed report, looks like LOG() is indirectly causing another bitmap to be loaded through FontTexture while the mutex is held. Fixed in maintenance 1310-g75b4b92.

+Notes

-Issue History
Date Modified Username Field Change
2019-07-20 16:11 esainane New Issue
2019-07-20 16:33 Kloot Note Added: 0020035
2019-07-20 16:34 Kloot Note Edited: 0020035 View Revisions
2019-07-20 16:59 Kloot Note Edited: 0020035 View Revisions
2019-07-20 17:00 Kloot Assigned To => Kloot
2019-07-20 17:00 Kloot Status new => resolved
2019-07-20 17:00 Kloot Resolution open => fixed
2019-07-20 17:00 Kloot Fixed in Version => 104.0 +git
+Issue History