Hello community,

here is the log from the commit of package sysvinit for openSUSE:12.2 checked 
in at 2012-08-12 15:29:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.2/sysvinit (Old)
 and      /work/SRC/openSUSE:12.2/.sysvinit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sysvinit", Maintainer is "wer...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:12.2/sysvinit/sysvinit.changes   2012-06-25 
15:54:46.000000000 +0200
+++ /work/SRC/openSUSE:12.2/.sysvinit.new/sysvinit.changes      2012-08-12 
15:29:29.000000000 +0200
@@ -1,0 +2,12 @@
+Fri Aug 10 12:44:29 UTC 2012 - wer...@suse.de
+
+- Increase daemon detection time in startproc to give started
+  process the time to daemonize (bnc#757643)
+
+-------------------------------------------------------------------
+Thu Aug  2 13:58:11 UTC 2012 - wer...@suse.de
+
+- Add fix/workaround in blogd for new glibc internal pthread API to
+  avoid an glibc nptl assert report in bnc#772055
+
+-------------------------------------------------------------------

New:
----
  showconsole-1.16-glibc.dif

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sysvinit.spec ++++++
--- /var/tmp/diff_new_pack.g66uD4/_old  2012-08-12 15:29:29.000000000 +0200
+++ /var/tmp/diff_new_pack.g66uD4/_new  2012-08-12 15:29:29.000000000 +0200
@@ -16,7 +16,6 @@
 #
 
 
-
 Name:           sysvinit
 %define PDVER  2.0.2
 %define KPVER  2.21
@@ -61,6 +60,7 @@
 Patch30:        killproc-%{KPVER}.dif
 Patch40:        showconsole-%{SCVER}.dif
 Patch41:        showconsole-1.16-deadlock.diff
+Patch42:        showconsole-1.16-glibc.dif
 Patch50:        startpar-%{START}.dif
 Requires:       mingetty
 Requires:       sysvinit-tools
@@ -129,6 +129,7 @@
 pushd ../showconsole-%{SCVER}
 %patch40
 %patch41 -p1
+%patch42 -p0
 ln -t../%{name}-%{SIVER}dsf/doc/showconsole README
 popd
 pushd ../startpar-%{START}

++++++ killproc-2.21.dif ++++++
--- /var/tmp/diff_new_pack.g66uD4/_old  2012-08-12 15:29:29.000000000 +0200
+++ /var/tmp/diff_new_pack.g66uD4/_new  2012-08-12 15:29:29.000000000 +0200
@@ -18,3 +18,14 @@
        const size_t nlen = strlen(point);
        MNTINFO *restrict p;
        if (posix_memalign((void*)&p, sizeof(void*), alignof(MNTINFO)+(nlen+1)) 
!= 0) {
+--- startproc.c
++++ startproc.c        2012-08-10 12:43:56.136510304 +0000
+@@ -778,7 +778,7 @@ retry:
+            * to see a process damage.
+            */
+           usleep(10*1000);    /* 10 ms time for the child and its child */
+-          if (++n < 10)
++          if (++n < 50)
+               goto retry;
+           break;
+       default:

++++++ showconsole-1.16-glibc.dif ++++++
--- libconsole.c
+++ libconsole.c        2012-08-02 11:45:26.456510085 +0000
@@ -358,7 +358,9 @@ static void sigio(int sig)
  */
 
 typedef struct _mutex {
-    int locked;
+    volatile int locked;
+    volatile int canceled;
+    volatile int used;
     pthread_mutex_t mutex;
     pthread_t thread;
 } mutex_t;
@@ -380,8 +382,8 @@ static inline void unlock(mutex_t *mutex
     }
 }
 
-static mutex_t llock = { 0, PTHREAD_MUTEX_INITIALIZER, 0 };
-static mutex_t ljoin = { 0, PTHREAD_MUTEX_INITIALIZER, 0 };
+static mutex_t llock = { 0, 0, 1, PTHREAD_MUTEX_INITIALIZER, 0 };
+static mutex_t ljoin = { 0, 0, 1, PTHREAD_MUTEX_INITIALIZER, 0 };
 static pthread_cond_t lcond = PTHREAD_COND_INITIALIZER;
 static pthread_t    lthread;
 static volatile int running;
@@ -429,10 +431,14 @@ xout:
 
 static inline void writelog(void)
 {
+    int oldstate;
+
+    pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate);
     lock(&llock);
     if (!flog) { /* log file closed, reset buffer */
        resetlog();
        unlock(&llock);
+       pthread_setcancelstate(oldstate, NULL);
        return;
     }
     clearerr(flog);
@@ -468,11 +474,12 @@ static inline void writelog(void)
        fflush(flog);
        fdatasync(fileno(flog));
     }
+    pthread_setcancelstate(oldstate, NULL);
 }
 
 static inline void flushlog(void)
 {
-    if (running) pthread_cond_broadcast(&lcond);
+    if (ljoin.canceled == 0) pthread_cond_broadcast(&lcond);
 }
 
 static inline int poll(int msec, mutex_t *outer)
@@ -495,11 +502,13 @@ static inline int poll(int msec, mutex_t
            abstime.tv_nsec = now.tv_usec * 1000;
 
            do {
-               int locked = outer->locked;
                /* Note: pthread_cond_timedwait() atomically unlocks the mutex 
*/
-               outer->locked = 0;
-               err = pthread_cond_timedwait(&lcond, &outer->mutex, &abstime);
-               outer->locked = locked;
+               if (outer->canceled == 0) {
+                   volatile int locked = outer->locked;
+                   outer->locked = 0;
+                   err = pthread_cond_timedwait(&lcond, &outer->mutex, 
&abstime);
+                   outer->locked = locked;
+               }
            } while (err == EINTR);
 
            if (err == ETIMEDOUT || err == EBUSY)
@@ -507,9 +516,9 @@ static inline int poll(int msec, mutex_t
        }
 #if 0
     } else {
-       unlock(&ljoin);
+       unlock(&outer->mutex);
        pthread_yield();
-       lock(&ljoin);
+       lock(&outer->mutex);
 #endif
     }
 
@@ -789,6 +798,7 @@ static void *action(void *dummy attribut
     unlock(&ljoin);
 
     (void)pthread_sigmask(SIG_SETMASK, &save_oldset, NULL);
+    ljoin.used = 0;
     return NULL;
 }
 
@@ -1004,6 +1014,8 @@ void closeIO(void)
        (void)tcdrain(c->fd);           /* Hold in sync with console */
     }
 
+    flushlog();
+
     do {
        /*
         * Repeat this as long as required,
@@ -1020,14 +1032,19 @@ void closeIO(void)
        more_input(&timeout, 1);
        (void)tcdrain(fdread);
 
+       flushlog();
+
     } while (timeout.tv_sec || timeout.tv_nsec);
 
     if (running) {
        lock(&ljoin);
        running = 0;
        unlock(&ljoin);
-       flushlog();
-       pthread_cancel(lthread);
+       ljoin.canceled = 1;
+       pthread_cond_broadcast(&lcond);
+       pthread_yield();
+       if (ljoin.used && lthread)
+           pthread_cancel(lthread);
     }
 
     if (flog) {
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to