'hgtk log' sometimes leave a frozen process on close
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tortoisehg (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
How to reproduce:
- create new file in the repository:
touch newfile
- schedule the new file for commit
hg addremove
- start hgtk commit
hgtk ci
- add a comment and commit using the GUI
- exit hgtk
Expected Result:
-hgtk terminates
Actual Result:
-hgtk does not terminate
-Ctrl-C does not terminate it
This happens with python2.6 (also on Debian unstable), but does not happen with python2.5.
Still present with tortoisehg 0.9.3-1.
The hgtk code tries to exit by raising a SystemExit exception, but the process never terminates. Adding an explicit sys.exit() does not change the described behavior.
Attaching to the dangling process with pdb shows:
https:/
Backtrace using GDB (2 threads):
#0 sem_wait () at ../nptl/
#1 0x00000000004cf048 in PyThread_
#2 0x00000000004d22f2 in lock_PyThread_
#3 0x00000000004a435d in call_function (f=0x16f38c0, throwflag=<value optimized out>) at ../Python/
#4 PyEval_EvalFrameEx (f=0x16f38c0, throwflag=<value optimized out>) at ../Python/
#5 0x00000000004a5b30 in PyEval_EvalCodeEx (co=0x1172198, globals=<value optimized out>, locals=<value optimized out>, args=0x2, argcount=<value optimized out>, kws=<value optimized out>, kwcount=0x0, defs=0x16bc668, defcount=0x1, closure=0x0) at ../Python/
#6 0x00000000004a3eaf in fast_function (f=0x15dd820, throwflag=<value optimized out>) at ../Python/
#7 call_function (f=0x15dd820, throwflag=<value optimized out>) at ../Python/
#8 PyEval_EvalFrameEx (f=0x15dd820, throwflag=<value optimized out>) at ../Python/
#9 0x00000000004a5b30 in PyEval_EvalCodeEx (co=0x16ad3f0, globals=<value optimized out>, locals=<value optimized out>, args=0x2, argcount=<value optimized out>, kws=<value optimized out>, kwcount=0x0, defs=0x116a6e8, defcount=0x1, closure=0x0) at ../Python/
#10 0x00000000004a3eaf in fast_function (f=0x17d0120, throwflag=<value optimized out>) at ../Python/
#11 call_function (f=0x17d0120, throwflag=<value optimized out>) at ../Python/
#12 PyEval_EvalFrameEx (f=0x17d0120, throwflag=<value optimized out>) at ../Python/
#13 0x00000000004a5b30 in PyEval_EvalCodeEx (co=0x16adeb8, globals=<value optimized out>, locals=<value optimized out>, args=0x1, argcount=<value optimized out>, kws=<value optimized out>, kwcount=0x0, defs=0x0, defcount=0x0, closure=0x0) at ../Python/
#14 0x0000000000530ab0 in function_call (func=0x16c1140, arg=0x7f372abf9850, kw=0x0) at ../Objects/
#15 0x000000000041efd7 in PyObject_Call (func=0x16c1140, arg=0x80, kw=0x0) at ../Objects/
#16 0x0000000000426d9f in instancemethod_call (func=0x16c1140, arg=0x7f372abf9850, kw=0x0) at ../Objects/
#17 0x0000000000420519 in PyObject_Call (func=0x113b460, arg=0x80, kw=<value optimized out>) at ../Objects/
#18 0x0000000000424083 in call_function_tail (o=<value optimized out>, name=<value optimized out>, format=<value optimized out>) at ../Objects/
#19 PyObject_CallMethod (o=<value optimized out>, name=<value optimized out>, format=<value optimized out>) at ../Objects/
#20 0x00000000004c4749 in wait_for_
#21 Py_Finalize () at ../Python/
#22 0x00000000004c4223 in Py_Exit () at ../Python/
#23 handle_system_exit () at ../Python/
#24 0x00000000004c4445 in PyErr_PrintEx (set_sys_
#25 0x00000000004c5280 in PyRun_SimpleFil
#26 0x000000000041a467 in Py_Main (argc=0x2ab88080, argv=<value optimized out>) at ../Modules/
#27 0x00007f3729698abd in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=
#28 0x0000000000419749 in _start ()
#0 0x00007f372a86c90b in read () from /lib/libpthread
#1 0x000000000050f648 in posix_read (self=<value optimized out>, args=<value optimized out>) at ../Modules/
#2 0x00000000004a435d in call_function (f=0x17b3280, throwflag=<value optimized out>) at ../Python/
#3 PyEval_EvalFrameEx (f=0x17b3280, throwflag=<value optimized out>) at ../Python/
#4 0x00000000004a5b30 in PyEval_EvalCodeEx (co=0x16e9468, globals=<value optimized out>, locals=<value optimized out>, args=0x0, argcount=<value optimized out>, kws=<value optimized out>, kwcount=0x0, defs=0x0, defcount=0x0, closure=0x16ea050) at ../Python/
#5 0x0000000000530bad in function_call (func=0x16e55f0, arg=0x7f372ac30050, kw=0x17a8d60) at ../Objects/
#6 0x000000000041efd7 in PyObject_Call (func=0x16e55f0, arg=0x17ba734, kw=0x400) at ../Objects/
#7 0x00000000004a2981 in ext_do_call (f=0x16f85e0, throwflag=<value optimized out>) at ../Python/
#8 PyEval_EvalFrameEx (f=0x16f85e0, throwflag=<value optimized out>) at ../Python/
#9 0x00000000004a4897 in fast_function (f=0x16f8380, throwflag=<value optimized out>) at ../Python/
#10 call_function (f=0x16f8380, throwflag=<value optimized out>) at ../Python/
#11 PyEval_EvalFrameEx (f=0x16f8380, throwflag=<value optimized out>) at ../Python/
#12 0x00000000004a4897 in fast_function (f=0x16ecbf0, throwflag=<value optimized out>) at ../Python/
#13 call_function (f=0x16ecbf0, throwflag=<value optimized out>) at ../Python/
#14 PyEval_EvalFrameEx (f=0x16ecbf0, throwflag=<value optimized out>) at ../Python/
#15 0x00000000004a5b30 in PyEval_EvalCodeEx (co=0x16ad0a8, globals=<value optimized out>, locals=<value optimized out>, args=0x1, argcount=<value optimized out>, kws=<value optimized out>, kwcount=0x0, defs=0x0, defcount=0x0, closure=0x0) at ../Python/
#16 0x0000000000530ab0 in function_call (func=0x16c0668, arg=0x116a5d0, kw=0x0) at ../Objects/
#17 0x000000000041efd7 in PyObject_Call (func=0x16c0668, arg=0x17ba734, kw=0x400) at ../Objects/
#18 0x0000000000426d9f in instancemethod_call (func=0x16c0668, arg=0x116a5d0, kw=0x0) at ../Objects/
#19 0x000000000041efd7 in PyObject_Call (func=0x115faf0, arg=0x17ba734, kw=0x400) at ../Objects/
#20 0x000000000049e093 in PyEval_
#21 0x00000000004d26fd in t_bootstrap (boot_raw=
#22 0x00007f372a86573a in start_thread (arg=<value optimized out>) at pthread_
#23 0x00007f37297456dd in clone () at ../sysdeps/
#24 0x0000000000000000 in ?? ()
Note that it deadlock inside the call to Py_Exit(), so it appears to be realted to some resource release code.
ProblemType: Bug
Architecture: i386
Date: Wed Feb 10 14:55:06 2010
DistroRelease: Ubuntu 10.04
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/hgtk
InterpreterPath: /usr/bin/python2.6
Package: tortoisehg 0.9.2-1
PackageArchitec
ProcEnviron:
SHELL=/bin/bash
LANG=en_US.UTF-8
ProcVersionSign
SourcePackage: tortoisehg
Uname: Linux 2.6.32-12-generic i686
Changed in tortoisehg (Ubuntu): | |
status: | Confirmed → Fix Committed |
Changed in tortoisehg (Ubuntu): | |
status: | Fix Committed → Fix Released |
Thank you for taking the time to report the problem.
It would be very useful if you could get a dump of the python call stack. You can do that in this way
-start hgtk log with
hgtk log --nofork --debugger
-the debugger will start write "c" and press return
-the hgtk window will appear; do whatever you think might trigger the bug
-close the hgtk window; if the process does not terminate, you should not get the prompt tat the terminal
-hit CTRL-C
-give the "bt" command
-copy the output and paste it here
Thank you!
Ludovico