Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread trouble when several schedulers try to write TTLogMessage at the same time #7

Open
theod opened this issue Dec 24, 2014 · 1 comment
Assignees
Labels

Comments

@theod
Copy link

theod commented Dec 24, 2014

Here is a crash log where 3 threads were writing in the same time and one crashes :

Crashed Thread: 7

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
[22968] stack overflow

Thread 5:
0 libsystem_kernel.dylib 0x00007fff87c4f122 __psynch_mutexwait + 10
1 libsystem_c.dylib 0x00007fff89e9fdcd pthread_mutex_lock + 536
2 libsystem_c.dylib 0x00007fff89f02443 flockfile + 42
3 libsystem_c.dylib 0x00007fff89f05977 fwrite + 84
4 libc++.1.dylib 0x00007fff824b1140 std::__1::__stdoutbuf::overflow(int) + 288
5 JamomaFoundation.dylib 0x000000010f75b50f std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits > >(std::_1::ostreambuf_iterator<char, std::1::char_traits >, char const, char const, char const, std::__1::ios_base&, char) + 927
6 JamomaFoundation.dylib 0x000000010f75aeb5 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<std::__1::char_traits(std::_1::basic_ostream<char, std::1::char_traits >&, char const) + 789
7 JamomaFoundation.dylib 0x000000010f77cd49 TTLogMessage(char const
, ...) + 441
8 System.ttdylib 0x00000001177cd8be System::computeDeltaTime() + 206 (System.cpp:211)
9 System.ttdylib 0x00000001177cd57c System::Tick() + 28 (System.cpp:137)
10 System.ttdylib 0x00000001177cd3fb SystemThreadCallback(void
) + 203 (System.cpp:251)
11 JamomaFoundation.dylib 0x000000010f7719a0 TTThread::doCallbackMethod() + 48
12 JamomaFoundation.dylib 0x000000010f77186d TTThreadCallback(void*) + 29
13 libsystem_c.dylib 0x00007fff89e9a772 _pthread_start + 327
14 libsystem_c.dylib 0x00007fff89e871a1 thread_start + 13

Thread 7 Crashed:
0 libsystem_kernel.dylib 0x00007fff87c4f212 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff89e9bb24 pthread_kill + 90
2 libsystem_c.dylib 0x00007fff89ee0031 __abort + 159
3 libsystem_c.dylib 0x00007fff89ee0f97 __stack_chk_fail + 195
4 libc++.1.dylib 0x00007fff824b119b std::__1::__stdoutbuf::overflow(int) + 379
5 JamomaFoundation.dylib 0x000000010f75b50f std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits > >(std::_1::ostreambuf_iterator<char, std::1::char_traits >, char const, char const, char const, std::__1::ios_base&, char) + 927
6 JamomaFoundation.dylib 0x000000010f75aeb5 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<std::__1::char_traits(std::_1::basic_ostream<char, std::1::char_traits >&, char const) + 789
7 JamomaFoundation.dylib 0x000000010f77cd49 TTLogMessage(char const
, ...) + 441
8 System.ttdylib 0x00000001177cd8be System::computeDeltaTime() + 206 (System.cpp:211)
9 System.ttdylib 0x00000001177cd57c System::Tick() + 28 (System.cpp:137)
10 System.ttdylib 0x00000001177cd3fb SystemThreadCallback(void
) + 203 (System.cpp:251)
11 JamomaFoundation.dylib 0x000000010f7719a0 TTThread::doCallbackMethod() + 48
12 JamomaFoundation.dylib 0x000000010f77186d TTThreadCallback(void*) + 29
13 libsystem_c.dylib 0x00007fff89e9a772 _pthread_start + 327
14 libsystem_c.dylib 0x00007fff89e871a1 thread_start + 13

Thread 8:
0 libsystem_kernel.dylib 0x00007fff87c4f122 __psynch_mutexwait + 10
1 libsystem_c.dylib 0x00007fff89e9fdcd pthread_mutex_lock + 536
2 libsystem_c.dylib 0x00007fff89f02443 flockfile + 42
3 libsystem_c.dylib 0x00007fff89f05977 fwrite + 84
4 libc++.1.dylib 0x00007fff824b1140 std::__1::__stdoutbuf::overflow(int) + 288
5 JamomaFoundation.dylib 0x000000010f75b50f std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits > >(std::_1::ostreambuf_iterator<char, std::1::char_traits >, char const, char const, char const, std::__1::ios_base&, char) + 927
6 JamomaFoundation.dylib 0x000000010f75aeb5 std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<std::__1::char_traits(std::_1::basic_ostream<char, std::1::char_traits >&, char const) + 789
7 JamomaFoundation.dylib 0x000000010f77cd49 TTLogMessage(char const
, ...) + 441
8 System.ttdylib 0x00000001177cd8be System::computeDeltaTime() + 206 (System.cpp:211)
9 System.ttdylib 0x00000001177cd57c System::Tick() + 28 (System.cpp:137)
10 System.ttdylib 0x00000001177cd3fb SystemThreadCallback(void
) + 203 (System.cpp:251)
11 JamomaFoundation.dylib 0x000000010f7719a0 TTThread::doCallbackMethod() + 48
12 JamomaFoundation.dylib 0x000000010f77186d TTThreadCallback(void*) + 29
13 libsystem_c.dylib 0x00007fff89e9a772 _pthread_start + 327
14 libsystem_c.dylib 0x00007fff89e871a1 thread_start + 13

@theod theod added the bug label Dec 24, 2014
@theod theod self-assigned this Dec 24, 2014
@theod
Copy link
Author

theod commented Dec 24, 2014

In System::computeDeltatTime there is a TTLogMessage written when it seems the currentTime is lower than the lastTime sometimes (another bug I never manage to solve) :

        TTLogMessage("System::computeDeltaTime() : currentTime (%Lu) is lower than lastTime (%Lu)\n", currentTime, mLastTime);

It is maybe due to the fact currentTime or mLastTime are bad numbers so they cannot be written (?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant