Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1494 closed defect (duplicate)

Sporadic persistent hang at 0ad startup

Reported by: picobyte Owned by: picobyte
Priority: Must Have Milestone:
Component: Core engine Keywords: hang startup g_ConfigDB.Reload
Cc: roel.kluin@…, com Patch:

Description

Sometimes 0ad hangs at start up: When I run from the console I just get two lines:

$ binaries/system/pyrogenesis
Cache: 500 (total: 7845) MiB
TIMER| InitVfs: 452.811 us
TIMER| InitScripting: 2.5886 ms

... and nothing happens after that.

The strange thing is that it usually doesn't happen, 0ad works normally, but once it has happened, consecutive attempts to run 0ad fail similarly. I have to restart my windowmanager to get it working again.

This happens while running 0ad, from git repository (but also svn repository), Linux 3.2.0-25-generic #40-Ubuntu SMP x86_64 (quad core), Gnome 3

I've tried to debug it using gdb, and it appears to hang at source/ps/GameSetup/Config.cpp, in function CONFIG_Init(), at the line:

g_ConfigDB.Reload(CFG_DEFAULT);

Change History (6)

comment:1 by picobyte, 12 years ago

Actually it requires a restart of my computer rather than a restart of my windowmanager

comment:2 by Deiz, 12 years ago

Milestone: BacklogAlpha 11
Priority: Should HaveMust Have

I experience these same symptoms from time to time. It's definitely a FAM issue, and it only occurs once 0 A.D. has been started at least once before during a given session. Because of that, I assume it's linked with #1347, and it will probably disappear once the patch from #1316 is committed.

On my system (and probably yours), FAM is implemented by gamin. For an interim fix, if 0 A.D. is failing to launch, try killing gam_server.

As the other FAM-related bugs are a 'Must Have' for Alpha 11, I suppose this one ought to be as well.

in reply to:  1 comment:3 by historic_bruno, 12 years ago

Replying to picobyte:

Actually it requires a restart of my computer rather than a restart of my windowmanager

Can you paste the output of "t a a bt full" in gdb, once it freezes? (using "set height 0" first will prevent the continue prompts)

Though it's likely as Deiz says.

comment:4 by picobyte, 12 years ago

killing gam_server works. Thanks a lot. Here's the output of "t a a bt full":

Thread 1 (Thread 0x7ffff7fad780 (LWP 12395)):
#0  0x00007ffff49d4090 in __connect_nocancel () at ../sysdeps/unix/syscall-template.S:82
No locals.
#1  0x00007ffff5df4602 in ?? () from /usr/lib/libfam.so.0
No symbol table info available.
#2  0x00007ffff5df491a in FAMOpen () from /usr/lib/libfam.so.0
No symbol table info available.
#3  0x00000000007ea4af in dir_watch_Add (path=..., dirWatch=...)
    at ../../../source/lib/sysdep/os/linux/dir_watch_fam.cpp:182
        tmpDirWatch = <optimized out>
        req = {reqnum = -183509232}
        __func__ = "dir_watch_Add"
#4  0x00000000007fd80d in vfs_Populate (directory=0xb428d0)
    at ../../../source/lib/file/vfs/vfs_populate.cpp:186
        helper = {m_directory = 0x7ffff7fb4778, m_realDirectory = {px = 0x7fffffffcc10, pn = {
              pi_ = 0x7ffff7ffe2c8}}}
#5  0x00000000007bb880 in vfs_Lookup (pathname=..., startDirectory=0xb428d0, 
    directory=@0x7fffffffcd10: 0xb428d0, pfile=0x7fffffffcd18, flags=<optimized out>)
    at ../../../source/lib/file/vfs/vfs_lookup.cpp:84
        status_ = <optimized out>
        __func__ = "vfs_Lookup"
        addMissingDirectories = false
        createMissingDirectories = false
        skipPopulate = false
        pos = <optimized out>
#6  0x00000000007b2f48 in VFS::GetFileInfo (this=0xb428a0, pathname=..., pfileInfo=0x0)
    at ../../../source/lib/file/vfs/vfs.cpp:84
        directory = 0xb428d0
        file = <optimized out>
        ret = <optimized out>
        __func__ = "GetFileInfo"
