View Issue Details

IDProjectCategoryView StatusLast Update
0003911Spring engineGeneralpublic2013-08-05 00:45
Reportercleanrock Assigned TojK  
PrioritynormalSeveritycrashReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version94.1.1+git 
Summary0003911: boost::optional Assertion `this->is_initialized()' failed
DescriptionPretty rare problem, I have seen this twice now:
spring: /usr/include/boost/optional/optional.hpp:631: boost::optional<T>::reference_type boost::optional<T>::get() [with T = long unsigned int; boost::optional<T>::reference_type = long unsigned int&]: Assertion `this->is_initialized()' failed.

Full backtrace attached.

The attached infolog contain a different stack trace which was generated after i did continue in gdb to get the infolog file.
TagsNo tags attached.
Attached Files
boost_optional_assert_backtrace.txt (Attachment missing)
infolog.txt (Attachment missing)
Checked infolog.txt for Errors

Relationships

related to 0003907 resolvedabma desync since threadpool merge in validation test 

Activities

abma

2013-08-02 14:58

administrator   ~0011142

Last edited: 2013-08-02 15:05

this is how test_ThreadPool fails for me:

test/test_ThreadPool
Running 1 test case...
test/engine/System/testThreadPool.cpp(20): info: passed
test/engine/System/testThreadPool.cpp(20): info: passed
test/engine/System/testThreadPool.cpp(20): info: passed
test/engine/System/testThreadPool.cpp(20): info: passed
test/engine/System/testThreadPool.cpp(20): info: passed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
test/engine/System/testThreadPool.cpp(29): error in "ThreadPoolTest": check nums[i] == i failed
Thread 0 executed 17 times
Thread 1 executed 131 times
Thread 2 executed 26 times
Thread 3 executed 301 times
Thread 4 executed 223 times
Thread 5 executed 37 times
Thread 6 executed 100 times
Thread 7 executed 25 times
Thread 8 executed 118 times
Thread 9 executed 5 times

*** 17 failures detected in test suite "ThreadPool"
test_ThreadPool: /usr/include/boost/thread/pthread/condition_variable_fwd.hpp:81: boost::condition_variable::~condition_variable(): Assertion `!ret' failed.
Abgebrochen (Speicherabzug geschrieben)



it looks like its some environment specific. maybe boost / gcc is broken. on the gentoo buildslave the test seems to always succeed, on the validation slave it fails (Fedora Linux), on my machine it fails, too (Ubuntu), on cleanrocks it seems to fail to (arch linux).

why does it work on gentoo?

BOOST_THREAD_PROVIDES_INTERRUPTIONS maybe?! edit: no, BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS doesn't change the failed assertion, just line number changes.

jK

2013-08-03 00:29

developer   ~0011145

fixed "boost::condition_variable::~condition_variable(): Assertion `!ret' failed."
never saw cleanrock's one

cleanrock

2013-08-03 05:09

reporter   ~0011146

I seen this 2 times now again in spring 94.1.1-810-g1498ea1 develop (Debug):

[f=0000000] Loaded gadget: Start Point Remover Gadget <init_start_point_remover_gadget.lua>
spring: /usr/include/boost/optional/optional.hpp:631: boost::optional<T>::reference_type boost::optional<T>::get() [with T = long unsigned int; boost::optional<T>::reference_type = long unsigned int&]: Assertion `this->is_initialized()' failed.

Happens about one in ten for me. I start a BA 7.78 vs KAIK on Altair_Crossing-V1.

cleanrock

2013-08-03 13:09

reporter   ~0011148

Saw this again now:
spring: /usr/include/boost/optional/optional.hpp:631: boost::optional<T>::reference_type boost::optional<T>::get() [with T = long unsigned int; boost::optional<T>::reference_type = long unsigned int&]: Assertion `this->is_initialized()' failed.

(gdb) bt
#0 0x00007ffff39ba1c9 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff39bb5c8 in abort () from /usr/lib/libc.so.6
#2 0x00007ffff39b3356 in __assert_fail_base () from /usr/lib/libc.so.6
0000003 0x00007ffff39b3402 in __assert_fail () from /usr/lib/libc.so.6
0000004 0x0000000000c91bfd in boost::optional<unsigned long>::get (this=0x1b62220 <Threading::simThreadID>) at /usr/include/boost/optional/optional.hpp:631
0000005 0x0000000000c916be in boost::optional<unsigned long>::operator* (this=0x1b62220 <Threading::simThreadID>) at /usr/include/boost/optional/optional.hpp:647
#6 0x0000000000c8e5a5 in Threading::IsSimThread () at /home/johanr/my_projects/spring/rts/System/Platform/Threading.cpp:326
#7 0x000000000073cc68 in CLuaHandle::CallOutUnsyncedUpdateCallIn (L=0x7fffa1f76550) at /home/johanr/my_projects/spring/rts/Lua/LuaHandle.cpp:3043


(gdb) f 6
#6 0x0000000000c8e5a5 in Threading::IsSimThread () at /home/johanr/my_projects/spring/rts/System/Platform/Threading.cpp:326
326 return !simThreadID ? false : NativeThreadIdsEqual(Threading::GetCurrentThreadId(), *simThreadID);
(gdb) f 5
0000005 0x0000000000c916be in boost::optional<unsigned long>::operator* (this=0x1b62220 <Threading::simThreadID>) at /usr/include/boost/optional/optional.hpp:647
647 reference_type operator *() { return this->get() ; }
(gdb) f 4
0000004 0x0000000000c91bfd in boost::optional<unsigned long>::get (this=0x1b62220 <Threading::simThreadID>) at /usr/include/boost/optional/optional.hpp:631
631 reference_type get() { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }


Looks like the !operator doesn't bite.
I will take a look at it since it looks like only i can reproduce it and its not very critical.

abma

2013-08-03 15:55

administrator   ~0011150

https://github.com/spring/spring/commit/296bcb38d3323a1eb2319b71b10b29ea8e625190

seems to have fixed it.

@jk:

any idea why it worked before? the code seems to have not changed since the switch to threadpools.

(imo this report can be closed)

Issue History

Date Modified Username Field Change
2013-08-02 10:44 cleanrock New Issue
2013-08-02 10:44 cleanrock File Added: boost_optional_assert_backtrace.txt
2013-08-02 10:45 cleanrock File Added: infolog.txt
2013-08-02 14:58 abma Note Added: 0011142
2013-08-02 15:02 abma Note Edited: 0011142
2013-08-02 15:05 abma Note Edited: 0011142
2013-08-02 17:29 abma Relationship added related to 0003907
2013-08-03 00:29 jK Note Added: 0011145
2013-08-03 05:09 cleanrock Note Added: 0011146
2013-08-03 06:50 jK Changeset attached => spring develop 37a02809
2013-08-03 06:50 jK Assigned To => jK
2013-08-03 06:50 jK Status new => resolved
2013-08-03 06:50 jK Resolution open => fixed
2013-08-03 13:09 cleanrock Assigned To jK => cleanrock
2013-08-03 13:09 cleanrock Note Added: 0011148
2013-08-03 13:09 cleanrock Status resolved => feedback
2013-08-03 13:09 cleanrock Resolution fixed => reopened
2013-08-03 13:10 cleanrock Status feedback => assigned
2013-08-03 15:55 abma Note Added: 0011150
2013-08-03 15:55 abma Assigned To cleanrock => jK
2013-08-03 15:55 abma Status assigned => feedback
2013-08-05 00:45 abma Status feedback => resolved
2013-08-05 00:45 abma Resolution reopened => fixed