Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Complete freeze on player leaving. #3410

Closed
wzdev-ci opened this issue Apr 17, 2012 · 12 comments
Closed

Complete freeze on player leaving. #3410

wzdev-ci opened this issue Apr 17, 2012 · 12 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_bug | by Cyp


Game froze completely (UI frozen, too, that is). Was just as a player left, so could be related.

After attaching a debugger, getting a backtrace, and quitting the debugger, the game unfroze.

(gdb) thread apply all bt full

Thread 7 (Thread 0x7f2ec611a700 (LWP 12470)):
#0  0x00007f2ed7f618dc in __libc_send (fd=<optimized out>, buf=<optimized out>, n=<optimized out>, flags=<optimized out>) at ../sysdeps/unix/sysv/linux/x86_64/send.c:33
        resultvar = 103680
        oldtype = 0
        result = <optimized out>
#1  0x0000000000636cff in socketThreadFunction () at ../../../lib/netplay/netsocket.cpp:404
        sock = 0x37e4690
        writeQueue = @0x7f2ec1a25068
        ret = <optimized out>
        maxfd = <optimized out>
        fds # {fds_bits {8388608, 0 <repeats 15 times>]
        tv # {tv_sec 0, tv_usec = 49996}
        ret = <optimized out>
        __FUNCTION__ = "socketThreadFunction"
#2  0x0000000000674e2b in WZ_THREAD::run (this=0x310f030) at ../../../lib/qtgame/wzapp_qt.h:92
No locals.
#3  0x00007f2ed5c98f95 in QThreadPrivate::start (arg=0x310f030) at thread/qthread_unix.cpp:331
        thr = 0x310f030
        data = 0x30f6510
#4  0x00007f2ed7f59c5c in start_thread (arg=0x7f2ec611a700) at pthread_create.c:301
        pd = 0x7f2ec611a700
        now = <optimized out>
        unwind_buf # {cancel_jmp_buf [jmp_buf = {139838868268800, -5307036292598625306, 140736376591648, 139838868269504, 139839200649216, 4096, 5189293282813643750, 
                5189327058375379942}, mask_was_saved # 0], priv {pad # {0x0, 0x0, 0x0, 0x0}, data {prev # 0x0, cleanup 0x0, canceltype = 0```
        not_first_call = <optimized out>
        robust = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#5  0x00007f2ed4f07fcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
No locals.

Thread 6 (Thread 0x7f2ebffff700 (LWP 12471)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
No locals.
#1  0x00007f2ec483fe43 in ?? () from /usr/lib64/dri/r600_dri.so
No symbol table info available.
#2  0x00007f2ed7f59c5c in start_thread (arg=0x7f2ebffff700) at pthread_create.c:301
        pd = 0x7f2ebffff700
        now = <optimized out>
        unwind_buf # {cancel_jmp_buf [jmp_buf = {139838766446336, -5307036292598625306, 139839168463680, 139838766447040, 139839200649216, 4096, 5189520489267956710, 
                5189327058375379942}, mask_was_saved # 0], priv {pad # {0x0, 0x0, 0x0, 0x0}, data {prev # 0x0, cleanup 0x0, canceltype = 0]}
        not_first_call = <optimized out>
        robust = <optimized out>
---Type <return> to continue, or q <return> to quit---
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#3  0x00007f2ed4f07fcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
No locals.

Thread 5 (Thread 0x7f2ebc29e700 (LWP 12472)):
#0  0x00007f2ed4eff353 in *__GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
        resultvar = 18446744073709551100
        oldtype = 0
        result = <optimized out>
#1  0x00007f2ebcb2a3fe in snd1_pcm_wait_nocheck (pcm=0x36d94f0, timeout=1000) at pcm.c:2367
        pfd = 0x7f2ebc29dd70
        revents = 0
        npfds = 1
        err = <optimized out>
        err_poll = <optimized out>
        __FUNCTION__ = "snd1_pcm_wait_nocheck"