#7  0x0000000000581f39 in CConfigDB::Reload (this=<optimized out>, ns=CFG_DEFAULT)
    at ../../../source/ps/ConfigDB.cpp:339
        buffer = {px = 0x0, pn = {pi_ = 0x0}}
        buflen = <optimized out>
        newMap = {_M_t = {
            _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<CStr8 const, std::vector<CParserValue, std::allocator<CParserValue> > > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<CStr8 const, std::vector<CParserValue, std::allocator<CParserValue> > > > >> = {<No data fields>}, <No data fields>}, 
              _M_key_compare = {<std::binary_function<CStr8, CStr8, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = 4294954592, _M_parent = 0x0, 
                _M_left = 0x7ffff70e24d0, _M_right = 0x7ffff7016258}, 
              _M_node_count = 12282208}}}
        filebuf = 0x7fffcc703048 "`\370\301"
        filebufend = <optimized out>
        parserLine = {
          m_Arguments = {<std::_Deque_base<CParserValue, std::allocator<CParserValue> >> = {
              _M_impl = {<std::allocator<CParserValue>> = {<__gnu_cxx::new_allocator<CParserValue>> = {<No data fields>}, <No data fields>}, _M_map = 0xc22f30, _M_map_size = 8, _M_start = {
                  _M_cur = 0xc22f80, _M_first = 0xc22f80, _M_last = 0xc23180, 
                  _M_node = 0xc22f48}, _M_finish = {_M_cur = 0xc22f80, _M_first = 0xc22f80, 
                  _M_last = 0xc23180, _M_node = 0xc22f48}}}, <No data fields>}, 
          m_ParseOK = 160, m_TaskTypeName = {static npos = <optimized out>, 
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb2f1f8 ""}}}
        next = <optimized out>
        __func__ = "Reload"
        parser = {
          m_TaskTypes = {<std::_Vector_base<CParserTaskType, std::allocator<CParserTaskType> >> = {
              _M_impl = {<std::allocator<CParserTaskType>> = {<__gnu_cxx::new_allocator<CParserTaskType>> = {<No data fields>}, <No data fields>}, _M_start = 0xc23a10, _M_finish = 0xc23a30, 
                _M_end_of_storage = 0xc23a30}}, <No data fields>}}
#8  0x00000000005934bd in CONFIG_Init (args=...) at ../../../source/ps/GameSetup/Config.cpp:162
        LINE_156_ = {m_t0 = 2.8800759889999998, m_description = 0x855df8 L"CONFIG_Init"}
        max_history_lines = <optimized out>
#9  0x00000000005a0fdb in Init (args=...) at ../../../source/ps/GameSetup/GameSetup.cpp:875
        hooks = {override_gl_upload_caps = 0, get_log_dir = 0, bundle_logs = 0, 
          translate = 0x562440 <psTranslate(wchar_t const*)>, 
          translate_free = 0x562480 <psTranslateFree(wchar_t const*)>, log = 0, 
          display_error = 0}
        profilerHTTPEnable = <optimized out>
#10 0x000000000041cb98 in RunGameOrAtlas (argc=<optimized out>, argv=<optimized out>)
    at ../../../source/main.cpp:525
        args = {
          m_Args = {<std::_Vector_base<std::pair<CStr8, CStr8>, std::allocator<std::pair<CStr8, CStr8> > >> = {
              _M_impl = {<std::allocator<std::pair<CStr8, CStr8> >> = {<__gnu_cxx::new_allocator<std::pair<CStr8, CStr8> >> = {<No data fields>}, <No data fields>}, _M_start = 0x0, 
                _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, m_Arg0 = {
            path = {static npos = <optimized out>, 
              _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, 
                _M_p = 0xb3e8e8 L"/home/roel/development/git/0ad/binaries/system/pyrogenesis"}}, separator = 47 L'/'}}
        ran_atlas = <optimized out>
        res = <optimized out>
#11 0x00000000004135d7 in main (argc=1, argv=0x7fffffffdef8) at ../../../source/main.cpp:572
No locals.

comment:5 by picobyte, 12 years ago

Resolution: duplicate
Status: newclosed

comment:6 by Kieran P, 12 years ago

Milestone: Alpha 11
Note: See TracTickets for help on using tickets.