Bugzilla – Bug 1908
LogComponentEnable causes SIGILL with static and optimized build
Last modified: 2014-09-24 00:08:56 UTC
Environment: Ubuntu 12.04 64bit (32bits also) $ hg tip changeset: 10701:37823f33885f tag: tip user: Tomasz Seweryn <tomasz.seweryn7@gmail.com> date: Sat Apr 26 23:01:09 2014 +0200 summary: Bug 1873 - Energy source checked to be aggregated to the node $ hg dif diff -r 37823f33885f scratch/scratch-simulator.cc --- a/scratch/scratch-simulator.cc Sat Apr 26 23:01:09 2014 +0200 +++ b/scratch/scratch-simulator.cc Mon Apr 28 00:46:05 2014 +0900 @@ -23,6 +23,8 @@ int main (int argc, char *argv[]) { + LogComponentEnable ("PacketSink", LOG_LEVEL_INFO); + NS_LOG_UNCOND ("Scratch Simulator"); Simulator::Run (); the program ./waf --run scratch-simulator causes crash, by SIGILL. Program terminated with signal 4, Illegal instruction. #0 0x0000000000d2e3f4 in Enable (level=ns3::LOG_LEVEL_INFO, this=0x12c3630) at ../src/core/model/log.cc:266 266 m_levels |= (level & ~m_mask); (gdb) bt #0 0x0000000000d2e3f4 in Enable (level=ns3::LOG_LEVEL_INFO, this=0x12c3630) at ../src/core/model/log.cc:266 #1 ns3::LogComponentEnable (name=0xe076fa "PacketSink", level=ns3::LOG_LEVEL_INFO) at ../src/core/model/log.cc:328 #2 0x0000000000406613 in main (argc=<optimized out>, argv=<optimized out>) at ../scratch/scratch-simulator.cc:29 This won't happen in ubuntu 10.04 (64bit), Ubuntu 12.10, 13.04, 13.10 (64bit), and Fedora 18 (32bit) at least.
bisect told me the following changeset introduces this issue. changeset: 10626:16bbfc4cb29d user: Peter D. Barnes, Jr. <barnes26@llnl.gov> date: Fri Feb 21 16:27:43 2014 -0800 summary: [Bug 1862] NS_LOG="Time=*|prefix_time" causes stack overflow Peter, could you make a time to investigate it ?
I can't reproduce this. What compiler are you using? Could you please look at this post and see if it's relevant: http://peeterjoot.wordpress.com/2010/05/26/a-fun-and-curious-dig-gcc-generation-of-a-ud2a-instruction-sigill/
(In reply to Peter Barnes from comment #2) > I can't reproduce this. > > What compiler are you using? - for Ubuntu 12.04 64bits jenkins@u1204-64:~$ gcc --version gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS Release: 12.04 Codename: precise - for Ubuntu 12.04 32bits $ gcc --version gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise > Could you please look at this post and see if it's relevant: > http://peeterjoot.wordpress.com/2010/05/26/a-fun-and-curious-dig-gcc- > generation-of-a-ud2a-instruction-sigill/ I don't see the following warning in my build. sqluedus.C:1700: warning: cannot pass objects of non-POD type 'struct sqlrw_request_cb' through '...'; call will abort at runtime see full output of my jenkins. http://ns-3-dce.cloud.wide.ad.jp/jenkins/job/daily-dce/label=Ubuntu1204-32/436/consoleFull "CRASH: TestSuite dce-mptcp" has the same code pasted in the first message (LogComponentEnable...).