#2  0x00007f2ed88978b2 in ALSAProc (ptr=0x367a110) at /var/tmp/portage/media-libs/openal-1.13/work/openal-soft-1.13/Alc/alsa.c:372
        state = <optimized out>
        pDevice = 0x367a110
        data = 0x3676980
        areas = 0x36b1260
        avail = 788
        commitres = <optimized out>
        offset = 2048
        frames = 1024
        WritePtr = <optimized out>
        err = <optimized out>
#3  0x00007f2ed887a73a in StarterFunc (ptr=<optimized out>) at /var/tmp/portage/media-libs/openal-1.13/work/openal-soft-1.13/Alc/alcThread.c:95
        inf = 0x36b8520
#4  0x00007f2ed7f59c5c in start_thread (arg=0x7f2ebc29e700) at pthread_create.c:301
        pd = 0x7f2ebc29e700
        now = <optimized out>
        unwind_buf # {cancel_jmp_buf [jmp_buf = {139838702085888, -5307036292598625306, 139839168463680, 139838702086592, 139839200649216, 4096, 5189526450145692646, 
                5189327058375379942}, mask_was_saved # 0], priv {pad # {0x0, 0x0, 0x0, 0x0}, data {prev # 0x0, cleanup 0x0, canceltype = 0]}
        not_first_call = <optimized out>
        robust = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#5  0x00007f2ed4f07fcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
No locals.

Thread 4 (Thread 0x7f2ebba9d700 (LWP 12473)):
---Type <return> to continue, or q <return> to quit---
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
No locals.
#1  0x00007f2ed5c9967b in wait (time=18446744073709551615, this=0x3677ea0) at thread/qwaitcondition_unix.cpp:88
        code = <optimized out>
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x36d5bb0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
        returnValue = 239
#3  0x00007f2ed5c96015 in QSemaphore::acquire (this=0x36d8bf0, n=1) at thread/qsemaphore.cpp:144
        locker # {val 57498545}
#4  0x00000000004bae05 in fpathThreadFunc () at ../../src/fpath.cpp:85
        job # {propulsion PROPULSION_TYPE_HOVER, droidType # DROID_WEAPON, destX 4416, destY # 1216, origX 4607, origY # 1138, dstStructure {map # {x 32767, 
              y # 32767}, size {x # -65535, y -65535], droidID # 163259, moveType FMT_MOVE, owner # 6, blockingMap 0x7f2ec1a7c540, acceptNearest # true, deleted false}
        result # {droidID 163259, sMove # {Status MOVEINACTIVE, pathIndex # 0, numPoints 3, asPath # 0x4624240, destination {x # 4416, y 1216}, src # {x 0, y = 0}, 
            target # {x 0, y # 0}, speed 0, moveDir # 0, bumpDir 0, bumpTime # 0, lastBump 0, pauseTime # 0, bumpX 0, bumpY # 0, shuffleStart 0, iVertSpeed = 0, 
            iAttackRuns # {0, 0, 0], retval FPR_OK, originalDest # {x 4416, y = 1216]
        __FUNCTION__ = "fpathThreadFunc"
#5  0x0000000000674e2b in WZ_THREAD::run (this=0x36d9800) at ../../../lib/qtgame/wzapp_qt.h:92
No locals.
#6  0x00007f2ed5c98f95 in QThreadPrivate::start (arg=0x36d9800) at thread/qthread_unix.cpp:331
        thr = 0x36d9800
        data = 0x36d9c00
#7  0x00007f2ed7f59c5c in start_thread (arg=0x7f2ebba9d700) at pthread_create.c:301
        pd = 0x7f2ebba9d700
        now = <optimized out>
        unwind_buf # {cancel_jmp_buf [jmp_buf = {139838693693184, -5307036292598625306, 140736376591648, 139838693693888, 139839200649216, 4096, 5189529748143705062, 
                5189327058375379942}, mask_was_saved # 0], priv {pad # {0x0, 0x0, 0x0, 0x0}, data {prev # 0x0, cleanup 0x0, canceltype = 0]}
        not_first_call = <optimized out>
        robust = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#8  0x00007f2ed4f07fcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
No locals.

