[PATCH 1/8] abrt-handle-event: free more of allocated data

Denys Vlasenko dvlasenk at redhat.com
Thu Aug 1 15:41:05 UTC 2013


On 07/29/2013 03:49 PM, Martin Milata wrote:
> Pushed, including the libreport patch.
> 
> I noticed that when processing a crash, following line appers in the
> syslog (possibly several times):
> 
> abrt-server[10123]: Can't access '/var/tmp/abrt/post-create.lock': No such file or directory
> 
> This is due to duplicate detection in abrt-handle-event which iterates
> over all items in /var/tmp/abrt and fails to open the lock because it is
> a broken symlink.

Yes, here:

    while ((dent = readdir(dir)) != NULL && crash_dump_dup_name == NULL)
    {
...
        char *dump_dir_name2 = concat_path_file(g_settings_dump_location, dent->d_name);
...
        dd = dd_opendir(dump_dir_name2, /*flags:*/ DD_FAIL_QUIETLY_ENOENT | DD_OPEN_READONLY);
        if (!dd)
            goto next;


> While the log message could be avoided by adding
> DD_FAIL_QUIETLY_EACCESS to the dd_opendir (or explicitly skipping the
> lock),

I am preparing a patch which will make DD_FAIL_QUIETLY_ENOENT
(which is already used there) to work as intended.

> I was wondering why we don't store /proc/PID in the symlink
> instead of just PID?

Then symlink will be a directory as far as stat() is concerned.
Probably an even worse situation :)



More information about the Crash-catcher mailing list