Author Topic: Constant Random Crashing  (Read 28423 times)

Encryptor

  • Guest
Re: Constant Random Crashing
« Reply #30 on: September 16, 2006, 04:21:40 am »
It doesn't crash so often now ;) Thanks!

jamesh

  • Guest
Re: Constant Random Crashing
« Reply #31 on: September 16, 2006, 09:38:01 am »
Hi guys.  I've been experiencing the same problem, on Ubuntu 6.06.1 with a P4 3Ghz with Hyperthreading enabled.  The crash was extermely easy to reproduce - simply create a new Project -> new wxSmith project (didn't try other combination). Crashed every time.

However, I've just switched off HyperThreading in my BIOS and no longer have an issue ( http://en.wikipedia.org/wiki/Hyperthreading ). A quick and easy fix for P4 owners. Hope that's useful to someone - and that this bug gets squashed quickly. Thanks to all those helping to narrow the bug down.

Encryptor

  • Guest
Re: Constant Random Crashing
« Reply #32 on: September 16, 2006, 11:36:35 pm »
Between "switching off Hyperthreading" and "commenting one line in libcairo", I choose the latter :)

Encryptor

  • Guest
Re: Constant Random Crashing
« Reply #33 on: September 23, 2006, 01:13:57 am »
Ok, here's an interesting fact.
I disabled the Code completion plugin, and I did not have any crashes.

netzmeister

  • Guest
Re: Constant Random Crashing
« Reply #34 on: October 07, 2006, 09:11:12 pm »
Ok, here's an interesting fact.
I disabled the Code completion plugin, and I did not have any crashes.
No, it still crashes..

bjm

  • Guest
Re: Constant Random Crashing
« Reply #35 on: October 08, 2006, 09:20:15 am »
Last week I posted a followup comment to Bug #8579 in the C::B Berlios database.

There does appear to be a thread safety bug in the code completion plug-in. The
test patch I added seems to be working in that I haven't seen a crash since.

Currently I am only using a small subset of C::B features, so it's possible similar crashes
occur elsewhere in the code. The basic problem seems to be that the wxWidgets library
is not thread safe, and the code completion plug-in was not locking the required mutex
before updating the display. The abort in the cairo code is just a symptom of this.

I am also running a dual cpu box, so the crashes were very frequent.

The problem was tracked down by running C:B under gdb, and doing a backtrace of
all active threads after the crash (more details in the bug comment). You guys could try
a similar technique if you are seeing other cairo/GUI aborts.

I suggested the C::B developers review the patch in case it causes any nasty side effects
with features I am not using yet.

Hope this helps.

Cheers,
Barry.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: Constant Random Crashing
« Reply #36 on: October 08, 2006, 09:44:34 am »
can a few more "linux" dual core/cpu crash victims try the code changes mentioned at "http://developer.berlios.de/bugs/?func=detailbug&bug_id=8579&group_id=5358" out and test it. Just to see if there are other side effects ?
You can put your feedback over here.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Constant Random Crashing
« Reply #37 on: October 08, 2006, 10:59:48 pm »
I just did a clean compilation of Code::Blocks in Gentoo and it crashed in no time with that cairo problem. Applied those code changes and it seems to be working fine now.

P4 3.0 HT, just in case.

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Constant Random Crashing
« Reply #38 on: October 09, 2006, 03:05:35 am »
Very nice analysis by bjm there, I was very suspicious of this being a cairo problem, but of course I didn't look into the problem and have given up on CC for linux right now.

jheusala

  • Guest
Re: Constant Random Crashing
« Reply #39 on: October 21, 2006, 12:15:17 pm »
Is there ways to run Code::Blocks only on one core or build it without thread support? It could be better short-term solution...

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: Constant Random Crashing
« Reply #40 on: October 21, 2006, 12:33:51 pm »
I don't think this would be possible. Code::Blocks uses multiple threads for good reasons.

Scheduling all of them on only one core would be possible - but this decision is up to your system, Code::Blocks does not have any influence on that.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

jheusala

  • Guest
Re: Constant Random Crashing
« Reply #41 on: October 21, 2006, 01:00:58 pm »
Scheduling all of them on only one core would be possible - but this decision is up to your system, Code::Blocks does not have any influence on that.

That's right. I'm using Kubuntu Dapper. This helped for me:

Code
taskset 2 /usr/bin/codeblocks

PS: taskset is provided in the package schedutils.