Thread 3 (Thread 0x7f2ebabbd700 (LWP 12497)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
No locals.
#1  0x00007f2ed6246594 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f2ed655f180) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
No locals.
#2  0x00007f2ed62465c9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x7f2ed656d254) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
No locals.
#3  0x00007f2ed7f59c5c in start_thread (arg=0x7f2ebabbd700) at pthread_create.c:301
        pd = 0x7f2ebabbd700
        now = <optimized out>
        unwind_buf # {cancel_jmp_buf [jmp_buf = {139838678095616, -5307036292598625306, 139839168463680, 139838678096320, 139839200649216, 4096, 5189532067426044902, 
                5189327058375379942}, mask_was_saved # 0], priv {pad # {0x0, 0x0, 0x0, 0x0}, data {prev # 0x0, cleanup 0x0, canceltype = 0]}
---Type <return> to continue, or q <return> to quit---
        not_first_call = <optimized out>
        robust = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#4  0x00007f2ed4f07fcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
No locals.

Thread 2 (Thread 0x7f2eb97a9700 (LWP 12498)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
No locals.
#1  0x00007f2ed5c9967b in wait (time=18446744073709551615, this=0x3c73e70) at thread/qwaitcondition_unix.cpp:88
        code = <optimized out>
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x3c722a0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
        returnValue = 239
#3  0x00007f2ed5c96015 in QSemaphore::acquire (this=0x3c6e860, n=1) at thread/qsemaphore.cpp:144
        locker # {val 63382177}
#4  0x000000000051c8fd in dangerThreadFunc (data=<optimized out>) at ../../src/map.cpp:1834
No locals.
#5  0x0000000000674e2b in WZ_THREAD::run (this=0x3195ec0) at ../../../lib/qtgame/wzapp_qt.h:92
No locals.
#6  0x00007f2ed5c98f95 in QThreadPrivate::start (arg=0x3195ec0) at thread/qthread_unix.cpp:331
        thr = 0x3195ec0
        data = 0x4051020
#7  0x00007f2ed7f59c5c in start_thread (arg=0x7f2eb97a9700) at pthread_create.c:301
        pd = 0x7f2eb97a9700
        now = <optimized out>
        unwind_buf # {cancel_jmp_buf [jmp_buf = {139838657042176, -5307036292598625306, 140736376585632, 139838657042880, 139839200649216, 4096, 5189532606444440550, 
                5189327058375379942}, mask_was_saved # 0], priv {pad # {0x0, 0x0, 0x0, 0x0}, data {prev # 0x0, cleanup 0x0, canceltype = 0]}
        not_first_call = <optimized out>
        robust = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#8  0x00007f2ed4f07fcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
No locals.

