Author Topic: Finishing background tagging jobs never gets anywhere  (Read 1959 times)

os2bird

  • Community Member
  • Posts: 94
  • Hero Points: 11
Finishing background tagging jobs never gets anywhere
« on: October 15, 2014, 11:42:12 am »
Hi! Got a problem with SlickEdit 19 beta 6 on 64-bit linux when quitting the editor while background tagging is taking place: It never quits.

A dialog popped up saying "Finishing background tagging jobs". Stops at 2%,  the remaining figure remains stuck at 26276 files.  Pressing the cancel button does nothing.

Threads and thread stacks as GDB sees them:

Program received signal SIGINT, Interrupt.
[Switching to Thread 0x7f496f764780 (LWP 16591)]
0x00007f496f37a196 in __pthread_mutex_unlock_usercnt (mutex=0x2596620 <gmulti_session+2112>, decr=1) at pthread_mutex_unlock.c:64
64   pthread_mutex_unlock.c: No such file or directory.
(gdb) info threads
  Id   Target Id         Frame
  6    Thread 0x7f49677b3700 (LWP 16608) "vs_exe" 0x00007f496c6451ed in poll () at ../sysdeps/unix/syscall-template.S:81
  5    Thread 0x7f496873a700 (LWP 16609) "vs_exe" 0x00007f496c6366c7 in sched_yield () at ../sysdeps/unix/syscall-template.S:81
  4    Thread 0x7f4967e15700 (LWP 16610) "vs_exe" pthread_cond_timedwait ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
  3    Thread 0x7f4966fb2700 (LWP 16611) "vs_exe" pthread_cond_wait ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  2    Thread 0x7f496795c700 (LWP 16642) "vs_exe" pthread_cond_wait ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
* 1    Thread 0x7f496f764780 (LWP 16591) "vs_exe" 0x00007f496f37a196 in __pthread_mutex_unlock_usercnt (
    mutex=0x2596620 <gmulti_session+2112>, decr=1) at pthread_mutex_unlock.c:64
(gdb) thread apply all bt

Thread 6 (Thread 0x7f49677b3700 (LWP 16608)):
#0  0x00007f496c6451ed in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f496bc546cc in g_main_context_poll (n_fds=2, fds=0x7f4960006420, timeout=-1, context=0x7f4960004a20,
    priority=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:4007
#2  g_main_context_iterate (context=context@entry=0x7f4960004a20, block=block@entry=1, dispatch=dispatch@entry=1,
    self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3708
#3  0x00007f496bc547f8 in g_main_context_iteration (context=0x7f4960004a20, may_block=1)
    at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3774
#4  0x00007f496d2da646 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/slickedit/v19b6/bin/libQtCore.so.4
#5  0x00007f496d2ab802 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/slickedit/v19b6/bin/libQtCore.so.4
#6  0x00007f496d2aba57 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/slickedit/v19b6/bin/libQtCore.so.4
#7  0x00007f496d1ade67 in QThread::exec() () from /opt/slickedit/v19b6/bin/libQtCore.so.4
#8  0x00007f496d28b6dc in ?? () from /opt/slickedit/v19b6/bin/libQtCore.so.4
#9  0x00007f496d1b0eaf in ?? () from /opt/slickedit/v19b6/bin/libQtCore.so.4
#10 0x00007f496f376fda in start_thread (arg=0x7f49677b3700) at pthread_create.c:308
#11 0x00007f496c64f03d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 5 (Thread 0x7f496873a700 (LWP 16609)):
#0  0x00007f496c6366c7 in sched_yield () at ../sysdeps/unix/syscall-template.S:81
#1  0x0000000001226fd5 in slickedit::SEListTagsThread::runAsReader() ()
#2  0x0000000001674e2f in cmThread::ThreadStartRoutine(void*) ()
#3  0x00007f496f376fda in start_thread (arg=0x7f496873a700) at pthread_create.c:308
#4  0x00007f496c64f03d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 4 (Thread 0x7f4967e15700 (LWP 16610)):
#0  pthread_cond_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x000000000167580e in cmWaitable::cond_wait(int) ()
#2  0x00000000016758b2 in cmWaitHandle::waitOne(int) ()
#3  0x000000000166da64 in cmThreadEvent::wait(cmMutex&, int) ()
#4  0x00000000012277e3 in slickedit::SEListTagsThread::runAsTagger() ()
#5  0x0000000001674e2f in cmThread::ThreadStartRoutine(void*) ()
#6  0x00007f496f376fda in start_thread (arg=0x7f4967e15700) at pthread_create.c:308
#7  0x00007f496c64f03d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 3 (Thread 0x7f4966fb2700 (LWP 16611)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x000000000167583d in cmWaitable::cond_wait(int) ()
#2  0x00000000016758b2 in cmWaitHandle::waitOne(int) ()
#3  0x000000000166da64 in cmThreadEvent::wait(cmMutex&, int) ()
#4  0x000000000166fb40 in cmRWLock::writeLock(int, bool) ()
#5  0x00000000012a64de in tag_clear_embedded ()
#6  0x000000000121d813 in slickedit::SEPrivateListTagsTarget::insertAsynchronousTagsInDatabase(bool (*)(void*), void*) const ()
#7  0x0000000001227930 in slickedit::SEListTagsThread::runAsWriter() ()
#8  0x0000000001674e2f in cmThread::ThreadStartRoutine(void*) ()
#9  0x00007f496f376fda in start_thread (arg=0x7f4966fb2700) at pthread_create.c:308
#10 0x00007f496c64f03d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7f496795c700 (LWP 16642)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x000000000167583d in cmWaitable::cond_wait(int) ()
#2  0x00000000016758b2 in cmWaitHandle::waitOne(int) ()
#3  0x000000000191792d in fileDateThread::run() ()
#4  0x0000000001674e2f in cmThread::ThreadStartRoutine(void*) ()
#5  0x00007f496f376fda in start_thread (arg=0x7f496795c700) at pthread_create.c:308
#6  0x00007f496c64f03d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7f496f764780 (LWP 16591)):
#0  0x00007f496f37a196 in __pthread_mutex_unlock_usercnt (mutex=0x2596620 <gmulti_session+2112>, decr=1)
    at pthread_mutex_unlock.c:64
