Hello community, here is the log from the commit of package sax2 for openSUSE:Factory checked in at Sat Jun 20 02:52:29 CEST 2009. -------- --- sax2/sax2.changes 2009-06-01 20:43:53.000000000 +0200 +++ sax2/sax2.changes 2009-06-19 11:50:00.000000000 +0200 @@ -1,0 +2,20 @@ +Fri Jun 19 11:42:48 CEST 2009 - sndirsch@suse.de + +- redo VT_ACTIVATE until it succeeds (bnc #504728) + This fixes a case Matthias hasn't thought of before. It's more + theoretical, though, we never had this issue so far. + *Theoretically*, the ioctl() for VT_ACTIVATE could fail. In this + case, sax2 wouldn't switch back to the correct VT, and the + configuration would fail like we see in this bug - so this never + has happened so far. In this case the previous change wouldn't + kill the alarm() and cleanup the signal handler. This is fixed by + this change. Bears testing, but is trivial. + +------------------------------------------------------------------- +Thu Jun 18 18:53:03 CEST 2009 - mhopf@suse.de + +- fix bnc 504728: on some machines the intel agpgart takes a long time + for memory cleanup, thus a race condition triggers and the VT_ACTIVATE + never gets through. Thus do it every second. + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sax2.spec ++++++ --- /var/tmp/diff_new_pack.P16668/_old 2009-06-20 02:49:46.000000000 +0200 +++ /var/tmp/diff_new_pack.P16668/_new 2009-06-20 02:49:46.000000000 +0200 @@ -50,7 +50,7 @@ PreReq: /bin/rm /bin/mkdir /usr/bin/chroot %fillup_prereq %insserv_prereq Summary: SuSE advanced X Window System-configuration Version: 8.1 -Release: 573 +Release: 574 Group: System/X11/Utilities License: GPL v2 or later Source: sax2.tar.bz2 @@ -530,6 +530,20 @@ %endif %changelog +* Fri Jun 19 2009 sndirsch@suse.de +- redo VT_ACTIVATE until it succeeds (bnc #504728) + This fixes a case Matthias hasn't thought of before. It's more + theoretical, though, we never had this issue so far. + *Theoretically*, the ioctl() for VT_ACTIVATE could fail. In this + case, sax2 wouldn't switch back to the correct VT, and the + configuration would fail like we see in this bug - so this never + has happened so far. In this case the previous change wouldn't + kill the alarm() and cleanup the signal handler. This is fixed by + this change. Bears testing, but is trivial. +* Thu Jun 18 2009 mhopf@suse.de +- fix bnc 504728: on some machines the intel agpgart takes a long time + for memory cleanup, thus a race condition triggers and the VT_ACTIVATE + never gets through. Thus do it every second. * Mon Jun 01 2009 sndirsch@suse.de - fixed MSI-AE1900 and MSI-N011 profiles (bnc #507437, bnc #497963) * Sat May 30 2009 sndirsch@suse.de ++++++ sax2.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sax/svnbuild new/sax/svnbuild --- old/sax/svnbuild 2009-06-01 20:43:17.000000000 +0200 +++ new/sax/svnbuild 2009-06-19 11:49:23.000000000 +0200 @@ -1 +1 @@ -1866 +1869 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sax/sysp/lib/common/qx.c new/sax/sysp/lib/common/qx.c --- old/sax/sysp/lib/common/qx.c 2009-05-27 22:51:27.000000000 +0200 +++ new/sax/sysp/lib/common/qx.c 2009-06-19 11:42:40.000000000 +0200 @@ -178,18 +178,42 @@ //===================================== // Change virtual terminal //------------------------------------- +// bnc 504728: on some machines the intel agpgart takes a long time +// for memory cleanup, thus a race condition triggers and the VT_ACTIVATE +// never gets through. Thus do it every second. +static int chvt_fd, chvt_num, chvt_ret; +static void chvt_alrm_handler (int signum) +{ + if (ioctl(chvt_fd, VT_ACTIVATE, chvt_num)) { + chvt_ret = 0; + } + alarm (1); +} int chvt (int num) { int fd = getfd(); + int ret; + struct sigaction act; if (fd < 0) { return 0; } if (ioctl(fd,VT_ACTIVATE,num)) { return 0; } - if (ioctl(fd,VT_WAITACTIVE,num)) { - return 0; - } - return 1; + memset (&act, 0, sizeof(struct sigaction)); + act.sa_handler = chvt_alrm_handler; + act.sa_flags = SA_RESTART; + sigaction (SIGALRM, &act, NULL); + // Yes, this is not multithread-proof. And ugly. + chvt_fd = fd; + chvt_num = num; + chvt_ret = 1; + alarm (1); + while ( (ret = ioctl(fd,VT_WAITACTIVE,num)) == -1 && errno == EINTR && chvt_ret) + ; + alarm (0); + act.sa_handler = SIG_DFL; + sigaction (SIGALRM, &act, NULL); + return (ret == 0); } //===================================== ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org