Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Justus Winter <4winter-jNDFPZUTrfQBEfOqpokbeYV0Y/DQsy6Ps0AfqQuZ5sE <at> public.gmane.org>
Subject: Re: [PATCH 2/2] python: annotate all calls into libnotmuch with types
Newsgroups: gmane.mail.notmuch.general
Date: Wednesday 7th December 2011 19:05:56 UTC (over 5 years ago)
Quoting Justus Winter (2011-12-07 19:49:31)
>Quoting Justus Winter (2011-12-06 13:51:08)
>>I began running alot in gdb since I get segfaults within libnotmuch
>>from time to time and managed to get a stack trace pointing to
>>notmuch_database_begin_atomic, but I couldn't figure out what caused
>>it.

And another one:

Reading symbols from /usr/bin/python...Reading symbols from
/usr/lib/debug/usr/bin/python2.7...done.
done.
[New LWP 15188]
[Thread debugging using libthread_db enabled]
Core was generated by `/usr/bin/python /home/teythoon/.local/bin/afew -v
--tag --new'.
Program terminated with signal 6, Aborted.
#0  0x00007f72f2cce405 in *__GI_raise (sig=) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
	in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0  0x00007f72f2cce405 in *__GI_raise (sig=) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007f72f2cd1680 in *__GI_abort () at abort.c:92
#2  0x00007f72f1380bfd in __gnu_cxx::__verbose_terminate_handler() () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007f72f137eda6 in ?? () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007f72f137edd3 in std::terminate() () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007f72f137eece in __cxa_throw () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007f72f16b792e in ChertTable::set_overwritten() const () from
/usr/lib/libxapian.so.22
#7  0x00007f72f16ba7a6 in ChertTable::block_to_cursor(Cursor*, int,
unsigned int) const () from /usr/lib/libxapian.so.22
#8  0x00007f72f16bcc35 in ChertTable::find(Cursor*) const () from
/usr/lib/libxapian.so.22
#9  0x00007f72f1697431 in ChertCursor::find_entry(std::string const&) ()
from /usr/lib/libxapian.so.22
#10 0x00007f72f16c0858 in ?? () from /usr/lib/libxapian.so.22
#11 0x00007f72f16c0c69 in ?? () from /usr/lib/libxapian.so.22
#12 0x00007f72f16a649a in ?? () from /usr/lib/libxapian.so.22
#13 0x00007f72f1621001 in Xapian::Document::Internal::get_value(unsigned
int) const () from /usr/lib/libxapian.so.22
#14 0x00007f72f162103c in Xapian::Document::get_value(unsigned int) const
() from /usr/lib/libxapian.so.22
#15 0x00007f72f238ef23 in notmuch_message_get_header () from
/home/teythoon/.local/lib/libnotmuch.so.2
#16 0x00007f72f25b7f70 in ffi_call_unix64 () from
/usr/lib/python2.7/lib-dynload/_ctypes.so
#17 0x00007f72f25b79eb in ffi_call () from
/usr/lib/python2.7/lib-dynload/_ctypes.so
#18 0x00007f72f25ab9c7 in _call_function_pointer (argcount=2,
resmem=0x7fffc13a0310, restype=, atypes=,
avalues=0x7fffc13a02f0, 
    pProc=0x7f72f238ee50 , flags=4353) at
/home/packages/python/2.7/python2.7-2.7.2/Modules/_ctypes/callproc.c:827
#19 _ctypes_callproc (pProc=0x7f72f238ee50 ,
argtuple=0x0, flags=4353, argtypes=, restype=
    <_ctypes.PyCSimpleType at remote 0xd17c30>, checker=0x0) at
/home/packages/python/2.7/python2.7-2.7.2/Modules/_ctypes/callproc.c:1174
#20 0x00007f72f25a3257 in PyCFuncPtr_call (self=,
inargs=, kwds=0x0)
    at
/home/packages/python/2.7/python2.7-2.7.2/Modules/_ctypes/_ctypes.c:3913
#21 0x000000000041d35a in PyObject_Call
(func=<_FuncPtr(__name__='notmuch_message_get_header') at remote 0xe02530>,
arg=, kw=)
    at ../Objects/abstract.c:2529
#22 0x00000000004b9b4e in do_call (nk=, na=,
pp_stack=0x7fffc13a05f0, func=
    <_FuncPtr(__name__='notmuch_message_get_header') at remote 0xe02530>)
at ../Python/ceval.c:4239
#23 call_function (oparg=, pp_stack=0x7fffc13a05f0) at
../Python/ceval.c:4044
#24 PyEval_EvalFrameEx (f=, throwflag=) at
../Python/ceval.c:2666
#25 0x00000000004b9d27 in fast_function (nk=, na=, n=, pp_stack=0x7fffc13a0730, func=)
    at ../Python/ceval.c:4107
#26 call_function (oparg=, pp_stack=0x7fffc13a0730) at
../Python/ceval.c:4042
#27 PyEval_EvalFrameEx (f=, throwflag=) at
../Python/ceval.c:2666
#28 0x00000000004bfc9d in PyEval_EvalCodeEx (co=0xcd28b0,
globals=, locals=, args=,
argcount=, 
    kws=, kwcount=0, defs=0x0, defcount=0, closure=0x0) at
../Python/ceval.c:3253
#29 0x000000000044b36f in function_call (func=, arg=
    () at remote
0xe6c9d0>, _query=) at remote
0xe6ca50>, _msgs=) at remote
0xe6c990>, _msg=) at remote
0x11a1b10>,), kw=0x0) at ../Objects/funcobject.c:526
#30 0x000000000041d35a in PyObject_Call (func=, arg=, kw=) at
../Objects/abstract.c:2529
#31 0x0000000000432bdb in instancemethod_call (func=, arg=
    () at remote
0xe6c9d0>, _query=) at remote
0xe6ca50>, _msgs=) at remote
0xe6c990>, _msg=) at remote
0x11a1b10>,), kw=0x0) at ../Objects/classobject.c:2578
#32 0x000000000042668c in PyObject_Call (func=, arg=, kw=0x0) at ../Objects/abstract.c:2529
#33 0x00000000004299fc in PyObject_CallFunctionObjArgs
(callable=) at
../Objects/abstract.c:2760
#34 0x0000000000466ebb in PyObject_Unicode (v=
    ) at remote
0xe6c9d0>, _query=) at remote
0xe6ca50>, _msgs=) at remote
0xe6c990>, _msg=) at remote
0x11a1b10>) at ../Objects/object.c:509
#35 0x0000000000494443 in unicode_new (type=0x853200, args=,
kwds=) at ../Objects/unicodeobject.c:8722
#36 0x000000000047ef15 in type_call (type=0x853200, args=
    () at remote
0xe6c9d0>, _query=) at remote
0xe6ca50>, _msgs=) at remote
0xe6c990>, _msg=) at remote
0x11a1b10>,), kwds=0x0) at ../Objects/typeobject.c:721
#37 0x000000000041d35a in PyObject_Call (func=,
arg=, kw=) at ../Objects/abstract.c:2529
#38 0x00000000004b9b4e in do_call (nk=, na=,
pp_stack=0x7fffc13a0e50, func=) at
../Python/ceval.c:4239
#39 call_function (oparg=, pp_stack=0x7fffc13a0e50) at
../Python/ceval.c:4044
#40 PyEval_EvalFrameEx (f=, throwflag=) at
../Python/ceval.c:2666
#41 0x00000000004bfc9d in PyEval_EvalCodeEx (co=0xcd2830,
globals=, locals=, args=,
argcount=, 
    kws=, kwcount=0, defs=0x0, defcount=0, closure=0x0) at
../Python/ceval.c:3253
#42 0x000000000044b36f in function_call (func=, arg=
    () at remote
0xe6c9d0>, _query=) at remote
0xe6ca50>, _msgs=) at remote
0xe6c990>, _msg=) at remote
0x11a1b10>,), kw=0x0) at ../Objects/funcobject.c:526
#43 0x000000000041d35a in PyObject_Call (func=, arg=, kw=) at
../Objects/abstract.c:2529
#44 0x0000000000432bdb in instancemethod_call (func=, arg=
    () at remote
0xe6c9d0>, _query=) at remote
0xe6ca50>, _msgs=) at remote
0xe6c990>, _msg=) at remote
0x11a1b10>,), kw=0x0) at ../Objects/classobject.c:2578
#45 0x000000000041d35a in PyObject_Call (func=, arg=, kw=) at
../Objects/abstract.c:2529
#46 0x00000000004b8cb6 in PyEval_CallObjectWithKeywords
(func=, arg=(), kw=) at
../Python/ceval.c:3890
#47 0x00000000004837c9 in slot_tp_str (self=
    ) at remote
0xe6c9d0>, _query=) at remote
0xe6ca50>, _msgs=) at remote
0xe6c990>, _msg=) at remote
0x11a1b10>) at ../Objects/typeobject.c:5341
#48 0x0000000000466848 in _PyObject_Str (v=
    ) at remote
0xe6c9d0>, _query=) at remote
0xe6ca50>, _msgs=) at remote
0xe6c990>, _msg=) at remote
0x11a1b10>) at ../Objects/object.c:430
#49 0x0000000000471ce9 in PyString_Format (format='Adding tags %s to %s',
args=
    ('juggling', ) at remote
0xe6c9d0>, _query=) at remote
0xe6ca50>, _msgs=) at remote
0xe6c990>, _msg=) at remote
0x11a1b10>)) at ../Objects/stringobject.c:4435
#50 0x00000000004bad8d in PyEval_EvalFrameEx (f=,
throwflag=) at ../Python/ceval.c:1308
#51 0x00000000004bfc9d in PyEval_EvalCodeEx (co=0xbdf930,
globals=, locals=, args=,
argcount=, 
    kws=, kwcount=0, defs=0x0, defcount=0, closure=0x0) at
../Python/ceval.c:3253
#52 0x00000000004b9a03 in fast_function (nk=, na=3,
n=, pp_stack=0x7fffc13a17c0, func=)
    at ../Python/ceval.c:4117
#53 call_function (oparg=, pp_stack=0x7fffc13a17c0) at
../Python/ceval.c:4042
#54 PyEval_EvalFrameEx (f=, throwflag=) at
../Python/ceval.c:2666
#55 0x00000000004b9d27 in fast_function (nk=, na=, n=, pp_stack=0x7fffc13a1900, func=)
    at ../Python/ceval.c:4107
#56 call_function (oparg=, pp_stack=0x7fffc13a1900) at
../Python/ceval.c:4042
#57 PyEval_EvalFrameEx (f=, throwflag=) at
../Python/ceval.c:2666
#58 0x00000000004b9d27 in fast_function (nk=, na=, n=, pp_stack=0x7fffc13a1a40, func=)
    at ../Python/ceval.c:4107
#59 call_function (oparg=, pp_stack=0x7fffc13a1a40) at
../Python/ceval.c:4042
#60 PyEval_EvalFrameEx (f=, throwflag=) at
../Python/ceval.c:2666
#61 0x00000000004c0295 in PyEval_EvalCodeEx (co=0xe44730,
globals=, locals=, args=,
argcount=, 
    kws=, kwcount=0, defs=0x0, defcount=0, closure=0x0) at
../Python/ceval.c:3253
#62 0x00000000004b9a03 in fast_function (nk=, na=2,
n=, pp_stack=0x7fffc13a1c30, func=)
    at ../Python/ceval.c:4117
#63 call_function (oparg=, pp_stack=0x7fffc13a1c30) at
../Python/ceval.c:4042
#64 PyEval_EvalFrameEx (f=, throwflag=) at
../Python/ceval.c:2666
#65 0x00000000004bfc9d in PyEval_EvalCodeEx (co=0xb4a8b0,
globals=, locals=, args=,
argcount=, 
    kws=, kwcount=0, defs=0x0, defcount=0, closure=0x0) at
../Python/ceval.c:3253
#66 0x00000000004c0772 in PyEval_EvalCode (co=,
globals=, locals=) at ../Python/ceval.c:667
#67 0x00000000004dfa22 in run_mod (mod=, filename=, globals=
    {'no_actions': 1, 'configured_filter_chain':
[,
,
, arena=) at
../Python/pythonrun.c:1346
#68 0x00000000004e05b4 in PyRun_FileExFlags (fp=0xb99c10,
filename=0x7fffc13a3346 "/home/teythoon/.local/bin/afew", start=, globals=
    {'no_actions': 1, 'configured_filter_chain':
[,
,
, closeit=1, flags=0x7fffc13a1f60) at
../Python/pythonrun.c:936
#70 0x00000000004f10fd in Py_Main (argc=, argv=) at ../Modules/main.c:599
#71 0x00007f72f2cbaead in __libc_start_main (main=,
argc=, ubp_av=, init=,
fini=, 
    rtld_fini=, stack_end=0x7fffc13a2078) at
libc-start.c:228
#72 0x000000000041f199 in _start ()
(gdb) q

with stderr saying:

terminate called after throwing an instance of
'Xapian::DatabaseModifiedError'
Aborted (core dumped)

This is an uncought c++ exception, right? If so I think it has to be
cought somewhere in libnotmuch and turned into the appropriate error
code (hm, there is only the generic XAPIAN_EXCEPTION, I thought there
was a way to indicate that the db has been modified?).

Justus
 
CD: 4ms