October 25, 2014, 01:08:34 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: When registered with our forums, feel free to send a "here I am" post in,14168.0.html to differ human beings from SPAM bots.
   Home   Help Search Login Register  :: WebsiteWiki  
Pages: [1] 2  All   Go Down
  Send this topic  |  Print  
Author Topic: corrupted double-linked list  (Read 9244 times)
Advanced newcomer
Offline Offline

Posts: 19

« on: September 20, 2012, 11:33:20 am »


I use the svn build rev 8280 (2012-08-30 07:24:41) with gcc 4.6.3. I am on Ubuntu 12.04 64bits.
And when I build my project ( only when launching the build from a terminal ), I have sometimes the message when linking:

*** glibc detected *** codeblocks: corrupted double-linked list: 0x00000000027f8440 ***

And then it blocks with no more informations.

Does anyone know I can avoid this message.

Thank you.
« Last Edit: September 20, 2012, 11:52:44 am by darksquall57 » Logged
Advanced newcomer
Offline Offline

Posts: 19

« Reply #1 on: March 14, 2013, 05:24:32 pm »

Up !

I still have this bug with build rev 8900 does anyone know where it comes from ?
Lives here!
Offline Offline

Posts: 7664

« Reply #2 on: March 14, 2013, 07:30:05 pm »

Yes, fix you code!
Hint: learn how to use valgrind or a debugger to track it./

Keep in mind that this is not related to C::B and next time please read the rules.

<debugger plugin maintainer>
(most of the time I ignore long posts)
Offline Offline

Posts: 252

« Reply #3 on: March 14, 2013, 09:04:27 pm »

*** glibc detected *** codeblocks: corrupted double-linked list: 0x00000000027f8440 ***
@oBFusCATed - this line indicates that this is a codeblocks crash

Lives here!
Offline Offline

Posts: 6631

« Reply #4 on: March 15, 2013, 06:33:28 am »

*** glibc detected *** codeblocks: corrupted double-linked list: 0x00000000027f8440 ***
@oBFusCATed - this line indicates that this is a codeblocks crash

It is definitely a (longstanding) Code::Blocks (or C::B-plugin or possibly a wxWidgets) crash, but I never was able to track it down.


Jens  Debian - nightlies (and release) : Fedora [18 - 20]- and CentOS/RedHat [5, 6 & 7] - nightlies :
Advanced newcomer
Offline Offline

Posts: 19

« Reply #5 on: March 15, 2013, 08:51:37 am »

Thanks for the answers :

It's totally random (I can compile with no problem during 3 months and then get it everyday 10 times with the same version of Codeblocks ), but it seems to happen only when using codeblocks with a command-line.

My command line is basic :
codeblocks --rebuild --target="Release" project.cbp

Offline Offline

Posts: 1

« Reply #6 on: April 10, 2013, 01:32:06 pm »

I have the same problem. Sometimes when I run codeblocks from command line in a script, it fails with this error. Is it possible to make a workaround in a script, so when this happens, kill process and run build command again? Something like:

exec('codeblocks --build --target="release" project.cbp >> output')
if (output.contains("codeblocks: corrupted double linked list..."))
  goto startPoint;
The problem is that codeblocks is still running when the error occures, and never exits...
Offline Offline

Posts: 8

« Reply #7 on: April 24, 2013, 01:03:40 pm »

I see this bug often. Seems to be a multithreading bug in C::B, we are currently trying to get our build working on a new 48-core Linux box and the "corrupted double-linked list" crash seems to appear almost at each run. There are also some new problems like hanging, but I'm not yet 100% sure yet what component to blame here.
Advanced newcomer
Offline Offline

Posts: 19

« Reply #8 on: September 06, 2013, 10:44:26 am »


I've some news about this bug. I just ran codeblocks (svn 9296 ) in Fedora 19 64bits and for the first time I have a backtrace :

