Description of problem: I was trying to monitor my audit logs but seaudit refuses to start properly. I also confirmed this with a user in #selinux. It fails with the following error message: seaudit GLib (gthread-posix.c): Unexpected error from C library during 'pthread_cond_timedwait': Invalid argument. Aborting. No matter if I start it as user (with authorisation) or directly from a root-console. Version-Release number of selected component (if applicable): setools-gui-3.3.7-24.fc17.x86_64 How reproducible: Always Actual results: Flickering window for a second and then exit. Additional info: sestatus -v SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 26 Process contexts: Current context: unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 Init context: system_u:system_r:init_t:s0 /usr/sbin/sshd system_u:system_r:sshd_t:s0-s0:c0.c1023 File contexts: Controlling terminal: unconfined_u:object_r:user_devpts_t:s0 /etc/passwd system_u:object_r:passwd_file_t:s0 /etc/shadow system_u:object_r:shadow_t:s0 /bin/bash system_u:object_r:shell_exec_t:s0 /bin/login system_u:object_r:login_exec_t:s0 /bin/sh system_u:object_r:bin_t:s0 -> system_u:object_r:shell_exec_t:s0 /sbin/agetty system_u:object_r:getty_exec_t:s0 /sbin/init system_u:object_r:bin_t:s0 -> system_u:object_r:init_exec_t:s0 /sbin/mingetty system_u:object_r:getty_exec_t:s0 /usr/sbin/sshd system_u:object_r:sshd_exec_t:s0
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.