Bug 832660
| Summary: | seaudit fails to start | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | hannes <johannes.lips> | ||||||||
| Component: | setools | Assignee: | Chris PeBenito <cpebenito> | ||||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
| Severity: | unspecified | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 17 | CC: | cpebenito, dwalsh, lars.s.jensen, mgrepl, Reinhard.Scheck | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2013-01-12 00:24:21 UTC | Type: | Bug | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
hannes
2012-06-16 10:03:44 UTC
I can confirm, # uname -a: Linux localhost 3.4.2-4.fc17.i686.PAE #1 SMP Thu Jun 14 22:11:26 UTC 2012 i686 i686 i386 GNU/Linux # rpm -qa | grep setools: setools-libs-tcl-3.3.7-24.fc17.i686 setools-3.3.7-24.fc17.i686 setools-libs-python-3.3.7-24.fc17.i686 setools-console-3.3.7-24.fc17.i686 setools-gui-3.3.7-24.fc17.i686 setools-libs-3.3.7-24.fc17.i686 #locale LANG=pl_PL.utf8 LC_CTYPE="pl_PL.utf8" LC_NUMERIC="pl_PL.utf8" LC_TIME="pl_PL.utf8" LC_COLLATE="pl_PL.utf8" LC_MONETARY="pl_PL.utf8" LC_MESSAGES="pl_PL.utf8" LC_PAPER="pl_PL.utf8" LC_NAME="pl_PL.utf8" LC_ADDRESS="pl_PL.utf8" LC_TELEPHONE="pl_PL.utf8" LC_MEASUREMENT="pl_PL.utf8" LC_IDENTIFICATION="pl_PL.utf8" LC_ALL= #seaudit Gtk-Message: Failed to load module "pk-gtk-module" GLib (gthread-posix.c): Unexpected error from C library during 'pthread_cond_timedwait': Zły argument. Aborting. #LANG=C #LC_ALL=C #seaudit Gtk-Message: Failed to load module "pk-gtk-module" GLib (gthread-posix.c): Unexpected error from C library during 'pthread_cond_timedwait': Invalid argument. Aborting. After creating empty ".seaudit" file in root home directory, I can view main seaudit window, but when I choose File->Open Log->/var/log/audit/audit.log seaudit is terminating with information: GLib (gthread-posix.c): Unexpected error from C library during 'pthread_cond_timedwait': Invalid argument. Aborting. This same situation is when I'm trying to open policy.27 (File->Open Policy->/etc/selinux/targeted/policy/policy.27) OK, more info Fedora 17 clean installation, system - default, Gnome Desktop - default. No devels beside selinux-policy-devel, no additional libraries. # rpm -qa | grep selinux libselinux-utils-2.1.10-3.fc17.i686 selinux-policy-devel-3.10.0-132.fc17.noarch libselinux-2.1.10-3.fc17.i686 selinux-policy-doc-3.10.0-132.fc17.noarch selinux-policy-3.10.0-132.fc17.noarch libselinux-python-2.1.10-3.fc17.i686 selinux-policy-targeted-3.10.0-132.fc17.noarch For me it isn't problem with Selinux because # setenforce 0 # getenforce Permissive # seaudit Gtk-Message: Failed to load module "pk-gtk-module" GLib (gthread-posix.c): Unexpected error from C library during 'pthread_cond_timedwait': Invalid argument. Aborting. After copying "/usr/share/setools-3.3/dot_seaudit" to "/root/.seaudit" seaudit refuses to start but after removing line "DEFAULT_LOG_FILE /var/log/audit/audit.log" from "/root/.seaudit" there is no problem with opening empty main seaudit window. The rest is like in Comment 1 (above) From the backtrack in #841692 and my backtrack; I can see that the call to
g_cond_wait_until (cond=cond@entry=0x9679970, mutex=mutex@entry=0x96f6ad8, end_time=-1342712251375396)
have a negative time value: end_time=-1342712251375396
and it calls pthread_cond_timedwait() that returns EINVAL
From pthread_cond_timedwait(): EINVAL The value specified by cond, mutex, or abstime is invalid.
The negative time is the calculation in glib deprecated/gthread-deprecated.c:1581:
end_time += g_get_monotonic_time () - g_get_real_time ();
That cause the negative time value. (all time types are signed).
The call to g_cond_wait_until is done with the obsolete call g_cond_timed_wait(progress->cond, progress->mutex, &wait_time); in progress.c:105
The g_cond_timed_wait() shall have a absolut time but it is call with a relative time in line 102: GTimeVal wait_time = { 0, 50000 };
replace the code something like this:
gint64 end_time;
and
end_time = g_get_monotonic_time () + 50000; // need to be set before each wait
g_cond_wait_until(progress->cond, progress->mutex,end_time);
Created attachment 605474 [details]
patch for g_cond_timed_wait
Created attachment 605475 [details]
patch for building the java part (SWIG issue)
Created attachment 605481 [details]
the spec to build the patchs
Here are the 3 file (spec + 2 patchs) to build the fix for fc17 as setools-3.3.7-25.fc17.src.rpm
It look like the SWIG is not creating SWIGTYPE_p_int.java in libqpol/swig/java/..
So I added the patch and required swig version to be 2.0.7 from 1.3.28.
The spec had already changed the config file to use AC_PROG_SWIG(2.0.0)
and I removed workaround for gcc 4.3 + gnu99 + swig-generated code.
Same error here on F18-prerelease, using setools-3.3.7-28.fc18.x86_64 setools-3.3.7-31.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/setools-3.3.7-31.fc18 Package setools-3.3.7-31.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing setools-3.3.7-31.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-20567/setools-3.3.7-31.fc18 then log in and leave karma (feedback). Are you going to backport this update to f17 as well? Thanks. Sure building now. Package setools-3.3.7-31.fc18 works for me setools-3.3.7-31.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. Working OK with Fedora 18. |