*** Error in `codeblocks': corrupted double-linked list: 0x0000000004e0b140 ***
======= Backtrace: =========
======= Memory map: ========
00400000-0052c000 r-xp 00000000 fd:01 2887899                            /usr/local/bin/codeblocks
0072b000-0073b000 r--p 0012b000 fd:01 2887899                            /usr/local/bin/codeblocks
0073b000-00741000 rw-p 0013b000 fd:01 2887899                            /usr/local/bin/codeblocks
00741000-00748000 rw-p 00000000 00:00 0
01b29000-05e4f000 rw-p 00000000 00:00 0                                  [heap]
3cf6a00000-3cf6a21000 r-xp 00000000 fd:01 2768235                        /usr/lib64/
3cf6c20000-3cf6c21000 r--p 00020000 fd:01 2768235                        /usr/lib64/
3cf6c21000-3cf6c22000 rw-p 00021000 fd:01 2768235                        /usr/lib64/
3cf6c22000-3cf6c23000 rw-p 00000000 00:00 0
3cf6e00000-3cf6f4a000 r-xp 00000000 fd:01 2754185                        /usr/lib64/
3cf6f4a000-3cf7149000 ---p 0014a000 fd:01 2754185                        /usr/lib64/
3cf7149000-3cf7151000 r--p 00149000 fd:01 2754185                        /usr/lib64/
3cf7151000-3cf7156000 rw-p 00151000 fd:01 2754185                        /usr/lib64/
3cf7156000-3cf7160000 rw-p 00000000 00:00 0
3cf7200000-3cf73b6000 r-xp 00000000 fd:01 2768236                        /usr/lib64/
3cf73b6000-3cf75b6000 ---p 001b6000 fd:01 2768236                        /usr/lib64/
3cf75b6000-3cf75ba000 r--p 001b6000 fd:01 2768236                        /usr/lib64/
3cf75ba000-3cf75bc000 rw-p 001ba000 fd:01 2768236                        /usr/lib64/
3cf75bc000-3cf75c1000 rw-p 00000000 00:00 0
3cf7600000-3cf7616000 r-xp 00000000 fd:01 2754054                        /usr/lib64/
3cf7616000-3cf7816000 ---p 00016000 fd:01 2754054                        /usr/lib64/
3cf7816000-3cf7817000 r--p 00016000 fd:01 2754054                        /usr/lib64/
3cf7817000-3cf7818000 rw-p 00017000 fd:01 2754054                        /usr/lib64/
3cf7818000-3cf781c000 rw-p 00000000 00:00 0
3cf7a00000-3cf7a03000 r-xp 00000000 fd:01 2768241                        /usr/lib64/
3cf7a03000-3cf7c02000 ---p 00003000 fd:01 2768241                        /usr/lib64/
3cf7c02000-3cf7c03000 r--p 00002000 fd:01 2768241                        /usr/lib64/
3cf7c03000-3cf7c04000 rw-p 00003000 fd:01 2768241                        /usr/lib64/
3cf7e00000-3cf7e15000 r-xp 00000000 fd:01 2768248                        /usr/lib64/
3cf7e15000-3cf8014000 ---p 00015000 fd:01 2768248                        /usr/lib64/
3cf8014000-3cf8015000 r--p 00014000 fd:01 2768248                        /usr/lib64/
3cf8015000-3cf8016000 rw-p 00015000 fd:01 2768248                        /usr/lib64/
3cf8200000-3cf8301000 r-xp 00000000 fd:01 2754123                        /usr/lib64/
3cf8301000-3cf8500000 ---p 00101000 fd:01 2754123                        /usr/lib64/
3cf8500000-3cf8501000 r--p 00100000 fd:01 2754123                        /usr/lib64/
3cf8501000-3cf8502000 rw-p 00101000 fd:01 2754123                        /usr/lib64/ : ligne 1 :  3288 Abandon                 (core dumped)codeblocks --rebuild --target="MyTarget" MyProject.cbp

I hope it will help you to eradicate this bug Cheesy.
Lives here!
Offline Offline

Posts: 509

« Reply #9 on: September 06, 2013, 02:12:32 pm »

possibly a temporary workaround:

is there a possibility that someone of u2 can run a  Valgrind check? or a exact step by step guide to reproduce the bug? also version and os would be helpful.

thanks and greetings
Advanced newcomer
Offline Offline

Posts: 19

« Reply #10 on: September 12, 2013, 08:44:55 am »

I can't do a step by step guide because it's completely random, but like paavo512 said, it seems to appear more frequently when using many threads to compile.
In my case it appears also more frequently when I'm using a virtual machine (Virtualbox).
For example:

Host Machine : 6 core
Virtual Machine : 4 cores
Run a compilation on both machine at the same time.

That's the only "guide" I can give right now.
Offline Offline

Posts: 8

« Reply #11 on: October 31, 2013, 11:01:22 am »

Another backtrace (seems to be from a codeblocks child process launched by codeblocks master process when building a workspace from command-line, as the workspace build continued after this crash and even appeared to succeed). The crash seems to come from the process shutdown, so maybe it indeed had already completed all its work.

This is from an older codeblocks build (2010), so this place might be already fixed, but if not, the stacktrace should give a good idea where it goes wrong. I have a feeling there are a lot of multithreading bugs in codeblocks code.

     [exec] Using built-in specs.
     [exec] Target: x86_64-suse-linux
     [exec] Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 --enable-ssp --disable-libssp --with-bugurl= --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.3 --enable-linux-futex --without-system-libunwind --with-cpu=generic --build=x86_64-suse-linux
     [exec] Thread model: posix
     [exec] gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux)
     [exec] COMPILER_PATH=/usr/lib64/gcc/x86_64-suse-linux/4.3/:/usr/lib64/gcc/x86_64-suse-linux/4.3/:/usr/lib64/gcc/x86_64-suse-linux/:/usr/lib64/gcc/x86_64-suse-linux/4.3/:/usr/lib64/gcc/x86_64-suse-linux/:/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/
     [exec] LIBRARY_PATH=/usr/lib64/gcc/x86_64-suse-linux/4.3/:/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/lib/:/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../:/lib/:/usr/lib/
     [exec] COLLECT_GCC_OPTIONS='-L../../BuildProducts/Linux/Release/lib' '-o' '../../BuildProducts/Linux/Release/bin/acapella' '-v' '-shared-libgcc' '-mtune=generic'
     [exec]  /usr/lib64/gcc/x86_64-suse-linux/4.3/collect2 --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ -o ../../BuildProducts/Linux/Release/bin/acapella /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.3/crtbegin.o -L../../BuildProducts/Linux/Release/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.3 -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../.. ../../Intermediates/Release/Acapella/Version.o ../../Intermediates/Release/Acapella/autotest.o ../../Intermediates/Release/Acapella/mainstate_posix.o ../../Intermediates/Release/Acapella/options.o ../../Intermediates/Release/Acapella/problem.*** glibc detected *** codeblocks: corrupted double-linked list: 0x0000000001260c70 ***
     [exec] ======= Backtrace: =========
     [exec] /lib64/[0x7f153e3f8018]
     [exec] /lib64/[0x7f153e3f85ff]
     [exec] /lib64/[0x7f153e3f9b80]
     [exec] /lib64/[0x7f153e3fcf6c]
     [exec] /usr/lib64/[0x7f15413a3055]
     [exec] /usr/lib64/[0x7f15413a28ba]
     [exec] /usr/lib64/[0x7f15412d4e3a]
     [exec] /usr/lib64/[0x7f15413be4f5]
     [exec] /usr/lib64/[0x7f15413be77c]
     [exec] /usr/lib64/[0x7f15413c2ee2]
     [exec] codeblocks(_ZN9MainFrame18OnApplicationCloseER12wxCloseEvent+0x268)[0x46ab68]
     [exec] /usr/lib64/[0x7f153f3723e9]
     [exec] /usr/lib64/[0x7f153f3735c4]
     [exec] /usr/lib64/[0x7f153f3736b7]
     [exec] /usr/lib64/[0x7f153f373640]
Almost regular
Offline Offline

Posts: 148

Each failure is a double success.

« Reply #12 on: October 31, 2013, 03:23:17 pm »

Out of curiosity, I have tested this under Windows 7 Enterprise [64-bit] with TDM's GCC 4.8.1 [32-bit] and seems the issue remains the same:

C:\Users\stefanos\GENERAL\Projects\ANSI C\C_GeneralCode>gdb C:\codeblocks\codeblocks.exe
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
Reading symbols from C:\codeblocks\codeblocks.exe...(no debugging symbols found)
(gdb) run --build --target="Debug" C_GeneralCode.cbp
Starting program: C:\codeblocks\codeblocks.exe --build --target="Debug" C_GeneralCode.cbp
[New Thread 3724.0x9b0]
[New Thread 3724.0x8d4]
[New Thread 3724.0xef4]
[New Thread 3724.0x584]
[New Thread 3724.0x484]
[New Thread 3724.0xb20]
[New Thread 3724.0x5f4]
[New Thread 3724.0x294]
[New Thread 3724.0xf2c]
[New Thread 3724.0xfd0]
[New Thread 3724.0xc10]
[New Thread 3724.0xe34]
[New Thread 3724.0xe98]
[New Thread 3724.0x9a4]
[New Thread 3724.0xaf4]
[New Thread 3724.0xe1c]
[New Thread 3724.0xc6c]
[New Thread 3724.0xca4]
[New Thread 3724.0xcbc]
[New Thread 3724.0x784]
[New Thread 3724.0xe74]
[New Thread 3724.0xdc]
[New Thread 3724.0xe50]
[New Thread 3724.0x73c]
[New Thread 3724.0xb9c]
[New Thread 3724.0x33c]
[New Thread 3724.0xe40]

Program received signal SIGSEGV, Segmentation fault.
0x0040666c in ?? ()
(gdb) backtrace
#0  0x0040666c in ?? ()
#1  0x00404779 in ?? ()
#2  0x004df986 in codeblocks!_ZN12cbToolPlugin9BuildMenuEP9wxMenuBar ()
#3  0x67b31e85 in wxmsw28u_gcc!_Z14wxUninitializev () from C:\codeblocks\wxmsw28u_gcc.dll
#4  0x67b89010 in wxmsw28u_gcc!_Z7wxEntryP11HINSTANCE__S0_Pci () from C:\codeblocks\wxmsw28u_gcc.dll
#5  0x00401dd3 in ?? ()
#6  0x0051426b in codeblocks!_ZNK8cbPlugin9CanDetachEv ()
#7  0x004010fd in ?? ()
#8  0x004012b5 in ?? ()
#9  0x75be336a in KERNEL32!BaseThreadInitThunk () from C:\Windows\syswow64\kernel32.dll
#10 0x77069f72 in ntdll!RtlInitializeExceptionChain () from C:\Windows\system32\ntdll.dll
#11 0x77069f45 in ntdll!RtlInitializeExceptionChain () from C:\Windows\system32\ntdll.dll
#12 0x00000000 in ?? ()

Windows XP (VirtualBox), Windows 7 Enterprise,
TDM's GCC 4.8.1, GCC 4.x on Debian testing,
Lives here!
Offline Offline

Posts: 3938

« Reply #13 on: October 31, 2013, 04:22:54 pm »

#2  0x004df986 in codeblocks!_ZN12cbToolPlugin9BuildMenuEP9wxMenuBar ()
Interestingly, the only cbToolPlugins are AStyle, XPManifest, and ScritpedWizard, none of which uses several threads or is ever possibly called in a multi-threaded context.

Some contrib plugin maybe?

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."
Offline Offline

Posts: 1

« Reply #14 on: January 11, 2014, 09:00:07 am »

FWIW, as of today, running the latest + contrib, the FileManager plugin causes this to occur upon both shutdown and disabling the plugin via the Plugins interface. (64-bit multilib Gentoo, wxWidgets 3.0)

Removing from /usr/share/codeblocks allows Code::Blocks to exit properly.
Pages: [1] 2  All   Go Up
  Send this topic  |  Print  
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!