Author Topic: How to edit linux kernel sources with code::blocks ?  (Read 15890 times)

Offline Brane2

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: How to edit linux kernel sources with code::blocks ?
« Reply #15 on: August 06, 2009, 06:47:53 am »
I have got myself Phenom II X4 955 and recompiled whole Gentoo system.

Error is still here. It feels like a race condition of some sort and it seems it is specific aither to AMD or native Quad Core machines.

Can anyone try this on similar machine ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12127
    • Travis build status
Re: How to edit linux kernel sources with code::blocks ?
« Reply #16 on: August 06, 2009, 01:22:29 pm »
Are you sure, that you system is stable? You can try prime95 (emerge gimple if I remember correctly) for some hours and memtest86.
But if you have done emerge -e world --jobs=5 successfully, I would say that your system is stable.
(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!]

Offline Brane2

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: How to edit linux kernel sources with code::blocks ?
« Reply #17 on: August 06, 2009, 01:38:58 pm »
System is stable.

I have done memtest86+ checking over night, and reemerged everything with :

emerge -eD --jobs=32 world (MAKEOPTS= -j9)

without a problem.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: How to edit linux kernel sources with code::blocks ?
« Reply #18 on: August 06, 2009, 05:05:54 pm »
Can you provide a backtrace if C::B crashes, or do you have a debug report in "/tmp/codeblocks-dbg..." or something like this (don't know the exact location at the moment) ?
If yes please attach it.

Offline Brane2

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: How to edit linux kernel sources with code::blocks ?
« Reply #19 on: August 07, 2009, 06:42:01 am »
When it crashes, it (sometimes) manages to write report in /tmp/codeblocks_dbgrpt_XXXX:200908ddTzzzzzz.

I recompiled glibc,glib,gtk+ and wxGTK with -ggdb in order to get debug symbols.

I ran it under gdb, but since C::B opens a few threads, it is unclear to me which thread did trigger SIGSEGV (Segmentation fault), altough my bet would be on default, 6-th thread:


Quote
(gdb) info threads
  7 Thread 0x7f8ac505d910 (LWP 22977)  0x00007f8adc9c4fe9 in [email protected]@GLIBC_2.3.2 () from /lib/libpthread.so.0
* 6 Thread 0x7f8ace048910 (LWP 22974)  0x00007f8adccca0cb in wxEvent::wxEvent () from /usr/lib/libwx_baseu-2.8.so.0
  5 Thread 0x7f8acfef1910 (LWP 22973)  0x00007f8adc9c4fe9 in [email protected]@GLIBC_2.3.2 () from /lib/libpthread.so.0
  4 Thread 0x7f8ad06f2910 (LWP 22972)  0x00007f8adc9c4fe9 in [email protected]@GLIBC_2.3.2 () from /lib/libpthread.so.0
  3 Thread 0x7f8ad0ef3910 (LWP 22971)  0x00007f8adc9c4fe9 in [email protected]@GLIBC_2.3.2 () from /lib/libpthread.so.0
  2 Thread 0x7f8ad16f4910 (LWP 22970)  0x00007f8adc9c4fe9 in [email protected]@GLIBC_2.3.2 () from /lib/libpthread.so.0
  1 Thread 0x7f8adf4f77a0 (LWP 22947)  0x00007f8ad63a4327 in _XPutXCBBuffer () from /usr/lib/libX11.so.6

Here are frames of all threads:

thread 1:

Quote
(gdb) info stack
#0  0x00007f8ad63a4327 in _XPutXCBBuffer () from /usr/lib/libX11.so.6
#1  0x00007f8ad63a4855 in ?? () from /usr/lib/libX11.so.6
#2  0x00007f8ad637b02e in XDefineCursor () from /usr/lib/libX11.so.6
#3  0x00007f8adb49ac29 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#4  0x00007f8add79561a in wxWindow::OnInternalIdle () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#5  0x00007f8add7fc7bd in wxAppBase::SendIdleEvents () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#6  0x00007f8add7fc7f4 in wxAppBase::SendIdleEvents () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#7  0x00007f8add7fc7f4 in wxAppBase::SendIdleEvents () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#8  0x00007f8add7fc7f4 in wxAppBase::SendIdleEvents () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#9  0x00007f8add7fc7f4 in wxAppBase::SendIdleEvents () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#10 0x00007f8add7fca54 in wxAppBase::ProcessIdle () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#11 0x00007f8add76bae3 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#12 0x00007f8ad993ddc3 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#13 0x00007f8ad99413f0 in ?? () from /usr/lib/libglib-2.0.so.0
#14 0x00007f8ad99417f5 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#15 0x00007f8adb801a6f in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x00007f8add78305a in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#17 0x00007f8add7fc88c in wxAppBase::MainLoop () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#18 0x0000000000431db0 in CodeBlocksApp::OnRun (this=0x807458) at app.cpp:765
#19 0x00007f8adcc6faac in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#20 0x0000000000431972 in main (argc=1, argv=0x0) at app.cpp:256

thread 2:

Quote
(gdb) info stack
#0  0x00007f8adc9c4fe9 in [email protected]@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f8adccc7c93 in wxConditionInternal::Wait () from /usr/lib/libwx_baseu-2.8.so.0
#2  0x00007f8adccc8cd9 in wxSemaphoreInternal::Wait () from /usr/lib/libwx_baseu-2.8.so.0
#3  0x00007f8adef3ae49 in BackgroundThread::Entry (this=0xc77178) at ./backgroundthread.h:151
#4  0x00007f8adccc99c1 in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#5  0x00007f8adc9c0644 in start_thread () from /lib/libpthread.so.0
#6  0x00007f8adbd8436d in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()

thread 3:
Quote
(gdb) info stack
#0  0x00007f8adc9c4fe9 in [email protected]@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f8adccc7c93 in wxConditionInternal::Wait () from /usr/lib/libwx_baseu-2.8.so.0
#2  0x00007f8adccc8cd9 in wxSemaphoreInternal::Wait () from /usr/lib/libwx_baseu-2.8.so.0
#3  0x00007f8adef3ae49 in BackgroundThread::Entry (this=0xc771b0) at ./backgroundthread.h:151
#4  0x00007f8adccc99c1 in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#5  0x00007f8adc9c0644 in start_thread () from /lib/libpthread.so.0
#6  0x00007f8adbd8436d in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()

thread 4:

Quote
(gdb) info stack
#0  0x00007f8adc9c4fe9 in [email protected]@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f8adccc7c93 in wxConditionInternal::Wait () from /usr/lib/libwx_baseu-2.8.so.0
#2  0x00007f8adccc8cd9 in wxSemaphoreInternal::Wait () from /usr/lib/libwx_baseu-2.8.so.0
#3  0x00007f8adef3ae49 in BackgroundThread::Entry (this=0xc771e8) at ./backgroundthread.h:151
#4  0x00007f8adccc99c1 in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#5  0x00007f8adc9c0644 in start_thread () from /lib/libpthread.so.0
#6  0x00007f8adbd8436d in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()


thread 5:

Quote
(gdb) info stack
#0  0x00007f8adc9c4fe9 in [email protected]@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f8adccc7c93 in wxConditionInternal::Wait () from /usr/lib/libwx_baseu-2.8.so.0
#2  0x00007f8adccc8cd9 in wxSemaphoreInternal::Wait () from /usr/lib/libwx_baseu-2.8.so.0
#3  0x00007f8adef3ae49 in BackgroundThread::Entry (this=0xc77220) at ./backgroundthread.h:151
#4  0x00007f8adccc99c1 in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#5  0x00007f8adc9c0644 in start_thread () from /lib/libpthread.so.0
#6  0x00007f8adbd8436d in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()

thread 6:

Quote
(gdb) info stack
#0  0x00007f8adccca0cb in wxEvent::wxEvent () from /usr/lib/libwx_baseu-2.8.so.0
#1  0x00007f8adefb7694 in CodeBlocksEvent::Clone (this=0x7f8ace047f20) at /usr/include/wx-2.8/wx/event.h:526
#2  0x00007f8adccca714 in wxEvtHandler::AddPendingEvent () from /usr/lib/libwx_baseu-2.8.so.0
#3  0x00007f8adeec952d in cbThreadPool::TaskDone (this=0x109ddf0, thread=<value optimized out>) at /usr/include/wx-2.8/wx/event.h:2570
#4  0x00007f8adeec999f in cbThreadPool::cbWorkerThread::Entry (this=0x10664e0) at cbthreadpool.cpp:236
#5  0x00007f8adccc99c1 in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#6  0x00007f8adc9c0644 in start_thread () from /lib/libpthread.so.0
#7  0x00007f8adbd8436d in clone () from /lib/libc.so.6
#8  0x0000000000000000 in ?? ()

thread 7:

Quote
(gdb) info stack
#0  0x00007f8adc9c4fe9 in [email protected]@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f8adccc7c93 in wxConditionInternal::Wait () from /usr/lib/libwx_baseu-2.8.so.0
#2  0x00007f8adccc8cd9 in wxSemaphoreInternal::Wait () from /usr/lib/libwx_baseu-2.8.so.0
#3  0x00007f8ace097be2 in ClassBrowserBuilderThread::Entry (this=0x18ffcc0) at classbrowserbuilderthread.cpp:121
#4  0x00007f8adccc99c1 in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#5  0x00007f8adc9c0644 in start_thread () from /lib/libpthread.so.0
#6  0x00007f8adbd8436d in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()


I have also attached also a couple of xml bug_reports ( renamed to txt to get by forum filters ).





[attachment deleted by admin]

Offline Brane2

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: How to edit linux kernel sources with code::blocks ?
« Reply #20 on: October 01, 2009, 09:27:52 pm »
I've tried to crack this with gdb, but failed so far.

Latest changes in svn tree seem to have fixed it, whatever it was.

I have imported whole tree into an empty project, saved it, closed it and opened itd. Several times, without failure.

It seems that it is working now. It is slooooow as molasses, but it works.

BTW: Maybe endless object creation and destruction in C++ isn't such good idea after all ?

Same thing, written in decent C would simply fly...