mettli / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

Possible bug on CS tracking #391

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Run following code http://pastebin.com/rjzueCT7

What is the expected output? What do you see instead?
Insted of successfully initialized channel manager - there are error:
Error(common.cc:67): base/messagequeue.cc(65): ASSERT FAILED: 
!crit_.CurrentThreadIsOwner() @ Add
Aborted

What version of the product are you using? On what operating system?
0.6.22 debian

Please provide any additional information below.
As far as I can see from stack - there is a problem. But I cannot determine is 
it a bug or not:

#0  0x00007ffff64941b5 in *__GI_raise (sig=<value optimized out>) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff6496fc0 in *__GI_abort () at abort.c:92
#2  0x00000000007726b9 in talk_base::Break () at base/common.cc:60
#3  0x00000000007719ed in talk_base::Assert (result=false, function=0xbe543b 
"Add", file=0xbe52b6 "base/messagequeue.cc", line=65, 
    expression=0xbe5298 "!crit_.CurrentThreadIsOwner()") at /home/gkorovkin/libjingle-read-only/talk/base/common.h:99
#4  0x00000000008378a3 in 
talk_base::MessageQueueManager::Add(talk_base::MessageQueue*) ()
#5  0x0000000000838e85 in talk_base::MessageQueue::EnsureActive() ()
#6  0x000000000079211b in talk_base::Thread::Send (this=0x100d340, 
phandler=0x100dbe0, id=3, pdata=0x7fffffffd7d0) at base/thread.cc:382
#7  0x00000000007e2cfb in cricket::ChannelManager::Send(unsigned int, 
talk_base::MessageData*) ()
#8  0x00000000007e0f5f in cricket::ChannelManager::SetAudioOptions(std::string 
const&, std::string const&, int, int) ()
#9  0x00000000007df422 in cricket::ChannelManager::Init() ()
#10 0x0000000000741377 in main () at 
/home/gkorovkin/jingle_fail_local/main.cpp:29

Frame
Between #5 and #4 frames assertion already called but with opposite result
Frame#5: talk/base/messagequeue.cc: 
void MessageQueue::EnsureActive()
  ASSERT(crit_.CurrentThreadIsOwner()); //its TRUE because we are still on the same thread
  if (!active_) {
    active_ = true;
    MessageQueueManager::Instance()->Add(this); // Here goes Frame#4 - we still on the same thread

Frame#4 is suprising by the familiar assertion check but with the different 
boolean operator:
talk/base/messagequeue:
void MessageQueueManager::Add(MessageQueue *message_queue) {
  // MessageQueueManager methods should be non-reentrant, so we
  // ASSERT that is the case.  If any of these ASSERT, please
  // contact bpm or jbeda.
  ASSERT(!crit_.CurrentThreadIsOwner()); // we still on the same thread!! assertion obviosly will fail!
  CritScope cs(&crit_);
  message_queues_.push_back(message_queue);
}

Original issue reported on code.google.com by g.korov...@gmail.com on 6 Sep 2012 at 1:41

GoogleCodeExporter commented 9 years ago
Could any one drop previoys #390 issue - I can't find the way to delete it. I 
accidentaly pressed enter

Original comment by g.korov...@gmail.com on 6 Sep 2012 at 1:43

GoogleCodeExporter commented 9 years ago
urrgh... delete this one also - issue cannot be reproduced on clean rebuild of 
libjingle. 

Original comment by g.korov...@gmail.com on 6 Sep 2012 at 2:37

GoogleCodeExporter commented 9 years ago

Original comment by juberti@google.com on 31 May 2013 at 4:05