Thread 1 (Thread 0x7f2ed9db8780 (LWP 12466)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
No locals.
#1  0x00007f2ed5c980b3 in QMutexPrivate::wait (this=0x31132d0, timeout=-1) at thread/qmutex_unix.cpp:84
        errorCode = <optimized out>
#2  0x00007f2ed5c94aed in QMutex::lock (this=0x3101110) at thread/qmutex.cpp:204
        spinCount = <optimized out>
        lastSpinCount = <optimized out>
---Type <return> to continue, or q <return> to quit---
        maximumSpinCount = <optimized out>
        self = <optimized out>
        isLocked = <optimized out>
#3  0x0000000000638d68 in socketFlush (sock=0x39ec050) at ../../../lib/netplay/netsocket.cpp:649
        __FUNCTION__ = "socketFlush"
#4  0x000000000062c901 in NETflush () at ../../../lib/netplay/netplay.cpp:1369
No locals.
#5  0x0000000000518145 in gameLoop () at ../../src/loop.cpp:687
        renderBudget = -14
        didTick = true
        __FUNCTION__ = "gameLoop"
        lastFlushTime = 2721482
        previousUpdateWasRender = false
        before = <optimized out>
        renderReturn = GAMECODE_FASTEXIT
        after = <optimized out>
#6  0x000000000051a0f5 in runGameLoop () at ../../src/main.cpp:905
No locals.
#7  mainLoop () at ../../src/main.cpp:1011
No locals.
#8  0x000000000067289b in WzMainWindow::paintGL (this=0x31a2d90) at ../../../lib/qtgame/wzapp_qt.cpp:268
No locals.
#9  0x00007f2ed7552e40 in QGLWidget::glDraw (this=0x31a2d90) at qgl.cpp:4521
        d = 0x31a3100
#10 0x00007f2ed75527c9 in QGLWidget::paintEvent (this=0x31a2d90) at qgl.cpp:4319
No locals.
#11 0x00007f2ed6abc97d in QWidget::event (this=0x31a2d90, event=0x7fffbdbbc8b0) at kernel/qwidget.cpp:8441
        d = 0x31a3100
#12 0x00007f2ed7557e11 in QGLWidget::event (this=0x31a2d90, e=0x7fffbdbbc8b0) at qgl.cpp:4302
        d = <optimized out>
#13 0x00007f2ed6a6b064 in QApplicationPrivate::notify_helper (this=0x30ab490, receiver=0x31a2d90, e=0x7fffbdbbc8b0) at kernel/qapplication.cpp:4481
        consumed = <optimized out>
#14 0x00007f2ed6a6fbda in QApplication::notify (this=<optimized out>, receiver=0x31a2d90, e=0x7fffbdbbc8b0) at kernel/qapplication.cpp:4360
        d = 0x30ab490
        res = false
#15 0x00007f2ed5d8107b in QCoreApplication::notifyInternal (this=0x309d350, receiver=0x31a2d90, event=0x7fffbdbbc8b0) at kernel/qcoreapplication.cpp:787
        threadData = 0x30ab630
        returnValue = <optimized out>
        result = false
        cbdata = {0x31a2d90, 0x7fffbdbbc8b0, 0x7fffbdbbc80f}
        d = <optimized out>
#16 0x00007f2ed6ab9858 in sendSpontaneousEvent (event=0x7fffbdbbc8b0, receiver=0x31a2d90) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
No locals.
#17 QWidgetPrivate::drawWidget (this=0x31a3100, pdev=0x31a2da0, rgn=..., offset=..., flags=3, sharedPainter=0x0, backingStore=0x0) at kernel/qwidget.cpp:5528
        paintEngine = 0x37ac630
---Type <return> to continue, or q <return> to quit---
        e # {<QEvent> {_vptr.QEvent # 0x7f2ed74eac30, static staticMetaObject {d # {superdata 0x0, stringdata # 0x7f2ed5e4e4a0 "QEvent", data 0x7f2ed5e4ee80, 
                extradata # 0x0], d 0x0, t # 12, posted 0, spont # 1, m_accept 1, reserved # 0}, m_rect {x1 # 0, y1 0, x2 # 1023, y2 767}, m_region = {
            d # 0x7f2ec1769190, static shared_empty {ref = {
_q_value # 15}, rgn 0x0, xrectangles # 0x0, qt_rgn 0x0], m_erased = false}
        onScreen = true
        asRoot = true
        alsoOnScreen = true
        toBePainted # {d 0x7f2ec1769190, static shared_empty # {ref {_q_value # 15}, rgn 0x0, xrectangles # 0x0, qt_rgn 0x0]
        recursive = false
        alsoInvisible = false
#18 0x00007f2ed6c78c65 in QWidgetPrivate::repaint_sys (this=0x31a3100, rgn=...) at painting/qbackingstore.cpp:1617
        q = 0x31a2d90
        engine = <optimized out>
        noPartialUpdateSupport = <optimized out>
        toBePainted # {d 0x7f2ec1769190, static shared_empty # {ref {_q_value # 15}, rgn 0x0, xrectangles # 0x0, qt_rgn 0x0]
#19 0x00007f2ed6aaf9b4 in QWidgetPrivate::syncBackingStore (this=0x31a3100) at kernel/qwidget.cpp:1854
No locals.
#20 0x00007f2ed6abce7a in QWidget::event (this=0x31a2d90, event=0x7f2ec16e3f70) at kernel/qwidget.cpp:8588
        d = 0x31a3100
#21 0x00007f2ed7557e11 in QGLWidget::event (this=0x31a2d90, e=0x7f2ec16e3f70) at qgl.cpp:4302
        d = <optimized out>
#22 0x00007f2ed6a6b064 in QApplicationPrivate::notify_helper (this=0x30ab490, receiver=0x31a2d90, e=0x7f2ec16e3f70) at kernel/qapplication.cpp:4481
        consumed = <optimized out>
#23 0x00007f2ed6a6fbda in QApplication::notify (this=<optimized out>, receiver=0x31a2d90, e=0x7f2ec16e3f70) at kernel/qapplication.cpp:4360
        d = 0x30ab490
        res = false
#24 0x00007f2ed5d8107b in QCoreApplication::notifyInternal (this=0x309d350, receiver=0x31a2d90, event=0x7f2ec16e3f70) at kernel/qcoreapplication.cpp:787
        threadData = 0x30ab630
        returnValue = <optimized out>
        result = false
        cbdata = {0x31a2d90, 0x7f2ec16e3f70, 0x7fffbdbbd2ef}
        d = <optimized out>
#25 0x00007f2ed5d84834 in sendEvent (event=0x7f2ec16e3f70, receiver=0x31a2d90) at kernel/qcoreapplication.h:215
No locals.
#26 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x30ab630) at kernel/qcoreapplication.cpp:1428
        pe = @0x7f2ec1736b40
        e = 0x7f2ec16e3f70
        r = 0x31a2d90
        locker # {val 51033712}
        startOffset = 0
        i = @0x30ab664
#27 0x00007f2ed5dabe33 in sendPostedEvents () at kernel/qcoreapplication.h:220
No locals.
#28 postEventSourceDispatch (s=0x3094dc0) at kernel/qeventdispatcher_glib.cpp:277
        source = 0x3094dc0
#29 0x00007f2ed2e71072 in g_main_dispatch (context=0x309fce0) at gmain.c:2441
---Type <return> to continue, or q <return> to quit---
        dispatch = 0x7f2ed5dabe20 <postEventSourceDispatch(GSource*, GSourceFunc, gpointer)>
        was_in_call = 0
        user_data = 0x0
        callback = 0
        cb_funcs = 0x0
        cb_data = 0x0
        current_source_link # {data 0x3094dc0, next = 0x0}
        need_destroy = <optimized out>
        source = 0x3094dc0
        current = 0x309f070
        i = <optimized out>
#30 g_main_context_dispatch (context=0x309fce0) at gmain.c:3011
No locals.
#31 0x00007f2ed2e71868 in g_main_context_iterate (context=0x309fce0, block=1, dispatch=1, self=<optimized out>) at gmain.c:3089
        max_priority = 0
        timeout = 0
        some_ready = 1
        nfds = 4
        allocated_nfds = <optimized out>
        fds = <optimized out>
#32 0x00007f2ed2e71a41 in g_main_context_iteration (context=0x309fce0, may_block=1) at gmain.c:3152
        retval = <optimized out>
#33 0x00007f2ed5dabfcf in QEventDispatcherGlib::processEvents (this=0x3090990, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
        d = 0x30909b0
        canWait = true
        result = <optimized out>
#34 0x00007f2ed6b1075e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
        d = 0x30909b0
        returnValue = false
#35 0x00007f2ed5d80422 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
        d = 0x7f2ec019f6b0
#36 0x00007f2ed5d80664 in QEventLoop::exec (this=0x7fffbdbbd5c0, flags=...) at kernel/qeventloop.cpp:201
        d = 0x7f2ec019f6b0
        app = 0x309d350
#37 0x00007f2ed5d84aeb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
        threadData = 0x30ab630
        eventLoop # {<QObject> {_vptr.QObject # 0x7f2ed60b18f0, static staticMetaObject {d # {superdata 0x0, stringdata # 0x7f2ed5e3bdc0 "QObject", data 0x7f2ed5e3be60, 
                extradata # 0x7f2ed60a9520], d_ptr {d # 0x7f2ec019f6b0}, static staticQtMetaObject {d # {superdata 0x0, stringdata = 0x7f2ed5e44a20 "Qt", 
                data # 0x7f2ed5e482e0, extradata 0x0]}, static staticMetaObject # {d {superdata # 0x7f2ed60a9500, stringdata 0x7f2ed5e4e2a0 "QEventLoop", 
              data # 0x7f2ed5e4e2c0, extradata 0x0]}
        returnCode = <optimized out>
#38 0x000000000051ab4e in realmain (argc=1, argv=<optimized out>) at ../../src/main.cpp:1313
        utfargv = <optimized out>
        __FUNCTION__ = "realmain"
        engine # {<QAbstractFileEngineHandler> {_vptr.QAbstractFileEngineHandler = 0x6900f0}, <No data fields>}
---Type <return> to continue, or q <return> to quit---
        w = 1024
        buf = "Using language: System locale\000\000\000@\004\000\000\000\000\000\000\377n\\\000B\000\000\000\360n\\\000\000\000\000\000\310\064\033\325.\177\000\000 \004\002\000\000\000\000\000\340\273\n\003\000\000\000\000\020\004\000\000\000\000\000\000\240N\033\325.\177\000\000\240N\033\325.\177\000\000Z\234\352\324.\177\000\000\360n\\\000\000\000\000\000\310\064\033\325.\177\000\000\200\213\001\001\000\000\000\000H+\223\000\000\000\000\000\001\000\000\000\000\000\000\000\270\370\273\275\377\177\000\000PYG\000\000\000\000\000\004f\346\324.\177\000\000@\v\223\000\000\000\000\000\200\367\273\275\377\177\000\000`\217F\000\000\000\000\000\062WG\000\000\000\000\000`\217F\000\000\000\000\000RWg\000\000\000\000\000\000\370\273\275\377\177\000\000\220Vg\000\000\000\000\000"...
        utfargc = 1
        h = <optimized out>
#39 0x00007f2ed4e5009d in __libc_start_main (main=0x6701f0 <main(int, char**)>, argc=1, ubp_av=0x7fffbdbbf8b8, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffbdbbf8a8) at libc-start.c:226
        result = <optimized out>
        unwind_buf # {cancel_jmp_buf [jmp_buf # {0, -5307036292598625306, 4624224, 140736376600752, 0, 0, 5307182012515060710, 5189333513567833062}, mask_was_saved 0], 
          priv # {pad {0x0, 0x0, 0x675690, 0x7fffbdbbf8b8}, data # {prev 0x0, cleanup # 0x0, canceltype 6772368]}
        not_first_call = <optimized out>
#40 0x0000000000468f89 in _start ()
No symbol table info available.
]}