#1  0x000000000167030d in cmRWLock::waitOnWriteLock(int) ()
#2  0x0000000001671948 in VSDOUBLEWRITEGUARD::VSDOUBLEWRITEGUARD(cmRWLock&, cmMutex&) ()
#3  0x000000000056f9bd in btMultiSession::openDB(slickedit::SEString const&, bool) ()
#4  0x000000000128c7cd in vsTagOpenDB ()
#5  0x000000000128cb9b in tag_open_db ()
#6  0x00000000005e5baf in call_dllpc(int, int, namelist_t*) ()
#7  0x00000000005e82a5 in run_proc(int) ()
#8  0x00000000007396f4 in call_key_common(filewindow_t*, int, int, unsigned int, unsigned int, bool, unsigned char) ()
#9  0x0000000000743d5f in vs_call_key_new(filewindow_t*, int, int) ()
#10 0x000000000067cc66 in gui_edit_event_message ()
#11 0x000000000063b89a in vsCtlSlickCExecuteEvent ()
#12 0x000000000063e996 in vsQTSlickCExecuteKeyEvent ()
#13 0x00007f496d8650fa in QWidget::event(QEvent*) () from /opt/slickedit/v19b6/bin/libQtGui.so.4
#14 0x00007f496dc73fe6 in QFrame::event(QEvent*) () from /opt/slickedit/v19b6/bin/libQtGui.so.4
#15 0x00007f496dcf0723 in QAbstractScrollArea::event(QEvent*) () from /opt/slickedit/v19b6/bin/libQtGui.so.4
#16 0x00007f496d817f54 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/slickedit/v19b6/bin/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#17 0x00007f496d81d429 in QApplication::notify(QObject*, QEvent*) () from /opt/slickedit/v19b6/bin/libQtGui.so.4
#18 0x00007f496d2ac9bc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /opt/slickedit/v19b6/bin/libQtCore.so.4
#19 0x00007f496d8b3649 in ?? () from /opt/slickedit/v19b6/bin/libQtGui.so.4
#20 0x00007f496d8b3a45 in ?? () from /opt/slickedit/v19b6/bin/libQtGui.so.4
#21 0x00007f496d88fe14 in QApplication::x11ProcessEvent(_XEvent*) () from /opt/slickedit/v19b6/bin/libQtGui.so.4
#22 0x00007f496d8b7942 in ?? () from /opt/slickedit/v19b6/bin/libQtGui.so.4
#23 0x00007f496bc543d0 in g_main_dispatch (context=0x269ed00)
    at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3066
#24 g_main_context_dispatch (context=context@entry=0x269ed00)
    at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3642
#25 0x00007f496bc54738 in g_main_context_iterate (context=context@entry=0x269ed00, block=block@entry=1,
    dispatch=dispatch@entry=1, self=<optimized out>)
    at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3713
#26 0x00007f496bc547f8 in g_main_context_iteration (context=0x269ed00, may_block=1)
    at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3774
#27 0x00007f496d2da5df in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/slickedit/v19b6/bin/libQtCore.so.4
#28 0x00007f496d8b75de in ?? () from /opt/slickedit/v19b6/bin/libQtGui.so.4
#29 0x00007f496d2ab802 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/slickedit/v19b6/bin/libQtCore.so.4
#30 0x00007f496d2aba57 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/slickedit/v19b6/bin/libQtCore.so.4
#31 0x00007f496d2b07d7 in QCoreApplication::exec() () from /opt/slickedit/v19b6/bin/libQtCore.so.4
#32 0x000000000051a534 in vmain(int, char**) ()
#33 0x0000000001330cd3 in xmain ()
#34 0x00000000004e7239 in main ()
(gdb)


Note that the process isn't unresponsive from the window manager point of view, just never getting anywhere. Also noticed that the threads are doing something, at least calls to pthread_cond_timedwait() occured at intervals.

This might not be new with v19 beta 6 and a nor is it a huge problem, since it can be worked around by making sure no tagging is taking place when quitting... It just very annoying when it happens as doing killall vs_exe always runs the risk of screwing up the config or other things.

Kind Regards,
 bird.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2706
  • Hero Points: 413
Re: Finishing background tagging jobs never gets anywhere
« Reply #1 on: October 15, 2014, 04:50:13 pm »
I'll try to reproduce this today.

rcordeau

  • Community Member
  • Posts: 17
  • Hero Points: 1
Re: Finishing background tagging jobs never gets anywhere
« Reply #2 on: October 15, 2014, 11:51:05 pm »
Yeah - happening for me as well with C++ projects in both Linux 64-bit (debian) and Windows 7 64-bit.  This is a project that was able to be tagged completely once on linux, but retagging never progresses.  On Windows, it never completes from the start.