News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Is CC crash, or Debugger plugin?

Started by Loaden, June 09, 2011, 08:09:51 AM

Previous topic - Next topic

Loaden

Quote from: oBFusCATed on August 23, 2011, 11:26:35 AM
Pressing ctrl+shift+. is very deadlocky operation, it happened twice already today. Latest version of debugger's branch.
Try to disable the Symbols Browser.

oBFusCATed

OK, but I'm not using the symbol browser at all.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

oBFusCATed

#77
Disabled the symbols browser and got a crash instead of deadlock. Somewhere in AddToken().

Edit: And a deadlock switching to one just opened file...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

oBFusCATed

Here is the backtrace from the newly-opened-file-deadlock:


> bt 30
#0  0x000000373d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x000000373d608e1a in _L_lock_1034 () from /lib64/libpthread.so.0
#2  0x000000373d608cdc in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x0000003744cfa3e9 in wxMutexInternal::Lock (this=<optimized out>) at ./src/unix/threadpsx.cpp:248
#4  0x00002aaaab27d0a9 in wxCriticalSection::Enter (this=0x2aaab25e3868) at /usr/include/wx-2.8/wx/thread.h:271
#5  0x00002aaaab27d0d3 in wxCriticalSectionLocker::wxCriticalSectionLocker (this=0x7fffffffd8e0, cs=...) at /usr/include/wx-2.8/wx/thread.h:286
#6  0x00002aaab23483e1 in Parser::IsFileParsed (this=0x1aecb30, filename=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/parser/parser.cpp:1395
#7  0x00002aaab23316ee in NativeParser::GetProjectByFilename (this=0x11c7840, filename=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/nativeparser.cpp:276
#8  0x00002aaab23318aa in NativeParser::GetProjectByEditor (this=0x11c7840, editor=0x245f620) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/nativeparser.cpp:313
#9  0x00002aaab233195c in NativeParser::GetParserInfoByCurrentEditor (this=0x11c7840) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/nativeparser.cpp:3641
#10 0x00002aaab2332a09 in NativeParser::OnParserStart (this=0x11c7840, event=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/nativeparser.cpp:3381
#11 0x0000003744cfcbff in wxEvtHandler::ProcessEventIfMatches (entry=<optimized out>, handler=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1239
#12 0x0000003744cfce12 in wxEvtHandler::SearchDynamicEventTable (this=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1421
#13 0x0000003744cfcec2 in wxEvtHandler::ProcessEvent (this=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1297
#14 0x00002aaab2347c6e in Parser::ProcessParserEvent (this=0x1aecb30, type=ptCreateParser, id=928, info=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/parser/parser.cpp:1412
#15 0x00002aaab234ad38 in Parser::OnBatchTimer (this=0x1aecb30, event=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/parser/parser.cpp:1312
#16 0x0000003744cfcbff in wxEvtHandler::ProcessEventIfMatches (entry=<optimized out>, handler=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1239
#17 0x0000003744cfce12 in wxEvtHandler::SearchDynamicEventTable (this=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1421
#18 0x0000003744cfcec2 in wxEvtHandler::ProcessEvent (this=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1297
#19 0x0000003b39af2106 in wxTimerBase::Notify (this=<optimized out>) at ./src/common/timercmn.cpp:57
#20 0x0000003b399ed2e3 in timeout_callback (data=<optimized out>) at ./src/gtk/timer.cpp:45
#21 0x000000373ee2d2bb in ?? () from /lib64/libglib-2.0.so.0
#22 0x000000373ee2cdb4 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#23 0x000000373ee2fc0d in ?? () from /lib64/libglib-2.0.so.0
#24 0x000000373ee2ff1a in g_main_loop_run () from /lib64/libglib-2.0.so.0
#25 0x0000003b3872aa63 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#26 0x0000003b399e456d in wxEventLoop::Run (this=<optimized out>) at ./src/gtk/evtloop.cpp:76
#27 0x0000003b39a72378 in wxAppBase::MainLoop (this=<optimized out>) at ./src/common/appcmn.cpp:312
#28 0x000000000043a20a in CodeBlocksApp::OnRun (this=0x759fb0) at /home/tpetrov/projects/codeblocks/trunk1/src/src/app.cpp:788
#29 0x0000003744c99cc1 in wxEntry (argc=<optimized out>, argv=<optimized out>) at ./src/common/init.cpp:448


The two interesting frames are:

#6  0x00002aaab23483e1 in Parser::IsFileParsed (this=0x1aecb30, filename=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/parser/parser.cpp:1395
#15 0x00002aaab234ad38 in Parser::OnBatchTimer (this=0x1aecb30, event=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/parser/parser.cpp:1312


Good luck fixing it and please do more testing before committing a fix...
Especially on linux.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

oBFusCATed

BTW:
The CCLockerTrack class is useless, because when you get a dead lock, you cannot inspect the debug log.
Or do I miss something?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MortenMacFly

Quote from: oBFusCATed on August 24, 2011, 02:05:25 PM
BTW:
The CCLockerTrack class is useless, because when you get a dead lock, you cannot inspect the debug log.
Or do I miss something?
You'll need to use the C::B command line option to log to a file in that case.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

oBFusCATed

OK, I've just replaced the logging with a simple printf, simple but effective :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Loaden

Quote from: oBFusCATed on August 24, 2011, 01:53:44 PM
Here is the backtrace from the newly-opened-file-deadlock:


