Re: [Crash-catcher] last abrt valgrind
by Denys Vlasenko
On Wed, 2010-05-19 at 17:01 +0200, Nikola Pajkovsky wrote:
> Do same stuff as before.
> On Wed, 2010-05-19 at 14:55 +0200, Nikola Pajkovsky wrote:
>> run abrtd -dvvv
>> run gui
>> click on report
>> choose bugzilla plugin
>> try to Refresh all information
>> close gui
>> kill abrtd with ctrl+c
Good to know that SEGV is gone.
I'm looking at leaked data, starting from biggest.
==11292== 7,136 bytes in 1 blocks are possibly lost in loss record 1,000 of 1,003
==11292== at 0x4A05255: realloc (vg_replace_malloc.c:476)
==11292== by 0x364E828DB9: set_length (dbus-string.c:364)
==11292== by 0x364E82908E: open_gap (dbus-string.c:426)
==11292== by 0x364E829439: copy (dbus-string.c:1456)
==11292== by 0x364E82789A: marshal_len_followed_by_bytes (dbus-marshal-basic.c:741)
==11292== by 0x364E827B63: _dbus_marshal_write_basic (dbus-marshal-basic.c:773)
==11292== by 0x364E814F30: _dbus_type_writer_write_basic (dbus-marshal-recursive.c:1588)
==11292== by 0x364E819735: dbus_message_iter_append_basic (dbus-message.c:2284)
==11292== by 0x4C2CEC0: store_string(DBusMessageIter*, char const*) (abrt_dbus.cpp:154)
==11292== by 0x4147E5: void store_map<std::string, std::string>(DBusMessageIter*, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::s
==11292== by 0x41497D: void store_map<std::string, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > >
==11292== by 0x41686D: message_received(DBusConnection*, DBusMessage*, void*) (abrt_dbus.h:164)
Three such blocks. "void store_map" part tells that this allocation
is part of dbus return value of map type. Need to determine where
do we have an unfreed message and whether this is a problem.
==11292== 4,080 bytes in 1 blocks are possibly lost in loss record 993 of 1,003
==11292== at 0x4A04360: memalign (vg_replace_malloc.c:532)
==11292== by 0x4A043B9: posix_memalign (vg_replace_malloc.c:660)
==11292== by 0x364DC55F57: ??? (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x364DC567DB: g_slice_alloc (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x364DC568F5: g_slice_alloc0 (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x364E42BF6A: g_type_create_instance (in /lib64/libgobject-2.0.so.0.2200.5)
==11292== by 0x364E410D9B: ??? (in /lib64/libgobject-2.0.so.0.2200.5)
==11292== by 0x364E411D80: g_object_newv (in /lib64/libgobject-2.0.so.0.2200.5)
==11292== by 0x364E412808: g_object_new_valist (in /lib64/libgobject-2.0.so.0.2200.5)
==11292== by 0x364E412A4B: g_object_new (in /lib64/libgobject-2.0.so.0.2200.5)
==11292== by 0x365F41DABE: egg_dbus_connection_new_message_for_method_call (in /usr/lib64/libeggdbus-1.so.0.0.0)
==11292== by 0x365F419A62: egg_dbus_bus_add_match (in /usr/lib64/libeggdbus-1.so.0.0.0)
libeggdbus has quite a number of these.
==11292== 1,586 bytes in 42 blocks are possibly lost in loss record 977 of 1,003
==11292== at 0x4A05974: operator new(unsigned long) (vg_replace_malloc.c:220)
==11292== by 0x365809C2B8: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib64/libstdc++.so.6.0.13)
==11292== by 0x365809D09A: std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned long) (in /usr/lib64/libstdc++.so.6.0.13)
==11292== by 0x365809D4DB: std::string::reserve(unsigned long) (in /usr/lib64/libstdc++.so.6.0.13)
==11292== by 0x4E48BA2: LoadPluginSettings(char const*, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string>
==11292== by 0x406D96: CPluginManager::LoadPlugin(char const*, bool) (PluginManager.cpp:163)
==11292== by 0x408DCC: CPluginManager::LoadPlugins() (PluginManager.cpp:129)
==11292== by 0x417E47: main (Daemon.cpp:824)
==11292==
==11292== 1,646 bytes in 42 blocks are possibly lost in loss record 979 of 1,003
==11292== at 0x4A05974: operator new(unsigned long) (vg_replace_malloc.c:220)
==11292== by 0x365809C2B8: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib64/libstdc++.so.6.0.13)
==11292== by 0x365809D09A: std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned long) (in /usr/lib64/libstdc++.so.6.0.13)
==11292== by 0x365809D4DB: std::string::reserve(unsigned long) (in /usr/lib64/libstdc++.so.6.0.13)
==11292== by 0x4E48C49: LoadPluginSettings(char const*, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string>
==11292== by 0x406D96: CPluginManager::LoadPlugin(char const*, bool) (PluginManager.cpp:163)
==11292== by 0x408DCC: CPluginManager::LoadPlugins() (PluginManager.cpp:129)
==11292== by 0x417E47: main (Daemon.cpp:824)
Apparently a string object not destroyed.
This is somewhat strange, since static object destructors should have freed those.
Any thoughts what is can be?
==11292== 1,488 bytes in 3 blocks are possibly lost in loss record 975 of 1,003
==11292== at 0x4A04360: memalign (vg_replace_malloc.c:532)
==11292== by 0x4A043B9: posix_memalign (vg_replace_malloc.c:660)
==11292== by 0x364DC55F57: ??? (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x364DC56811: g_slice_alloc (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x364DC568F5: g_slice_alloc0 (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x364E42BF6A: g_type_create_instance (in /lib64/libgobject-2.0.so.0.2200.5)
==11292== by 0x364E410D9B: ??? (in /lib64/libgobject-2.0.so.0.2200.5)
==11292== by 0x364E411D80: g_object_newv (in /lib64/libgobject-2.0.so.0.2200.5)
==11292== by 0x364E412808: g_object_new_valist (in /lib64/libgobject-2.0.so.0.2200.5)
==11292== by 0x364E412A4B: g_object_new (in /lib64/libgobject-2.0.so.0.2200.5)
==11292== by 0x365F00AF71: polkit_unix_process_new (in /usr/lib64/libpolkit-gobject-1.so.0.0.0)
==11292== by 0x4E49A9E: polkit_check_authorization(int, char const*) (Polkit.cpp:100)
Similar to libeggdbus, this time it is libpolkit
==11292== 1,488 bytes in 3 blocks are possibly lost in loss record 974 of 1,003
==11292== at 0x4A04360: memalign (vg_replace_malloc.c:532)
==11292== by 0x4A043B9: posix_memalign (vg_replace_malloc.c:660)
==11292== by 0x364DC55F57: ??? (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x364DC56811: g_slice_alloc (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x364DC13F60: g_ptr_array_sized_new (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x364DC39B2A: g_main_context_new (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x364DC39D1C: g_main_context_default (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x364DC3A664: g_main_loop_new (in /lib64/libglib-2.0.so.0.2200.5)
==11292== by 0x417D6E: main (Daemon.cpp:810)
This is strange. We do this:
GMainLoop* pMainloop = NULL;
...
pMainloop = g_main_loop_new(NULL, FALSE);
...
run_main_loop(pMainloop);
...
if (pMainloop)
g_main_loop_unref(pMainloop);
so it should not be happening.
I got curious whether we reached exit cleanly. I look for "exiting" string
in the log and I don't see it. This is not good.
I think in order to make this sort of logs more reliable, this needs to be done.
First, abrtd should be killed with "killall abrtd', not ^C - I am not sure
valgrind handles it correctly.
Second, and more importantly: not every unfreed data is a leak.
Example:
const char* printable_string(const char *str)
{
static char *saved[4];
static unsigned cur_saved = 0;
char *dst = unicode_conv_to_printable(str);
free(saved[cur_saved]);
saved[cur_saved] = dst;
cur_saved = (cur_saved + 1) & (ARRAY_SIZE(saved)-1);
return dst;
}
This function after a few calls always keeps 4 last strings in saved[] array.
This is obviously (read the code) not a leak, yet on exit valgrind will complain.
Therefore, in order to find real leaks, you need to perform potentially leaking
operation *many times*, and watch for unfreed things which increase linearly.
Therefore, we need two logs:
valgrind --leak-check=full abrtd -dvvv 2>&1 | tee LOG1
(is there an option to save valgrind log to a file?)
run gui, click on report, choose bugzilla plugin, press Refresh, close gui
killall abrtd
this will be a baseline for comparison, and
valgrind --leak-check=full abrtd -dvvv 2>&1 | tee LOG_MANY
run gui, click on report, choose bugzilla plugin, press Refresh, close gui
run gui, click on report, choose bugzilla plugin, press Refresh, close gui
run gui, click on report, choose bugzilla plugin, press Refresh, close gui
run gui, click on report, choose bugzilla plugin, press Refresh, close gui
run gui, click on report, choose bugzilla plugin, press Refresh, close gui
run gui, click on report, choose bugzilla plugin, press Refresh, close gui
run gui, click on report, choose bugzilla plugin, press Refresh, close gui
run gui, click on report, choose bugzilla plugin, press Refresh, close gui
run gui, click on report, choose bugzilla plugin, press Refresh, close gui
run gui, click on report, choose bugzilla plugin, press Refresh, close gui
(more repeats - better leak detection resolution)
killall abrtd
Now we can compare the logs, and if some thing is reported as leaked
ten times more than in LOG1, it likely is a real leak.
--
vda
14 years
[Crash-catcher] [PATCH 1/2] strbuf_free_nobuf() returns allocated buffer
by Nikola Pajkovsky
Signed-off-by: Nikola Pajkovsky <npajkovs(a)redhat.com>
---
lib/Utils/strbuf.c | 4 +++-
lib/Utils/strbuf.h | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/Utils/strbuf.c b/lib/Utils/strbuf.c
index 4c9bdda..0206233 100644
--- a/lib/Utils/strbuf.c
+++ b/lib/Utils/strbuf.c
@@ -41,9 +41,11 @@ void strbuf_free(struct strbuf *strbuf)
free(strbuf);
}
-void strbuf_free_nobuf(struct strbuf *strbuf)
+char* strbuf_free_nobuf(struct strbuf *strbuf)
{
+ char *ret = strbuf->buf;
free(strbuf);
+ return ret;
}
diff --git a/lib/Utils/strbuf.h b/lib/Utils/strbuf.h
index bc843f9..3f3ba51 100644
--- a/lib/Utils/strbuf.h
+++ b/lib/Utils/strbuf.h
@@ -36,7 +36,7 @@ struct strbuf
extern struct strbuf *strbuf_new();
extern void strbuf_free(struct strbuf *strbuf);
/* Releases strbuf, but not the internal buffer. */
-extern void strbuf_free_nobuf(struct strbuf *strbuf);
+extern char* strbuf_free_nobuf(struct strbuf *strbuf);
extern void strbuf_clear(struct strbuf *strbuf);
extern struct strbuf *strbuf_append_char(struct strbuf *strbuf, char c);
extern struct strbuf *strbuf_append_str(struct strbuf *strbuf, const char *str);
--
1.6.5.2
14 years
Re: [Crash-catcher] valgrind abrtd -dvvv
by Nikola Pajkovsky
On 05/19/2010 03:38 PM, Denys Vlasenko wrote:
> On Wed, 2010-05-19 at 14:55 +0200, Nikola Pajkovsky wrote:
>> run abrtd -dvvv
>> run gui
>> click on report
>> choose bugzilla plugin
>> try to Refresh all information
>> close gui
>> kill abrtd with ctrl+c
>>
>> result is that abrt abnormally leaks and die with SIGSEGV
>
> Yes, I see it. It's pointless to try to plug leaks until
> we stop it from SEGVing. Let's find out why it SEGVs:
>
> abrtd: UnRegistered Reporter plugin TicketUploader
> abrtd: Got signal 2, exiting
> ==14157== Thread 1:
> ==14157== Invalid read of size 2
> ==14157== at 0x364C035430: getenv (in /lib64/libc-2.12.so)
> ==14157== by 0x3D46A1A339: PR_GetEnv (in /lib64/libnspr4.so)
> ==14157== by 0x3D47ADDB32: PKIX_PL_Shutdown (pkix_pl_lifecycle.c:293)
> ==14157== by 0x3D47A9F4B8: PKIX_Shutdown (pkix_lifecycle.c:231)
> ==14157== by 0x3D47A18850: nss_Shutdown (nssinit.c:1032)
> ==14157== by 0x3D49218574: rpmFreeCrypto (in /usr/lib64/librpmio.so.1.0.0)
> ==14157== by 0x40ABF5: CRPM::~CRPM() (RPM.cpp:31)
> ==14157== by 0x364C035FF1: exit (in /lib64/libc-2.12.so)
> ==14157== by 0x4C29291: xfunc_die() (logging.cpp:37)
> ==14157== by 0x4C2940F: error_msg_and_die(char const*, ...) (logging.cpp:117)
> ==14157== by 0x4184E2: main (Daemon.cpp:927)
> ==14157== Address 0xbf0e6b2 is not stack'd, malloc'd or (recently) free'd
> ==14157==.
> ==14157==.
> ==14157== Process terminating with default action of signal 11 (SIGSEGV)
> ==14157== Access not within mapped region at address 0xBF0E6B2
> ==14157== at 0x364C035430: getenv (in /lib64/libc-2.12.so)
> ==14157== by 0x3D46A1A339: PR_GetEnv (in /lib64/libnspr4.so)
> ==14157== by 0x3D47ADDB32: PKIX_PL_Shutdown (pkix_pl_lifecycle.c:293)
> ==14157== by 0x3D47A9F4B8: PKIX_Shutdown (pkix_lifecycle.c:231)
> ==14157== by 0x3D47A18850: nss_Shutdown (nssinit.c:1032)
> ==14157== by 0x3D49218574: rpmFreeCrypto (in /usr/lib64/librpmio.so.1.0.0)
> ==14157== by 0x40ABF5: CRPM::~CRPM() (RPM.cpp:31)
> ==14157== by 0x364C035FF1: exit (in /lib64/libc-2.12.so)
> ==14157== by 0x4C29291: xfunc_die() (logging.cpp:37)
> ==14157== by 0x4C2940F: error_msg_and_die(char const*, ...) (logging.cpp:117)
> ==14157== by 0x4184E2: main (Daemon.cpp:927)
>
> Obviously, it SEGVed in PR_GetEnv. Possibly a bogus pointer.
> I will look into the source of these functions.
>
> Just to make sure that environment is not corrupted, can you add this
> to CRPM::~CRPM() and rerun the test?
>
> CRPM::~CRPM()
> {
> + log("Environment dump:");
> + char **pp = environ;
> + if (pp) while (*pp)
> + log(" envvar:'%s'", *pp++);
> + log("Environment dump done");
> rpmcliFini(m_poptContext);
> }
>
Here we go:
abrtd: Environment dump:
abrtd: envvar:'HOSTNAME=redhat.com'
abrtd: envvar:'SHELL=/bin/bash'
abrtd: envvar:'HISTSIZE=1000'
abrtd: envvar:'QTDIR=/usr/lib64/qt-3.3'
abrtd: envvar:'QTINC=/usr/lib64/qt-3.3/include'
abrtd: envvar:'USER=root'
abrtd: envvar:'LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=0
1;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:'
abrtd: envvar:'COBBLER_SERVER=lab.rhts.englab.brq.redhat.com'
abrtd: envvar:'MAIL=/var/spool/mail/root'
abrtd: envvar:'PATH=/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin'
abrtd: envvar:'PWD=/root'
abrtd: envvar:'LANG=en_US.UTF-8'
abrtd: envvar:'KDE_IS_PRELINKED=1'
abrtd: envvar:'KDEDIRS=/usr'
abrtd: envvar:'HISTCONTROL=ignoredups'
abrtd: envvar:'SHLVL=1'
abrtd: envvar:'HOME=/root'
abrtd: envvar:'LOGNAME=root'
abrtd: envvar:'QTLIB=/usr/lib64/qt-3.3/lib'
abrtd: envvar:'CVS_RSH=ssh'
abrtd: envvar:'LESSOPEN=|/usr/bin/lesspipe.sh %s'
abrtd: envvar:'DISPLAY=:0.0'
abrtd: envvar:'G_BROKEN_FILENAMES=1'
abrtd: envvar:'XAUTHORITY=/root/.xauthyDbCiX'
abrtd: envvar:'_=/usr/sbin/abrtd' <---- this line looks weird
> If "Environment dump done" message is not reached, we have corrupted environment,
> and the bug is not in libnspr. Otherwise, it is likely in libnspr.
>
Right, "Environment dump done" message is not reached!
--
Nikola
14 years
Re: [Crash-catcher] valgrind abrtd -dvvv
by Denys Vlasenko
[added CC crash-catcher(a)lists.fedorahosted.org]
On Wed, 2010-05-19 at 15:38 +0200, Denys Vlasenko wrote:
> On Wed, 2010-05-19 at 14:55 +0200, Nikola Pajkovsky wrote:
> > run abrtd -dvvv
> > run gui
> > click on report
> > choose bugzilla plugin
> > try to Refresh all information
> > close gui
> > kill abrtd with ctrl+c
> >
> > result is that abrt abnormally leaks and die with SIGSEGV
>
> Yes, I see it. It's pointless to try to plug leaks until
> we stop it from SEGVing. Let's find out why it SEGVs:
Digging into it:
> ==14157== Process terminating with default action of signal 11 (SIGSEGV)
> ==14157== Access not within mapped region at address 0xBF0E6B2
> ==14157== at 0x364C035430: getenv (in /lib64/libc-2.12.so)
> ==14157== by 0x3D46A1A339: PR_GetEnv (in /lib64/libnspr4.so)
PR_IMPLEMENT(char*) PR_GetEnv(const char *var)
{
char *ev;
if (!_pr_initialized) _PR_ImplicitInitialization();
_PR_LOCK_ENV();
ev = _PR_MD_GET_ENV(var);
_PR_UNLOCK_ENV();
return ev;
}
char *
_PR_MD_GET_ENV(const char *name)
{
return getenv(name);
}
So PR_GetEnv just does getenv without changing the var pointer...
> ==14157== by 0x3D47ADDB32: PKIX_PL_Shutdown (pkix_pl_lifecycle.c:293)
PKIX_Error *
PKIX_PL_Shutdown(void *plContext)
{
PKIX_UInt32 numLeakedObjects = 0;
PKIX_ENTER(OBJECT, "PKIX_PL_Shutdown");
if (!pkix_pl_initialized) {
/* The library was not initilized */
PKIX_RETURN(OBJECT);
}
PR_DestroyLock(classTableLock);
pkix_pl_HttpCertStore_Shutdown(plContext);
numLeakedObjects = pkix_pl_lifecycle_ObjectLeakCheck(NULL);
if (PR_GetEnv("NSS_STRICT_SHUTDOWN")) { <==================== here
PORT_Assert(numLeakedObjects == 0);
}
if (plContext != NULL) {
PKIX_PL_NssContext_Destroy(plContext);
}
pkix_pl_initialized = PKIX_FALSE;
PKIX_RETURN(OBJECT);
}
Aha, it's a PR_GetEnv call with const string, not a variable from somewhere.
Const string can't be corrupted. "Our environment is corrupted" theory
gets a boost...
> ==14157== by 0x3D47A9F4B8: PKIX_Shutdown (pkix_lifecycle.c:231)
> ==14157== by 0x3D47A18850: nss_Shutdown (nssinit.c:1032)
> ==14157== by 0x3D49218574: rpmFreeCrypto (in /usr/lib64/librpmio.so.1.0.0)
> ==14157== by 0x40ABF5: CRPM::~CRPM() (RPM.cpp:31)
> ==14157== by 0x364C035FF1: exit (in /lib64/libc-2.12.so)
> ==14157== by 0x4C29291: xfunc_die() (logging.cpp:37)
> ==14157== by 0x4C2940F: error_msg_and_die(char const*, ...) (logging.cpp:117)
> ==14157== by 0x4184E2: main (Daemon.cpp:927)
>
> Obviously, it SEGVed in PR_GetEnv. Possibly a bogus pointer.
> I will look into the source of these functions.
Digging deeper here is not needed for now. We need to check environ
and maybe try running under gdb.
--
vda
14 years
[Crash-catcher] [PATCH] fix tuns of memory leaks in CRPM
by Nikola Pajkovsky
Signed-off-by: Nikola Pajkovsky <npajkovs(a)redhat.com>
---
src/Daemon/RPM.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/Daemon/RPM.cpp b/src/Daemon/RPM.cpp
index c40f9a0..50b0348 100644
--- a/src/Daemon/RPM.cpp
+++ b/src/Daemon/RPM.cpp
@@ -28,6 +28,8 @@ CRPM::CRPM()
CRPM::~CRPM()
{
+ rpmFreeCrypto();
+ rpmFreeRpmrc();
rpmcliFini(m_poptContext);
}
@@ -48,6 +50,7 @@ void CRPM::LoadOpenGPGPublicKey(const char* pFileName)
if (fedoraFingerprint != NULL)
{
m_setFingerprints.insert(fedoraFingerprint);
+ free(fedoraFingerprint);
}
}
free(pkt);
@@ -71,6 +74,7 @@ bool CRPM::CheckFingerprint(const char* pPackage)
rpmtd td = rpmtdNew();
headerGet(header, rpmTags[ii] , td, HEADERGET_DEFAULT);
char* pgpsig = rpmtdFormat(td, RPMTD_FORMAT_PGPSIG , NULL);
+ rpmtdFree(td);
if (pgpsig)
{
std::string PGPSignatureText = pgpsig;
@@ -81,7 +85,6 @@ bool CRPM::CheckFingerprint(const char* pPackage)
{
std::string headerFingerprint = PGPSignatureText.substr(Key_ID_pos + sizeof (" Key ID ") - 1);
- rpmtdFree(td);
if (headerFingerprint != "")
{
if (m_setFingerprints.find(headerFingerprint) != m_setFingerprints.end())
--
1.6.5.2
14 years
[Crash-catcher] r house
by Zieman Yokely
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\*\generator Msftedit 4.40.13.7441;}{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Msftedit 4.40.13.7441;}{\colortbl ;\red0\green0\blue255;\red192\green80\blue77;\red0\green176\blue80;\red204\green180\blue0;\red255\green0\blue0;\red223\green206\blue4;\red155\green0\blue211;\red79\green129\blue189;\red165\green165\blue165;\red128\green158\blue194;\red247\green150\blue70;\red0\green77\blue187;\red75\green172\blue198;\red221\green132\blue132;\red51\green51\blue51;\red158\green124\blue124;\red155\green187\blue89;}
{\*\generator Msftedit 4.40.13.7441;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs32{\field{\*\fldinst{HYPERLINK "h{\*\dd 4.40.13.7441;}ttp://www.ma95.ru"}}{\fldrslt{\ul\cf1 http://www.ma95.ru}}}\f0\cf1\b\fs32 - Order the cheapest medications now!\par
Viagra \cf4 Cialis \cf3 Viagra Professional \cf5 Cialis Professional \cf6 Viagra Super Active+ \cf3 Cialis Super Active+ \cf7 Levitra\cf0 \cf8 Viagra Soft Tabs \cf9 Cialis Soft Tabs\cf10 \cf11 Levitra Professional \cf4 Female Viagra \cf12 Propecia \cf7 Acomplia \cf6 Xenical\cf0 \cf5 Brand Levitra \cf13 Female Cialis \cf14 Levitra Super Active+ \cf15 Tamiflu\cf0 \cf7 VPXL\cf0 \cf16 Viagra Soft Flavoured \cf5 Brand Viagra \cf17 Brand Cialis\cf0
{\*\generator Msftedit 4.40.13.7441;}}
14 years
[Crash-catcher] sturbers of
by Tao Celentano
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\*\generator Msftedit 0.16.9.8442;}{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Msftedit 0.16.9.8442;}{\colortbl ;\red0\green0\blue255;\red192\green80\blue77;\red0\green176\blue80;\red204\green180\blue0;\red255\green0\blue0;\red223\green206\blue4;\red155\green0\blue211;\red79\green129\blue189;\red165\green165\blue165;\red128\green158\blue194;\red247\green150\blue70;\red0\green77\blue187;\red75\green172\blue198;\red221\green132\blue132;\red51\green51\blue51;\red158\green124\blue124;\red155\green187\blue89;}
{\*\generator Msftedit 0.16.9.8442;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs32{\field{\*\fldinst{HYPERLINK "h{\*\dd 0.16.9.8442;}ttp://www.xa66.ru"}}{\fldrslt{\ul\cf1 http://www.xa66.ru}}}\f0\cf1\b\fs32 - Order the cheapest medications now!\par
Viagra \cf4 Cialis \cf3 Viagra Professional \cf5 Cialis Professional \cf6 Viagra Super Active+ \cf3 Cialis Super Active+ \cf7 Levitra\cf0 \cf8 Viagra Soft Tabs \cf9 Cialis Soft Tabs\cf10 \cf11 Levitra Professional \cf4 Female Viagra \cf12 Propecia \cf7 Acomplia \cf6 Xenical\cf0 \cf5 Brand Levitra \cf13 Female Cialis \cf14 Levitra Super Active+ \cf15 Tamiflu\cf0 \cf7 VPXL\cf0 \cf16 Viagra Soft Flavoured \cf5 Brand Viagra \cf17 Brand Cialis\cf0
{\*\generator Msftedit 0.16.9.8442;}}
14 years
[Crash-catcher] [PATCH] kill yumdownloader if abrt-debuginfo-install is terminated mid-flight
by Denys Vlasenko
This patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=569694
569694 - yumdownloader not killed by ABRT
Please review.
--
vda
diff -x '*.po' -d -urpN abrt.9/src/Daemon/abrt-debuginfo-install abrt.a/src/Daemon/abrt-debuginfo-install
--- abrt.9/src/Daemon/abrt-debuginfo-install 2010-05-12 14:27:08.000000000 +0200
+++ abrt.a/src/Daemon/abrt-debuginfo-install 2010-05-14 16:17:49.030188584 +0200
@@ -249,8 +249,11 @@ download_packages() {
cmd="yumdownloader $yum_repo_opts --quiet $pkg"
$debug && echo "Running: $cmd" >&2
# eval is needed to strip away ''s in $yum_repo_opts
- eval $cmd >>yumdownloader.OUT 2>&1
+ eval $cmd >>yumdownloader.OUT 2>&1 &
+ CHILD_PID=$!
+ wait
err=$?
+ CHILD_PID=""
echo "exitcode:$err" >>yumdownloader.OUT
echo >>yumdownloader.OUT
test $err = 0 || echo "Download of $pkg failed!"
@@ -319,6 +322,11 @@ cd "$tempdir" || exit 2
abort_if_low_on_disk_space 1024
+# A hook to stop yumdownloader, in case we are terminated by kill -TERM etc.
+CHILD_PID=
+trap 'test x"$CHILD_PID" != x"" && kill -- "$CHILD_PID"' EXIT
+
+
$debug && echo "Downloading rpms to $tempdir"
14 years
[Crash-catcher] [PATCH] do not create Python dumps if argv[0] is not absolute
by Denys Vlasenko
This patch should fix bug 547407 rhythmbox crash: abrt says "Executable doesn't belong to any package"
Please review
--
vda
diff -x '*.po' -d -urpN abrt.8/src/Hooks/abrt_exception_handler.py.in abrt.9/src/Hooks/abrt_exception_handler.py.in
--- abrt.8/src/Hooks/abrt_exception_handler.py.in 2010-03-29 17:56:48.000000000 +0200
+++ abrt.9/src/Hooks/abrt_exception_handler.py.in 2010-05-12 20:06:04.833275892 +0200
@@ -30,9 +30,6 @@ import subprocess
def write_dump(pid, tb):
executable = "Exception raised from python shell"
if sys.argv[0]:
- # FIXME: is this reliable?!
- # what if argv[0] is relative and we chdir'ed somewhere
- # during execution?
executable = os.path.abspath(sys.argv[0])
command = ["/usr/libexec/abrt-hook-python"]
@@ -79,10 +76,15 @@ def handleMyException((etype, value, tb)
# "-c" appears in this case:
# $ python -c 'import sys; print "argv0 is:%s" % sys.argv[0]'
# argv0 is:-c
- if sys.argv[0] and sys.argv[0] != "-c":
- syslog.syslog("abrt: detected unhandled Python exception in %s" % sys.argv[0])
- else: # interactive Python etc
+ if not sys.argv[0] or sys.argv[0] == "-c":
+ # Looks like interactive Python - abort dumping
syslog.syslog("abrt: detected unhandled Python exception")
+ throw
+ syslog.syslog("abrt: detected unhandled Python exception in %s" % sys.argv[0])
+ if sys.argv[0][0] != "/":
+ # Relative path - can't reliably determine package
+ # this script belongs to - abort dumping
+ throw
elist = traceback.format_exception(etype, value, tb)
tblast = traceback.extract_tb(tb, limit=None)
14 years