[email protected]
[Top] [All Lists]

Bug#329433: marked as forwarded (twinkle: Thread creation timing bug cau

Subject: Bug#329433: marked as forwarded twinkle: Thread creation timing bug causes crashes
From: Debian Bug Tracking System
Date: Sat, 29 Oct 2005 08:33:24 -0700
Your message dated Sat, 29 Oct 2005 16:32:07 +0100
with message-id <[email protected]>
has caused the Debian Bug report #329433,
regarding twinkle: Thread creation timing bug causes crashes
to be marked as having been forwarded to the upstream software
author(s) [email protected]

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at 329433-forwarded) by bugs.debian.org; 29 Oct 2005 15:32:17 +0000
>From [email protected] Sat Oct 29 08:32:17 2005
Return-path: <[email protected]>
Received: from 88-110-13-143.dynamic.dsl.as9105.com (bristol.purcell.id.au) 
[] (Debian-exim)
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1EVsgq-0005G1-00; Sat, 29 Oct 2005 08:32:16 -0700
Received: from dell.purcell.id.au ([])
        by bristol.purcell.id.au with esmtp (Exim 4.52)
        id 1EVsgj-000444-Gg; Sat, 29 Oct 2005 16:32:13 +0100
Received: from mark by dell.purcell.id.au with local (Exim 4.54)
        id 1EVsgh-0007pV-VW; Sat, 29 Oct 2005 16:32:08 +0100
Content-Disposition: inline
Content-Length: 4786
From: Mark Purcell <[email protected]>
Organization: Debian GNU Linux
To: [email protected]
Date: Sat, 29 Oct 2005 16:32:07 +0100
User-Agent: KMail/1.8.2
Cc: [email protected],
 Mikael Magnusson <[email protected]>
Disposition-Notification-To: Mark Purcell <[email protected]>
MIME-Version: 1.0
Content-Type: Multipart/Mixed;
Message-Id: <[email protected]>
X-SA-Exim-Rcpt-To: [email protected], [email protected], 
[email protected]
X-SA-Exim-Mail-From: [email protected]
Subject: Fwd: Bug#329433: twinkle: Thread creation timing bug causes crashes
X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100)
X-SA-Exim-Scanned: Yes (on bristol.purcell.id.au)
Delivered-To: [email protected]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-11.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
        HAS_PACKAGE autolearn=ham version=2.60-bugs.debian.org_2005_01_02

Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


Find enclosed a patch from a Debian user to fix timing bug issues with 


----------  Forwarded Message  ----------

Subject: Bug#329433: twinkle: Thread creation timing bug causes crashes
Date: Wednesday 21 September 2005 21:20
From: Mikael Magnusson <[email protected]>
To: Debian Bug Tracking System <[email protected]>

Package: twinkle
Version: 0.2.1-2
Severity: important
Tags: patch

I have found timing problems in the audio thread creations that can cause

If twinkle receives a call via Asterisk from another SIP phone and Asterisk
reINVITEs the call to stay out of the audio path, there is a probability
that a audio thread won't begin execution before it's deleted as a
consequence of the reINVITE. But since the is_running flag haven't been set,
the dtors won't wait for the thread to finish. It's solved in my patch by
setting the is_running flags when the thread is created.


-- System Information:
Debian Release: testing/unstable
  APT prefers stable
  APT policy: (871, 'stable'), (50, 'testing'), (30, 'unstable'), (10,
 'unstable'), (1, 'experimental') Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11-vserver-k7
Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)

Versions of packages twinkle depends on:
ii  libc6                     2.3.5-5        GNU C Library: Shared libraries
 an ii  libccrtp1-1.3c2           1.3.4-1        Common C++ class framework
 for RTP ii  libcommoncpp2-1.3c2       1.3.14-1       A GNU package for
 creating portabl ii  libgcc1                   1:4.0.1-6      GCC support
ii  libqt3-mt                 3:3.3.4-7      Qt GUI Library (Threaded runtime
 v ii  libstdc++6                4.0.1-6        The GNU Standard C++ Library
 v3 ii  libx11-6                  6.8.2.dfsg.1-6 X Window System protocol
 client li ii  libxext6                  6.8.2.dfsg.1-6 X Window System
 miscellaneous exte ii  libxml2                   2.6.21-1       GNOME XML
ii  xlibs                     6.8.2.dfsg.1-6 X Window System client libraries
 m ii  zlib1g                    1:1.2.3-3      compression library - runtime

twinkle recommends no packages.

-- no debconf information


Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="twinkle_thread_timings.patch"

only in patch2:
--- twinkle-0.2.1.orig/src/audio/audio_session.cpp
+++ twinkle-0.2.1/src/audio/audio_session.cpp
@@ -672,11 +672,13 @@
        if (audio_rx) {
                try {
+                       audio_rx->set_running(true);
                        thr_audio_rx = new t_thread(main_audio_rx, NULL);
                        // thr_audio_rx->set_sched_fifo(90);
                } catch (int) {
+                       audio_rx->set_running(false);
                        string msg("Failed to create audio_rx thread.");
                        log_file->write_report(msg, "t_audio_session::run",
                                LOG_NORMAL, LOG_CRITICAL);
@@ -688,11 +690,13 @@
        if (audio_tx) {
                try {
+                       audio_tx->set_running(true);
                        thr_audio_tx = new t_thread(main_audio_tx, NULL);
                        // thr_audio_tx->set_sched_fifo(90);
                } catch (int) {
+                       audio_tx->set_running(false);
                        string msg("Failed to create audio_tx thread.");
                        log_file->write_report(msg, "t_audio_session::run",
                                LOG_NORMAL, LOG_CRITICAL);
only in patch2:
--- twinkle-0.2.1.orig/src/audio/audio_rx.cpp
+++ twinkle-0.2.1/src/audio/audio_rx.cpp
@@ -397,6 +397,10 @@
+void t_audio_rx::set_running(bool _is_running) {
+       is_running = _is_running;
 void t_audio_rx::run(void) {
        int status;
        audio_buf_info dsp_info;
only in patch2:
--- twinkle-0.2.1.orig/src/audio/audio_rx.h
+++ twinkle-0.2.1/src/audio/audio_rx.h
@@ -156,6 +156,8 @@
+       void set_running(bool is_running);
        void run(void);
        // Set the dynamic payload type for telephone events
only in patch2:
--- twinkle-0.2.1.orig/src/audio/audio_tx.h
+++ twinkle-0.2.1/src/audio/audio_tx.h
@@ -148,6 +148,8 @@
+       void set_running(bool is_running);
        void run(void);
        // Set the dynamic payload type for telephone events
only in patch2:
--- twinkle-0.2.1.orig/src/audio/audio_tx.cpp
+++ twinkle-0.2.1/src/audio/audio_tx.cpp
@@ -330,6 +330,10 @@
+void t_audio_tx::set_running(bool _is_running) {
+       is_running = _is_running;
 void t_audio_tx::run(void) {
        const AppDataUnit* adu;
        struct timespec sleeptimer;


To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

<Prev in Thread] Current Thread [Next in Thread>
  • Bug#329433: marked as forwarded (twinkle: Thread creation timing bug causes crashes), Debian Bug Tracking System <=