> bt 30
#0  0x000000373d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x000000373d608e1a in _L_lock_1034 () from /lib64/libpthread.so.0
#2  0x000000373d608cdc in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x0000003744cfa3e9 in wxMutexInternal::Lock (this=<optimized out>) at ./src/unix/threadpsx.cpp:248
#4  0x00002aaaab27d0a9 in wxCriticalSection::Enter (this=0x2aaab25e3868) at /usr/include/wx-2.8/wx/thread.h:271
#5  0x00002aaaab27d0d3 in wxCriticalSectionLocker::wxCriticalSectionLocker (this=0x7fffffffd8e0, cs=...) at /usr/include/wx-2.8/wx/thread.h:286
#6  0x00002aaab23483e1 in Parser::IsFileParsed (this=0x1aecb30, filename=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/parser/parser.cpp:1395
#7  0x00002aaab23316ee in NativeParser::GetProjectByFilename (this=0x11c7840, filename=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/nativeparser.cpp:276
#8  0x00002aaab23318aa in NativeParser::GetProjectByEditor (this=0x11c7840, editor=0x245f620) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/nativeparser.cpp:313
#9  0x00002aaab233195c in NativeParser::GetParserInfoByCurrentEditor (this=0x11c7840) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/nativeparser.cpp:3641
#10 0x00002aaab2332a09 in NativeParser::OnParserStart (this=0x11c7840, event=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/nativeparser.cpp:3381
#11 0x0000003744cfcbff in wxEvtHandler::ProcessEventIfMatches (entry=<optimized out>, handler=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1239
#12 0x0000003744cfce12 in wxEvtHandler::SearchDynamicEventTable (this=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1421
#13 0x0000003744cfcec2 in wxEvtHandler::ProcessEvent (this=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1297
#14 0x00002aaab2347c6e in Parser::ProcessParserEvent (this=0x1aecb30, type=ptCreateParser, id=928, info=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/parser/parser.cpp:1412
#15 0x00002aaab234ad38 in Parser::OnBatchTimer (this=0x1aecb30, event=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/parser/parser.cpp:1312
#16 0x0000003744cfcbff in wxEvtHandler::ProcessEventIfMatches (entry=<optimized out>, handler=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1239
#17 0x0000003744cfce12 in wxEvtHandler::SearchDynamicEventTable (this=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1421
#18 0x0000003744cfcec2 in wxEvtHandler::ProcessEvent (this=<optimized out>, event=<optimized out>) at ./src/common/event.cpp:1297
#19 0x0000003b39af2106 in wxTimerBase::Notify (this=<optimized out>) at ./src/common/timercmn.cpp:57
#20 0x0000003b399ed2e3 in timeout_callback (data=<optimized out>) at ./src/gtk/timer.cpp:45
#21 0x000000373ee2d2bb in ?? () from /lib64/libglib-2.0.so.0
#22 0x000000373ee2cdb4 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#23 0x000000373ee2fc0d in ?? () from /lib64/libglib-2.0.so.0
#24 0x000000373ee2ff1a in g_main_loop_run () from /lib64/libglib-2.0.so.0
#25 0x0000003b3872aa63 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#26 0x0000003b399e456d in wxEventLoop::Run (this=<optimized out>) at ./src/gtk/evtloop.cpp:76
#27 0x0000003b39a72378 in wxAppBase::MainLoop (this=<optimized out>) at ./src/common/appcmn.cpp:312
#28 0x000000000043a20a in CodeBlocksApp::OnRun (this=0x759fb0) at /home/tpetrov/projects/codeblocks/trunk1/src/src/app.cpp:788
#29 0x0000003744c99cc1 in wxEntry (argc=<optimized out>, argv=<optimized out>) at ./src/common/init.cpp:448


The two interesting frames are:

#6  0x00002aaab23483e1 in Parser::IsFileParsed (this=0x1aecb30, filename=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/parser/parser.cpp:1395
#15 0x00002aaab234ad38 in Parser::OnBatchTimer (this=0x1aecb30, event=...) at /home/tpetrov/projects/codeblocks/trunk1/src/plugins/codecompletion/parser/parser.cpp:1312


Good luck fixing it and please do more testing before committing a fix...
Especially on linux.
Thanks a lot!

Loaden

Quote from: oBFusCATed on July 25, 2011, 12:57:06 PM
Quote from: oBFusCATed on July 22, 2011, 05:20:58 PM
Quote from: Loaden on July 22, 2011, 05:12:51 PM
The crashes still exist?
The original crash is 99% fixed. C::B has not crashed for the last couple of days.
Unfortunately it crashed again :(
Same backtrace... and again it has happened, when I was hovering with the mouse over a variable :(
Try rev7419?

oBFusCATed

After the next merge :)
The current debugger_branch revision is working relatively stable :)

killerbot: can you make a nightly build for trunk?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Loaden

Quote from: oBFusCATed on August 26, 2011, 12:23:44 PM
After the next merge :)
The current debugger_branch revision is working relatively stable :)

killerbot: can you make a nightly build for trunk?
Remember: Disable symbols  browser! :D

killerbot

what is the current state of CC on one hand with respect to stability ?

and what is the current state of the debugger branch with respect to stability ?

Loaden

Quote from: killerbot on August 28, 2011, 01:10:32 PM
what is the current state of CC on one hand with respect to stability ?
The current HEAD works well on Windows 7 or Linux Mint 11.
It's ready for next nightly build. :)

oBFusCATed

Quote from: Loaden on August 28, 2011, 02:46:32 PM
The current HEAD works well on Windows 7 or Linux Mint 11.
You said that the last time, too  8)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Loaden

Quote from: oBFusCATed on August 28, 2011, 02:52:22 PM
Quote from: Loaden on August 28, 2011, 02:46:32 PM
The current HEAD works well on Windows 7 or Linux Mint 11.
You said that the last time, too  8)
If only test from me, then, yes, It has been stable enough.
So, how do? :?