#878: abrtd doesn't update problem's occurence counter --------------------+------------------------------ Reporter: jfilak | Owner: crash-catcher@… Type: defect | Status: new Priority: major | Milestone: Component: abrt | Version: Keywords: | Blocked By: Blocking: | --------------------+------------------------------ This commit f8e673981bdd93b24ffe6251f4069b86aeb24f1a accidently breakes counter updating.
File src/daemon/abrtd.c
{{{ ... if (WIFSIGNALED(status)) { log("'post-create' on '%s' killed by signal %d", - dump_dir_name, WTERMSIG(status)); - return MW_ERROR; + state->dirname, WTERMSIG(status)); } /* else: it is WIFEXITED(status) */ - if (!dup_of_dir) + else if (!state->dup_of_dir) { log("'post-create' on '%s' exited with %d", - dump_dir_name, WEXITSTATUS(status)); - return MW_ERROR; + state->dirname, WEXITSTATUS(status)); } - dump_dir_name = dup_of_dir; + goto delete_bad_dir; } ... }}}
#878: abrtd doesn't update problem's occurence counter ---------------------+---------------------- Reporter: jfilak | Owner: jfilak Type: defect | Status: assigned Priority: major | Milestone: Component: abrt | Version: Resolution: | Keywords: Blocked By: | Blocking: ---------------------+---------------------- Changes (by jfilak):
* status: new => assigned * owner: crash-catcher@… => jfilak
#878: abrtd doesn't update problem's occurence counter ---------------------+-------------------- Reporter: jfilak | Owner: jfilak Type: defect | Status: closed Priority: major | Milestone: Component: abrt | Version: Resolution: fixed | Keywords: Blocked By: | Blocking: ---------------------+-------------------- Changes (by jfilak):
* resolution: => fixed * status: assigned => closed
Comment:
Fixed in git {{{ commit 09bc9e63b053a6a7353e3a2b8a7accc0a738af6b Author: Jakub Filak jfilak@redhat.com Date: Wed Nov 21 17:12:59 2012 +0100
fix problem occurrence counter updating algorithm
- closes trac#878
Signed-off-by: Jakub Filak jfilak@redhat.com }}}
#878: abrtd doesn't update problem's occurence counter ---------------------+-------------------- Reporter: jfilak | Owner: jfilak Type: defect | Status: closed Priority: major | Milestone: Component: abrt | Version: Resolution: fixed | Keywords: QA Blocked By: | Blocking: ---------------------+-------------------- Changes (by jfilak):
* keywords: => QA
Comment:
How to test
{{{ #!/bin/sh
# $1 - analyzer (required by abrt) # $2 - executable (reuired by abrt) # $3 - uuid (used in algorithm finding duplicates) function new_problem() { RET=`dbus-send --system --type=method_call --print-reply \ --dest=org.freedesktop.problems /org/freedesktop/problems org.freedesktop.problems.NewProblem \ dict:string:string:"analyzer","$1","executable","$2","uuid","$3" \ | tail -1 | sed 's/ *string "(.*)"/\1/'` }
new_problem "libreport" "/usr/bin/true" "DEADBEAF" ID=$RET
sleep 10
test 1 -eq `cat /var/spool/abrt/$ID/count` && echo "Initial value of counter is 1"
# because of cooldown sleep 40
new_problem "libreport" "/usr/bin/true" "DEADBEAF"
sleep 10
test -e /var/spool/abrt/$RET && echo "The second ocurrence must be deleted" test 2 -eq `cat /var/spool/abrt/$ID/count` && echo "Counter has been incremented" }}}
crash-catcher@lists.fedorahosted.org