___
_Issue migrated from [trac:3410](https://developer.wz2100.net/ticket/3410) at 2022-04-16 09:44:46 -0700_
@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 7, 2012

vexed changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 7, 2012

vexed changed resolution from `` to needinfo

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 7, 2012

vexed commented


This still happen in beta 9 ? Looks like you redid most of the code...

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 8, 2012

Cyp changed status from closed to reopened

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 8, 2012

Cyp changed resolution from needinfo to ``

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 8, 2012

Cyp commented


The code I touched recently would execute after the complete freeze, so wouldn't fix it.

Very rare, and think has only happened when hosting, and not if all clients are running on my computer.

I assume it still happens in β9 (although haven't seen it yet).

My current guess is a bug in glibc select()/send() code, but don't know.

Hmmm... In the BUGS section of the select() man page, it says:
Under Linux, select() may report a socket file descriptor as "ready for reading", while nevertheless a subsequent read blocks. This could for example happen when data has arrived but upon examination has wrong checksum and is discarded. There may be other circumstances in which a file descriptor is spuriously reported as ready. Thus it may be safer to use O_NONBLOCK on sockets that should not block.

The freeze was during send(), rather than recv(), but maybe need to make all sockets non-blocking (using the setSocketBlocking() function).

@wzdev-ci
Copy link
Contributor Author

Cyp changed status from reopened to closed

@wzdev-ci
Copy link
Contributor Author

Cyp changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Cyp commented


Make sockets nonblocking as workaround for socket calls unexpectedly blocking.

For some weird reason, select() sometimes returns that a socket write would not block, but the socket write does
block, anyway.

On display in the bottom of a locked manpage for select(), stuck in a disused lavatory with a sign on the door
saying "Beware of the Leopard":
BUGS
Under Linux, select() may report a socket file descriptor as "ready for reading", while nevertheless a
subsequent read blocks. This could for example happen when data has arrived but upon examination has wrong
checksum and is discarded. There may be other circumstances in which a file descriptor is spuriously
reported as ready. Thus it may be safer to use O_NONBLOCK on sockets that should not block.

This would explain a socket read unexpectedly blocking, although the issue is actually a socket write unexpectedly
blocking.

Fixes #3410, or else.

  • Changeset: [/changeset/53ce0a7c38822feda52bc9ba24fd45d02a0fa7cc 53ce0a7c38822feda52bc9ba24fd45d02a0fa7cc]
  • URL: [53]ce0a7c38822feda52bc9ba24fd45d02a0fa7cc

@wzdev-ci
Copy link
Contributor Author

Cyp commented


Make sockets nonblocking as workaround for socket calls unexpectedly blocking.

For some weird reason, select() sometimes returns that a socket write would not block, but the socket write does
block, anyway.

On display in the bottom of a locked manpage for select(), stuck in a disused lavatory with a sign on the door
saying "Beware of the Leopard":
BUGS
Under Linux, select() may report a socket file descriptor as "ready for reading", while nevertheless a
subsequent read blocks. This could for example happen when data has arrived but upon examination has wrong
checksum and is discarded. There may be other circumstances in which a file descriptor is spuriously
reported as ready. Thus it may be safer to use O_NONBLOCK on sockets that should not block.

This would explain a socket read unexpectedly blocking, although the issue is actually a socket write unexpectedly
blocking.

Fixes #3410, or else.

  • Changeset: [/changeset/53ce0a7c38822feda52bc9ba24fd45d02a0fa7cc 53ce0a7c38822feda52bc9ba24fd45d02a0fa7cc]
  • URL: [53]ce0a7c38822feda52bc9ba24fd45d02a0fa7cc

2 similar comments
@wzdev-ci
Copy link
Contributor Author

Cyp commented


Make sockets nonblocking as workaround for socket calls unexpectedly blocking.

For some weird reason, select() sometimes returns that a socket write would not block, but the socket write does
block, anyway.

On display in the bottom of a locked manpage for select(), stuck in a disused lavatory with a sign on the door
saying "Beware of the Leopard":
BUGS
Under Linux, select() may report a socket file descriptor as "ready for reading", while nevertheless a
subsequent read blocks. This could for example happen when data has arrived but upon examination has wrong
checksum and is discarded. There may be other circumstances in which a file descriptor is spuriously
reported as ready. Thus it may be safer to use O_NONBLOCK on sockets that should not block.

This would explain a socket read unexpectedly blocking, although the issue is actually a socket write unexpectedly
blocking.

Fixes #3410, or else.

  • Changeset: [/changeset/53ce0a7c38822feda52bc9ba24fd45d02a0fa7cc 53ce0a7c38822feda52bc9ba24fd45d02a0fa7cc]
  • URL: [53]ce0a7c38822feda52bc9ba24fd45d02a0fa7cc

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 4, 2012

Cyp commented


Make sockets nonblocking as workaround for socket calls unexpectedly blocking.

For some weird reason, select() sometimes returns that a socket write would not block, but the socket write does
block, anyway.

On display in the bottom of a locked manpage for select(), stuck in a disused lavatory with a sign on the door
saying "Beware of the Leopard":
BUGS
Under Linux, select() may report a socket file descriptor as "ready for reading", while nevertheless a
subsequent read blocks. This could for example happen when data has arrived but upon examination has wrong
checksum and is discarded. There may be other circumstances in which a file descriptor is spuriously
reported as ready. Thus it may be safer to use O_NONBLOCK on sockets that should not block.

This would explain a socket read unexpectedly blocking, although the issue is actually a socket write unexpectedly
blocking.

Fixes #3410, or else.

  • Changeset: [/changeset/53ce0a7c38822feda52bc9ba24fd45d02a0fa7cc 53ce0a7c38822feda52bc9ba24fd45d02a0fa7cc]
  • URL: [53]ce0a7c38822feda52bc9ba24fd45d02a0fa7cc

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant