Re: [Crash-catcher] java reports by crash catcher
by Michal Nowak
----- "Mark Wielaard" <mjw(a)redhat.com> wrote:
> Hi,
>
> It would be nice if crash-catcher could be thought about the
> hs_pid*.log
> files that a crashed java process creates. That file contains much
> more
> information that is relevant to the crash than the gdb backtrace that
> is
> currently collected. If it can see if there is a hs_pid###.log file
> (where ### is the process id of the java process that crashed) and
> attached that to the bug report it files that would be appreciated.
>
I am afraid Java exceptions are not supported at the moment (just the
python ones) and thus ABRT is not being run in such cases.
Do you have some example crash, where ABRT stepped in?
Since Java apps exception handling is completely missing, perhaps
some of you guys can help?
> Thanks,
>
> Mark
Michal
>
> _______________________________________________
> Crash-catcher mailing list
> Crash-catcher(a)lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/crash-catcher
13 years, 6 months
[Crash-catcher] [PATCH] add reporters param to dbsu call Report()
by Denys Vlasenko
This only adds the parameter, so far it is just ignored
Run tested.
Please review
--
vda
diff -x '*.po' -d -urpN abrt.6/src/Daemon/CommLayerServerDBus.cpp abrt.7/src/Daemon/CommLayerServerDBus.cpp
--- abrt.6/src/Daemon/CommLayerServerDBus.cpp 2010-02-26 15:08:44.391635781 +0100
+++ abrt.7/src/Daemon/CommLayerServerDBus.cpp 2010-02-26 15:27:31.758672501 +0100
@@ -227,12 +227,11 @@ static int handle_Report(DBusMessage* ca
map_crash_data_t argin1;
r = load_val(&in_iter, argin1);
- if (r == ABRT_DBUS_ERROR)
+ if (r != ABRT_DBUS_MORE_FIELDS)
{
error_msg("dbus call %s: parameter type mismatch", __func__ + 7);
return -1;
}
-
const char* comment = get_crash_data_item_content_or_NULL(argin1, FILENAME_COMMENT) ? : "";
const char* reproduce = get_crash_data_item_content_or_NULL(argin1, FILENAME_REPRODUCE) ? : "";
const char* errmsg = NULL;
@@ -254,7 +253,16 @@ static int handle_Report(DBusMessage* ca
return 0;
}
- /* Second parameter is optional */
+ /* Second parameter: reporters to use */
+ vector_string_t reporters;
+ r = load_val(&in_iter, reporters);
+ if (r == ABRT_DBUS_ERROR)
+ {
+ error_msg("dbus call %s: parameter type mismatch", __func__ + 7);
+ return -1;
+ }
+
+ /* Third parameter is optional */
map_map_string_t user_conf_data;
if (r == ABRT_DBUS_MORE_FIELDS)
{
diff -x '*.po' -d -urpN abrt.6/src/Gui/CCDBusBackend.py abrt.7/src/Gui/CCDBusBackend.py
--- abrt.6/src/Gui/CCDBusBackend.py 2010-02-05 16:08:45.000000000 +0100
+++ abrt.7/src/Gui/CCDBusBackend.py 2010-02-26 15:23:29.800634158 +0100
@@ -181,12 +181,12 @@ class DBusManager(gobject.GObject):
# 2nd param is "force recreating of backtrace etc"
self.daemon().StartJob(UUID, force, timeout=60)
- def Report(self, report, reporters_settings = None):
+ def Report(self, report, reporters, reporters_settings = None):
# map < Plguin_name vec <status, message> >
if reporters_settings:
- self.daemon().Report(report, reporters_settings, reply_handler=self.report_done, error_handler=self.error_handler_cb, timeout=60)
+ self.daemon().Report(report, reporters, reporters_settings, reply_handler=self.report_done, error_handler=self.error_handler_cb, timeout=60)
else:
- self.daemon().Report(report, reply_handler=self.report_done, error_handler=self.error_handler_cb, timeout=60)
+ self.daemon().Report(report, reporters, reply_handler=self.report_done, error_handler=self.error_handler_cb, timeout=60)
def DeleteDebugDump(self,UUID):
return self.daemon().DeleteDebugDump(UUID)
diff -x '*.po' -d -urpN abrt.6/src/Gui/CCMainWindow.py abrt.7/src/Gui/CCMainWindow.py
--- abrt.6/src/Gui/CCMainWindow.py 2010-02-17 16:05:34.000000000 +0100
+++ abrt.7/src/Gui/CCMainWindow.py 2010-02-26 16:00:38.793634038 +0100
@@ -314,11 +314,11 @@ class MainWindow():
self.timer = gobject.timeout_add(100, self.progress_update_cb)
pluginlist = getPluginInfoList(self.ccdaemon)
reporters_settings = pluginlist.getReporterPluginsSettings()
- log2("Report(result,settings):")
+ log2("Report(result,reporters,settings):")
log2(" result:%s", str(result))
# Careful, this will print reporters_settings["Password"] too
log2(" settings:%s", str(reporters_settings))
- self.ccdaemon.Report(result, reporters_settings)
+ self.ccdaemon.Report(result, ["reporter1", "reporter2"], reporters_settings)
log2("Report() returned")
#self.hydrate()
except Exception, ex:
14 years, 2 months
[Crash-catcher] [PATCH] bump SQL table version to 3; add abrt_v3_reportresult table
by Denys Vlasenko
...also reworked version update logic a bit.
Version 0 is no longer supported.
Plugged a leak in check_table() - added sqlite3_free_table()
Run tested. Example log:
abrtd: Loaded plugin SQLite3 v.0.0.2
abrtd: Registered Database plugin 'SQLite3'
abrtd: 4 rows affected by SQL:BEGIN TRANSACTION;CREATE TABLE abrt_v3 (UUID VARCHAR NOT NULL,UID VARCHAR NOT NULL,DebugDumpPath VARCHAR NOT NULL,Count INT NOT NULL DEFAULT 1,Reported INT NOT NULL DEFAULT 0,Time VARCHAR NOT NULL DEFAULT 0,Message VARCHAR NOT NULL DEFAULT '',PRIMARY KEY (UUID,UID));INSERT INTO abrt_v3 SELECT UUID,UID,DebugDumpPath,Count,Reported,Time,Message FROM abrt_v2;DROP TABLE abrt_v2;CREATE TABLE abrt_v3_reportresult (UUID VARCHAR NOT NULL,UID VARCHAR NOT NULL,Reporter VARCHAR NOT NULL,Message VARCHAR NOT NULL DEFAULT '',PRIMARY KEY (UUID,UID,Reporter));COMMIT;
abrtd: 4 rows returned by SQL:SELECT * FROM abrt_v3;
Please review.
--
vda
diff -x '*.po' -d -urpN abrt.4/lib/Plugins/SQLite3.cpp abrt.5/lib/Plugins/SQLite3.cpp
--- abrt.4/lib/Plugins/SQLite3.cpp 2010-02-07 23:11:00.000000000 +0100
+++ abrt.5/lib/Plugins/SQLite3.cpp 2010-02-26 13:28:55.207633942 +0100
@@ -25,9 +25,10 @@
using namespace std;
-#define ABRT_TABLE_VERSION 2
-#define ABRT_TABLE_VERSION_STR "2"
+#define ABRT_TABLE_VERSION 3
+#define ABRT_TABLE_VERSION_STR "3"
#define ABRT_TABLE "abrt_v"ABRT_TABLE_VERSION_STR
+#define ABRT_REPRESULT_TABLE "abrt_v"ABRT_TABLE_VERSION_STR"_reportresult"
#define SQLITE3_MASTER_TABLE "sqlite_master"
#define COL_UUID "UUID"
@@ -38,54 +39,7 @@ using namespace std;
#define COL_TIME "Time"
#define COL_MESSAGE "Message"
-// after a while, we can drop support for update, so a table can stay in
-// normal limits
-static const char *const upate_sql_commands[][ABRT_TABLE_VERSION + 1] = {
- // v0 -> *
- {
- // v0 -> v0
- ";",
- // v0 -> v1
- "ALTER TABLE abrt ADD "COL_MESSAGE" VARCHAR NOT NULL DEFAULT '';",
- // v0 -> v2
- "BEGIN TRANSACTION;"
- "ALTER TABLE abrt RENAME TO abrt_v2;"
- "ALTER TABLE abrt_v2 ADD "COL_MESSAGE" VARCHAR NOT NULL DEFAULT '';"
- "COMMIT;",
-
- },
- //v1 -> *
- {
- // v1 -> v0
- // TODO: does it make sense to support downgrade?
- ";",
- // v1 -> v1
- ";",
- // v1 -> v2
- "BEGIN TRANSACTION;"
- "CREATE TABLE abrt_v2 ("
- COL_UUID" VARCHAR NOT NULL,"
- COL_UID" VARCHAR NOT NULL,"
- COL_DEBUG_DUMP_PATH" VARCHAR NOT NULL,"
- COL_COUNT" INT NOT NULL DEFAULT 1,"
- COL_REPORTED" INT NOT NULL DEFAULT 0,"
- COL_TIME" VARCHAR NOT NULL DEFAULT 0,"
- COL_MESSAGE" VARCHAR NOT NULL DEFAULT '',"
- "PRIMARY KEY ("COL_UUID","COL_UID"));"
- "INSERT INTO abrt_v2 "
- "SELECT "COL_UUID","
- COL_UID","
- COL_DEBUG_DUMP_PATH","
- COL_COUNT","
- COL_REPORTED","
- COL_TIME","
- COL_MESSAGE
- " FROM abrt;"
- "DROP TABLE abrt;"
- "COMMIT;",
- },
-};
-
+#define COL_REPORTER "Reporter"
/* Is this string safe wrt SQL injection?
* PHP's mysql_real_escape_string() treats \, ', ", \x00, \n, \r, and \x1a as special.
@@ -225,15 +179,74 @@ static bool exists_uuid_uid(sqlite3 *db,
return !table.empty();
}
-static void update_from_old_ver(sqlite3 *db, int pOldVersion)
+static void update_from_old_ver(sqlite3 *db, int old_version)
{
- execute_sql(db, upate_sql_commands[pOldVersion][ABRT_TABLE_VERSION]);
+ static const char *const upate_sql_commands[] = {
+ // v0 -> v1
+ NULL,
+ // v1 -> v2
+ "BEGIN TRANSACTION;"
+ "CREATE TABLE abrt_v2 ("
+ COL_UUID" VARCHAR NOT NULL,"
+ COL_UID" VARCHAR NOT NULL,"
+ COL_DEBUG_DUMP_PATH" VARCHAR NOT NULL,"
+ COL_COUNT" INT NOT NULL DEFAULT 1,"
+ COL_REPORTED" INT NOT NULL DEFAULT 0,"
+ COL_TIME" VARCHAR NOT NULL DEFAULT 0,"
+ COL_MESSAGE" VARCHAR NOT NULL DEFAULT '',"
+ "PRIMARY KEY ("COL_UUID","COL_UID"));"
+ "INSERT INTO abrt_v2 "
+ "SELECT "COL_UUID","
+ COL_UID","
+ COL_DEBUG_DUMP_PATH","
+ COL_COUNT","
+ COL_REPORTED","
+ COL_TIME","
+ COL_MESSAGE
+ " FROM abrt;"
+ "DROP TABLE abrt;"
+ "COMMIT;",
+ // v2 -> v3
+ "BEGIN TRANSACTION;"
+ "CREATE TABLE abrt_v3 ("
+ COL_UUID" VARCHAR NOT NULL,"
+ COL_UID" VARCHAR NOT NULL,"
+ COL_DEBUG_DUMP_PATH" VARCHAR NOT NULL,"
+ COL_COUNT" INT NOT NULL DEFAULT 1,"
+ COL_REPORTED" INT NOT NULL DEFAULT 0,"
+ COL_TIME" VARCHAR NOT NULL DEFAULT 0,"
+ COL_MESSAGE" VARCHAR NOT NULL DEFAULT '',"
+ "PRIMARY KEY ("COL_UUID","COL_UID"));"
+ "INSERT INTO abrt_v3 "
+ "SELECT "COL_UUID","
+ COL_UID","
+ COL_DEBUG_DUMP_PATH","
+ COL_COUNT","
+ COL_REPORTED","
+ COL_TIME","
+ COL_MESSAGE
+ " FROM abrt_v2;"
+ "DROP TABLE abrt_v2;"
+ "CREATE TABLE "ABRT_REPRESULT_TABLE" ("
+ COL_UUID" VARCHAR NOT NULL,"
+ COL_UID" VARCHAR NOT NULL,"
+ COL_REPORTER" VARCHAR NOT NULL,"
+ COL_MESSAGE" VARCHAR NOT NULL DEFAULT '',"
+ "PRIMARY KEY ("COL_UUID","COL_UID","COL_REPORTER"));"
+ "COMMIT;",
+ };
+
+ while (old_version < ABRT_TABLE_VERSION)
+ {
+ execute_sql(db, upate_sql_commands[old_version]);
+ old_version++;
+ }
}
static bool check_table(sqlite3 *db)
{
- const char *command = "SELECT NAME, SQL FROM "SQLITE3_MASTER_TABLE" "
- "WHERE TYPE='table';";
+ const char *command = "SELECT NAME FROM "SQLITE3_MASTER_TABLE" "
+ "WHERE TYPE='table' AND NAME like 'abrt_v%';";
char **table;
int ncol, nrow;
char *err;
@@ -245,45 +258,29 @@ static bool check_table(sqlite3 *db)
}
if (!nrow)
{
+ sqlite3_free_table(table);
return false;
}
- string tableName = table[0 + ncol];
- string::size_type pos = tableName.find("_");
- if (pos != string::npos)
+ // table format:
+ // table[0]:"NAME" // table[1]:"SQL" <== field names from SELECT
+ // table[2]:"abrt_vNN" // table[3]:"sql"
+ char *tableName = table[0 + ncol];
+ char *underscore = strchr(tableName, '_');
+ if (underscore)
{
- string tableVersion = tableName.substr(pos + 2);
- if (xatoi_u(tableVersion.c_str()) < ABRT_TABLE_VERSION)
+ int tableVersion = xatoi_u(underscore + 2);
+ sqlite3_free_table(table);
+ if (tableVersion < ABRT_TABLE_VERSION)
{
- update_from_old_ver(db, xatoi_u(tableVersion.c_str()));
+ update_from_old_ver(db, tableVersion);
}
return true;
}
-
- // TODO: after some time could be removed, and if the table is that old,
- // then simply drop it and create new one
-
- // hack for version 0 and 1
- string sql = table[1 + ncol];
- if (sql.find(COL_MESSAGE) != string::npos)
- {
- update_from_old_ver(db, 1);
- return true;
- }
- update_from_old_ver(db, 0);
+ sqlite3_free_table(table);
+ update_from_old_ver(db, 1);
return true;
}
-/*
-static bool check_table()
-{
- vector_database_rows_t table;
- get_table(table, m_pDB,
- "SELECT NAME FROM "SQLITE3_MASTER_TABLE" "
- "WHERE TYPE='table' AND NAME='"ABRT_TABLE"';");
-
- return table.size() == 1;
-}
-*/
CSQLite3::CSQLite3() :
@@ -355,6 +352,14 @@ void CSQLite3::Connect()
COL_MESSAGE" VARCHAR NOT NULL DEFAULT '',"
"PRIMARY KEY ("COL_UUID","COL_UID"));"
);
+ execute_sql(m_pDB,
+ "CREATE TABLE "ABRT_REPRESULT_TABLE" ("
+ COL_UUID" VARCHAR NOT NULL,"
+ COL_UID" VARCHAR NOT NULL,"
+ COL_REPORTER" VARCHAR NOT NULL,"
+ COL_MESSAGE" VARCHAR NOT NULL DEFAULT '',"
+ "PRIMARY KEY ("COL_UUID","COL_UID","COL_REPORTER"));"
+ );
}
}
@@ -412,6 +417,11 @@ void CSQLite3::DeleteRow(const char *pUU
"WHERE "COL_UUID" = '%s';",
pUUID
);
+ execute_sql(m_pDB,
+ "DELETE FROM "ABRT_REPRESULT_TABLE" "
+ "WHERE "COL_UUID" = '%s';",
+ pUUID
+ );
}
else if (exists_uuid_uid(m_pDB, pUUID, pUID))
{
@@ -420,6 +430,11 @@ void CSQLite3::DeleteRow(const char *pUU
"AND ("COL_UID" = '%s' OR "COL_UID" = '-1');",
pUUID, pUID
);
+ execute_sql(m_pDB, "DELETE FROM "ABRT_REPRESULT_TABLE" "
+ "WHERE "COL_UUID" = '%s' "
+ "AND ("COL_UID" = '%s' OR "COL_UID" = '-1');",
+ pUUID, pUID
+ );
}
else
{
@@ -434,6 +449,29 @@ void CSQLite3::DeleteRows_by_dir(const c
return;
}
+ /* Get UID:UUID pair(s) to delete */
+ vector_database_rows_t table;
+ get_table(table, m_pDB,
+ "SELECT * FROM "ABRT_TABLE" "
+ "WHERE "COL_DEBUG_DUMP_PATH" = '%s'",
+ dump_dir
+ );
+ if (table.empty())
+ {
+ return;
+ }
+
+ /* Delete from both tables */
+ vector_database_rows_t::iterator it = table.begin();
+ while (it != table.end())
+ {
+ execute_sql(m_pDB,
+ "DELETE FROM "ABRT_REPRESULT_TABLE" "
+ "WHERE "COL_UUID" = '%s' "
+ "AND ("COL_UID" = '%s');",
+ it->m_sUUID.c_str(), it->m_sUID.c_str()
+ );
+ }
execute_sql(m_pDB,
"DELETE FROM "ABRT_TABLE" "
"WHERE "COL_DEBUG_DUMP_PATH" = '%s'",
14 years, 2 months
[Crash-catcher] A patch to scan dmesg other than syslog at runtime
by Zhu, Peter J
Hi,
Kerneloops scanner should scan syslog at startup once and then dmesg regularly. Original implementation inverted this. Please see patch. Any comments?
--- abrt-1.0.6/lib/Plugins/KerneloopsScanner.cpp.org 2010-02-20 16:48:21.227128064 +0000
+++ abrt-1.0.6/lib/Plugins/KerneloopsScanner.cpp 2010-02-20 16:51:29.436625307 +0000
@@ -39,22 +39,37 @@
CKerneloopsScanner::CKerneloopsScanner()
{
int cnt_FoundOopses;
+ const char *syslog_file = "/var/log/messages";
+ map_plugin_settings_t::const_iterator it = m_pSettings.find("SysLogFile");
+ if (it != m_pSettings.end()) {
+ syslog_file = it->second.c_str();
+ }
- /* Scan dmesg, on first call only */
- cnt_FoundOopses = ScanDmesg();
- if (cnt_FoundOopses > 0)
+ /* Scan syslog, on first call only */
+ cnt_FoundOopses = ScanSysLogFile(syslog_file);
+ if (cnt_FoundOopses > 0) {
SaveOopsToDebugDump();
+ /*
+ * This marker in syslog file prevents us from
+ * re-parsing old oopses (any oops before it is
+ * ignored by ScanSysLogFile()). The only problem
+ * is that we can't be sure here that syslog_file
+ * is the file where syslog(xxx) stuff ends up.
+ */
+ openlog("abrt", 0, LOG_KERN);
+ syslog(
+ LOG_WARNING,
+ "Kerneloops: Reported %u kernel oopses to Abrt",
+ cnt_FoundOopses
+ );
+ closelog();
+ }
}
void CKerneloopsScanner::Run(const char *pActionDir, const char *pArgs, int force)
{
- const char *syslog_file = "/var/log/messages";
- map_plugin_settings_t::const_iterator it = m_pSettings.find("SysLogFile");
- if (it != m_pSettings.end()) {
- syslog_file = it->second.c_str();
- }
- int cnt_FoundOopses = ScanSysLogFile(syslog_file);
+ int cnt_FoundOopses = ScanDmesg();
if (cnt_FoundOopses > 0) {
SaveOopsToDebugDump();
/*
Peter
14 years, 2 months
[Crash-catcher] bugzilla report always crashed
by Zhu, Peter J
Hi,
I used abrt-1.0.6. But it always crashed as it execute add_attachments. The original xml-rpc parameter is
s{s:s,s:s,s:s,s:s}
bug_id_str.
"description", ("File: " + itemname).c_str(),
"filename", itemname.c_str(),
"contenttype", "text/plain",
"data", encoded64
I tried to modify with many ways like adding datasize
s{s:s,s:s,s:s,s:s,s:i}
bug_id_str.
"description", ("File: " + itemname).c_str(),
"filename", itemname.c_str(),
"contenttype", "text/plain",
"data", encoded64
"datasize", strlen(encoded64)
or adding field of bug_id
{s:s,s:s,s:s,s:s,s:s,s:i}
"bug_id", bug_id_str.
"description", ("File: " + itemname).c_str(),
"filename", itemname.c_str(),
"contenttype", "text/plain",
"data", encoded64
But I always got same crash with signal 6(abort). Any idea?
Thanks,
Peter
14 years, 2 months
Re: [Crash-catcher] [PATCH] new bugzilla reporter
by Denys Vlasenko
Hi,
This is the review of Nikola's new bz code.
> static int32_t abrt_errno;
This should be a member of "struct ctx" and it should be just "int".
>static const char* abrt_strerror(bugzilla_codes code)
>{
> return NULL;
>}
Unused function.
const char* reporter = NULL;
xmlrpc_read_string(env, reporter_member, &reporter);
xmlrpc_DECREF(reporter_member);
if (env->fault_occurred)
{
abrt_errno = ABRTE_BUGZILLA_XMLRPC_ERROR;
return NULL;
}
if (*reporter != '\0')
{
VERB3 log("get bug reporter: %s", reporter);
^^^^^^^^^^^^^^^^^^^^ perhaps "got bug reporter", not "get"?
abrt_errno = ABRTE_BUGZILLA_OK;
return reporter;
}
free((void*)reporter);
abrt_errno = ABRTE_BUGZILLA_NO_DATA;
return NULL;
Looks like reporter should be char*, not const char* - the fact that you
need to cast it in free() hints about it. There are many other cases
where it makes sense to s/const char*/char*/.
for (int32_t i = 0; i < array_size; i++)
i should be just "int".
int32_t ctx::get_bug_id(xmlrpc_env* env, xmlrpc_value* result_xml)
{
...
xmlrpc_int bug_id = -1;
xmlrpc_read_int(env, bug, &bug_id);
xmlrpc_DECREF(bug);
...
return bug_id;
}
Apparently return type should be xmlrpc_int.
xmlrpc_value* ctx::get_member(xmlrpc_env* env, const char* member, xmlrpc_value* result_xml)
{
xmlrpc_value* cc_member = NULL;
xmlrpc_struct_find_value(env, result_xml, member, &cc_member);
if (env->fault_occurred)
{
abrt_errno = ABRTE_BUGZILLA_XMLRPC_ERROR;
return NULL;
}
if (cc_member)
return cc_member;
abrt_errno = ABRTE_BUGZILLA_XMLRPC_MISSING_MEMBER;
return NULL;
}
I think you can just "return cc_member" without checking for NULL.
Caller can just look at the value (and I grepped for it - it actually
does exactly that). Then you can drop ABRTE_BUGZILLA_XMLRPC_MISSING_MEMBER
const - it is only used for this case.
get_bug_resolution() and get_bug_status() can likewise be simplified
to return error indicator as NULL, then ABRTE_BUGZILLA_NO_DATA is not needed too.
xmlrpc_int dup_id_int = -1;
xmlrpc_read_int(env, dup_id, &dup_id_int);
xmlrpc_DECREF(dup_id);
if (env->fault_occurred)
{
abrt_errno = ABRTE_BUGZILLA_XMLRPC_ERROR;
return -1;
}
VERB3 log("get dup_id: %i", dup_id_int);
Formally, cast is needed: (int)dup_id_int. We don't really know for sure xmlrpc_int
is "int", not "long".
int32_t ctx::get_bug_info(xmlrpc_env* env, struct bug_info* bz, uint32_t bug_id)
^^^^^^^ just int?
{
xmlrpc_value* param = xmlrpc_build_value(env, "(s)", to_string(bug_id).c_str());
if (env->fault_occurred)
{
abrt_errno = ABRTE_BUGZILLA_XMLRPC_ERROR;
return -1;
}
...
You have many functions which return 0/-1 and set abrt_errno to ABRTE_BUGZILLA_XMLRPC_ERROR.
It looks like abrt_errno and env->fault_occurred nearly mirror each other.
How about this: add a "xmlrpc_env env;" member to ctx, do not set abrt_errno
to ABRTE_BUGZILLA_XMLRPC_ERROR (you may actually drop ABRTE_BUGZILLA_XMLRPC_ERROR const then)
and check "if (env.fault_occurred)" instead of "if (abrt_errno == ABRTE_BUGZILLA_XMLRPC_ERROR)".
With such changes, in the code above you can drop "xmlrpc_env* env" param
and drop "abrt_errno = ABRTE_BUGZILLA_XMLRPC_ERROR" assignment.
The same simplification will be possible in many other places.
xmlrpc_env env;
xmlrpc_env_init(&env);
ctx bz_server(BugzillaXMLRPC.c_str(), NoSSLVerify);
update_client(_("Logging into bugzilla..."));
if ((Login == "") && (Password == ""))
{
VERB3 log("Empty login and password");
throw CABRTException(EXCEP_PLUGIN, _("Empty login and password. Please check Bugzilla.conf"));
}
Move "ctx bz_server" below "if()". "xmlrpc_env env" will be simply gone
if you decide to do what I suggest in prev paragraph.
if (result)
xmlrpc_DECREF(result);
IIRC xmlrpc_DECREF(NULL) is safe, you don't need to check for NULL.
--
vda
14 years, 2 months
[Crash-catcher] Adding proxy support for abrt
by Zhu, Peter J
Hi,
Is there any plan to add proxy support for abrt? I hope we can adding some keys like http_proxy in abrt.conf and abrtd would read it each time it's startup. With this, abrt can report to a bugzilla behind a firewall. I guess it's NOT a big deal. But I don't know how to make xmlrpc call utilize proxy setting. Any help?
Peter
14 years, 2 months
[Crash-catcher] Future development?
by Nick Williams
Hi there! I've had a system up and running for a while that I was thinking
of converting to open-source and it has a large overlap with
crash-catcher/ABRT so I was wondering if it would make sense to try
and share code.
The system I have mainly focuses on the back-end collection and correlation
and very little (practically nothing) on the front-end (i.e. where
crash-catcher seems to have most of it's focus).
The system I have is called "coroner". It has agents (called "constables")
that run on hosts looking for trouble. If they find an incident, the
constable reports the incident to the coroner. Based on central
configuration, the coroner may request that the constable investigate
further by running an autopsy, the results of which are posted back up to
the coroner. The coroner takes responsibility for correlating incidents
based on forensics (e.g. a fingerprint provided by the constable, which is a
parsed MD5 representation of a C/C++ stacktrace). The coroner provides a web
interface that allows data mining of the incidents and allows owners of
applications to configure actions to take (e.g. "email me a daily digest of
any incidents", "send the incident data to a morgue for archival", "delete
all core dumps", "delete all but 3 core-dumps", etc). The web interface can
also show what applications core-dump the most and other boring statistics
:).
The system understands different coredumps, linux and solaris crashdumps,
and custom incident data (e.g. we have a tool we use when a process is hung
that straces and attaches gdb and does a variety of other probes - that data
can be collected in the same way as a coredump).
Obviously much of this makes sense within an organisation but may not make
sense in a distributed world such as the typical use-case for crash-catcher.
However, it's possible that there may be sufficient overlap that we could
share API's or provide somesuch.
The "watching for incidents" code that I have is very clunky and
crash-catcher appears to have far and away a better and more configurable
way of finding problems. There are other pars of the coroner that are also
"clunky" and could very well do with re-writing. It's all written in perl
with a little bit of C (for parsing core files quickly without having to
fire up gdb). It's also not in need of disentanglement from some internal
systems of our own that make it unready for immediate deployment in other
organisations. However, it's a start.
Is there interest in exploring some kind of collaboration?
Cheers,
Nick.
14 years, 2 months
[Crash-catcher] new features
by Jiri Moskovcak
user's per package ignore list:
users should be able to click a button "Ignore crashes in this package"
and this change shouldn't influence other users
a) implement this into daemon? (the problem with daemon saving the
blacklist)
b) or just into abrt-applet? (probably just in the applet, as it's
"per user")
display rpm names instead of hashes
abrt-cli: reduce the output verbosity:
- don't show messages from update_client() unless it's not run with -v
abrt-cli: don't use UUID when reporting
- would be better to just use a simple number
use packagekit instead of yum:
- it's more general
- it is able to download packages as yumdownloader
- it's easy to use from gui, as it asks for root password
gather information from user session?
- this is a tricky one, ideas?
- maybe the long talked daemon splitting could help
- if users can read their own crashes, then analyzer+reporter
part can be
cutted from the watcher part, run under user running the session
and gather
the session info
- how this will work with autoreport?
detect crashes in java:
- there where a discussion on abrt's mailing list with java maintainer,
so we need to resume it and make it happen
That's just a quick dump from the top of my head, so please
comment/extend/implement :)
Jirka
14 years, 2 months