CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   corrupted double-linked list (http://www.cfd-online.com/Forums/openfoam-bugs/66379-corrupted-double-linked-list.html)

hansel July 13, 2009 18:04

corrupted double-linked list
 
I updated my copy of 1.5-dev on 7/12/09 and now almost everything i do terminates with an error like the one shown below. Is anyone else having this problem or is this just a problem with my build?

It happens with mergeMeshes, turbFoam, turbDyFoam, icoFoam, etc.

*** glibc detected *** turbFoam: corrupted double-linked list: 0x0000000010000dd0 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f435dc7ca8e]
/lib/libc.so.6[0x7f435dc7de98]
/lib/libc.so.6(cfree+0x76)[0x7f435dc7e276]
/storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libOpenFOAM.so(_ZN4Foam14primitiveEntryD0Ev+0x167)[0x7f435eadd257]
/storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libOpenFOAM.so(_ZN4Foam10dictionaryD2Ev+0x6b)[0x7f435ead37fb]
/storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libOpenFOAM.so(_ZN4Foam15dictionaryEntryD0Ev+0x28)[0x7f435eae0ec8]
/storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libOpenFOAM.so(_ZN4Foam10dictionaryD1Ev+0x6b)[0x7f435ead372b]
/storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libOpenFOAM.so(_ZN4Foam5debug20deleteControlDictPt rD1Ev+0x18)[0x7f435ea92228]
/lib/libc.so.6(__cxa_finalize+0xb0)[0x7f435dc3aab0]
/storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libOpenFOAM.so[0x7f435ea8ae06]
======= Memory map: ========
00400000-0045c000 r-xp 00000000 09:01 970464 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linux64GccDPOpt/turbFoam
0065c000-0065e000 rw-p 0005c000 09:01 970464 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linux64GccDPOpt/turbFoam
022a7000-11492000 rw-p 022a7000 00:00 0 [heap]
7f4350000000-7f4350021000 rw-p 7f4350000000 00:00 0
7f4350021000-7f4354000000 ---p 7f4350021000 00:00 0
7f4355125000-7f43551d0000 r-xp 00000000 09:01 766163 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libLESfilters.so
7f43551d0000-7f43553cf000 ---p 000ab000 09:01 766163 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libLESfilters.so
7f43553cf000-7f43553d3000 rw-p 000aa000 09:01 766163 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libLESfilters.so
7f43553d3000-7f43553fb000 r-xp 00000000 09:01 766169 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libLESdeltas.so
7f43553fb000-7f43555fa000 ---p 00028000 09:01 766169 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libLESdeltas.so
7f43555fa000-7f43555fc000 rw-p 00027000 09:01 766169 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libLESdeltas.so
7f43555fc000-7f435570d000 r-xp 00000000 09:01 766201 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libcompressibleLESModels.so
7f435570d000-7f435590c000 ---p 00111000 09:01 766201 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libcompressibleLESModels.so
7f435590c000-7f4355913000 rw-p 00110000 09:01 766201 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libcompressibleLESModels.so
7f4355913000-7f4355aa0000 r-xp 00000000 09:01 766157 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libcompressibleRASModels.so
7f4355aa0000-7f4355c9f000 ---p 0018d000 09:01 766157 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libcompressibleRASModels.so
7f4355c9f000-7f4355ca5000 rw-p 0018c000 09:01 766157 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libcompressibleRASModels.so
7f4355ca5000-7f4355ce9000 r-xp 00000000 09:01 966850 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libspecie.so
7f4355ce9000-7f4355ee9000 ---p 00044000 09:01 966850 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libspecie.so
7f4355ee9000-7f4355eeb000 rw-p 00044000 09:01 966850 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libspecie.so
7f4355eeb000-7f4355f36000 r-xp 00000000 09:01 766030 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libbasicThermophysicalModels.so
7f4355f36000-7f4356135000 ---p 0004b000 09:01 766030 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libbasicThermophysicalModels.so
7f4356135000-7f4356138000 rw-p 0004a000 09:01 766030 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libbasicThermophysicalModels.so
7f435674f000-7f4356896000 r-xp 00000000 09:01 766189 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libincompressibleLESModels.so
7f4356896000-7f4356a96000 ---p 00147000 09:01 766189 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libincompressibleLESModels.so
7f4356a96000-7f4356a9f000 rw-p 00147000 09:01 766189 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libincompressibleLESModels.so
7f4356a9f000-7f4356aee000 r-xp 00000000 09:01 766364 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libforces.so
7f4356aee000-7f4356ced000 ---p 0004f000 09:01 766364 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libforces.so
7f4356ced000-7f4356cf0000 rw-p 0004e000 09:01 766364 /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libforces.so
7f435bfc3000-7f435bfcf000 r-xp 00000000 09:00 3217 /lib/libnss_files-2.9.so
7f435bfcf000-7f435c1ce000 ---p 0000c000 09:00 3217 /lib/libnss_files-2.9.so
7f435c1ce000-7f435c1cf000 r--p 0000b000 09:00 3217 /lib/libnss_files-2.9.so
7f435c1cf000-7f435c1d0000 rw-p 0000c000 09:00 3217 /lib/libnss_files-2.9.so
7f435c1d0000-7f435c1da000 r-xp 00000000 09:00 3219 /lib/libnss_nis-2.9.so
7f435c1da000-7f435c3d9000 ---p 0000a000 09:00 3219 /lib/libnss_nis-2.9.so
7f435c3d9000-7f435c3da000 r--p 00009000 09:00 3219 /lib/libnss_nis-2.9.so
7f435c3da000-7f435c3db000 rw-p 0000a000 09:00 3219 /lib/libnss_nis-2.9.so
7f435c3db000-7f435c3e3000 r-xp 00000000 09:00 3215 /lib/libnss_compat-2.9.so
7f435c3e3000-7f435c5e2000 ---p 00008000 09:00 3215 /lib/libnss_compat-2.9.so
7f435c5e2000-7f435c5e3000 r--p 00007000 09:00 3215 /lib/libnss_compat-2.9.so
7f435c5e3000-7f435c5e4000 rw-p 00008000 09:00 3215 /lib/libnss_compat-2.9.so
7f435c5e4000-7f435c5fb000 r-xp 00000000 09:00 3222 /lib/libpthread-2.9.so
7f435c5fb000-7f435c7fa000 ---p 00017000 09:00 3222 /lib/libpthread-2.9.so
7f435c7fa000-7f435c7fb000 r--p 00016000 09:00 3222 /lib/libpthread-2.9.so
7f435c7fb000-7f435c7fc000 rw-p 00017000 09:00 3222 /lib/libpthread-2.9.so
7f435c7fc000-7f435c800000 rw-p 7f435c7fc000 00:00 0
7f435c800000-7f435c802000 r-xp 00000000 09:00 3227 /lib/libutil-2.9.so
7f435c802000-7f435ca01000 ---p 00002000 09:00 3227 /lib/libutil-2.9.so
7f435ca01000-7f435ca02000 r--p 00001000 09:00 3227 /lib/libutil-2.9.so
7f435ca02000-7f435ca03000 rw-p 00002000 09:00 3227 /lib/libutil-2.9.so
7f435ca03000-7f435ca19000 r-xp 00000000 09:00 3214 /lib/libnsl-2.9.so
7f435ca19000-7f435cc19000 ---p 00016000 09:00 3214 /lib/libnsl-2.9.so
7f435cc19000-7f435cc1a000 r--p 00016000 09:00 3214 /lib/libnsl-2.9.so
7f435cc1a000-7f435cc1b000 rw-p 00017000 09:00 3214 /lib/libnsl-2.9.so
7f435cc1b000-7f435cc1d000 rw-p 7f435cc1b000 00:00 0
7f435cc1d000-7f435cc5b000 r-xp 00000000 09:01 266848 /storage/software/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linux64GccDPOpt/lib/libopen-pal.so.0.0.0
7f435cc5b000-7f435ce5a000 ---p 0003e000 09:01 266848 /storage/software/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linux64GccDPOpt/lib/libopen-pal.so.0.0.0
7f435ce5a000-7f435ce5d000 rw-p 0003d000 09:01 266848 /storage/software/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linux64GccDPOpt/lib/libopen-pal.so.0.0.0
7f435ce5d000-7f435ce7f000 rw-p 7f435ce5d000 00:00 0
7f435ce7f000-7f435ced8000 r-xp 00000000 09:01 266957 /storage/software/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linux64GccDPOpt/lib/libopen-rte.so.0.0.0
7f435ced8000-7f435d0d8000 ---p 00059000 09:01 266957 /storage/software/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linux64GccDPOpt/lib/libopen-rte.so.0.0.0
7f435d0d8000-7f435d0db000 rw-p 00059000 09:01 266957 /storage/software/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linux64GccDPOpt/lib/libopen-rte.so.0.0.0
7f435d0db000-7f435d0dc000 rw-p 7f435d0db000 00:00 0
7f435d0dc000-7f435d15b000 r-xp 00000000 09:01 266961 /storage/software/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linux64GccDPOpt/lib/libmpi.so.0.0.0
7f435d15b000-7f435d35b000 ---p 0007f000 09:01 266961 /storage/software/OpenFEnd

hansel July 13, 2009 23:53

More info
 
1 Attachment(s)
The problem has something to do with trying to calculate forces and torque on a face. I'm attaching a minimal case that shows the problem. This one gets corruption on exit when you run icoFoam or turbFoam on it. If I try to do something more complicated like moving meshes, I get a crash in the middle.

To run the demo, just blockMesh, then icoFoam (or turbFoam)

gschaider July 16, 2009 05:02

Quote:

Originally Posted by hansel (Post 222536)
I updated my copy of 1.5-dev on 7/12/09 and now almost everything i do terminates with an error like the one shown below. Is anyone else having this problem or is this just a problem with my build?

It happens with mergeMeshes, turbFoam, turbDyFoam, icoFoam, etc.

*** glibc detected *** turbFoam: corrupted double-linked list: 0x0000000010000dd0 ***

That looks to me not like a OF-error per se, but like a "the application an the library are out of tune"-problem. Usually that kind of problem occurs when the following happens:
  1. An update of the sources gets downloaded. This update changes the size that some object needs in memory (because data was added etc) or changes the interface in some other way
  2. Either only the library that was changed or the application that depends on it was recompiled
  3. When calling the application library and application each act upon their "version of the truth"
  4. Because their versions differ some great misunderstanding happens and your above stack-trace is thrown

In my experience the best way to resolve this problem is to make an Allwmake of the WHOLE distro (not just the parts that YOU thought were affected by the changes)

Bernhard

hansel July 16, 2009 11:59

Yes, that's what I thought it was too. But I actually wiped out my OpenFOAM-1.5-dev tree and used a complete fresh copy that I got via svn. I WmakeAll'd it and still got the same results.

That library isn't part of ThirdParty, is it?

hansel July 23, 2009 11:22

I have redownloaded the source and rebuilt several times with the same results. Has anyone been able to run my test case without getting an error? If so then I have yet another Ubuntu problem.

Steve

gschaider July 23, 2009 11:58

Quote:

Originally Posted by hansel (Post 223862)
I have redownloaded the source and rebuilt several times with the same results. Has anyone been able to run my test case without getting an error? If so then I have yet another Ubuntu problem.

Steve

You also rebuilt the stuff in ThirdParty? Have you checked whether this is specific to OF? (Escalate. in other words: compile and run a helloWorld.cpp, compile and run one of the OpenMPI-examples)

hansel July 23, 2009 13:00

Quote:

Originally Posted by gschaider (Post 223868)
You also rebuilt the stuff in ThirdParty? Have you checked whether this is specific to OF? (Escalate. in other words: compile and run a helloWorld.cpp, compile and run one of the OpenMPI-examples)

Not everything generates an error, just when I use the libforces.so library. I don't believe anything in Thirdparty is involved. (and nothing in Thirdparty came with the download.) Is there a corresponding Thirdparty-dev that's supposed to go with 1.5-dev?

All the solvers seem to work, as long as I don't try to measure forces or torques. Some even seem to work on some cases when I do measure forces.

paraFoam and paraview seem to work fine.

Steve

gschaider July 23, 2009 13:06

Quote:

Originally Posted by hansel (Post 223874)
Not everything generates an error, just when I use the libforces.so library. I don't believe anything in Thirdparty is involved. (and nothing in Thirdparty came with the download.) Is there a corresponding Thirdparty-dev that's supposed to go with 1.5-dev?

All the solvers seem to work, as long as I don't try to measure forces or torques. Some even seem to work on some cases when I do measure forces.

paraFoam and paraview seem to work fine.

Steve

Obviously you deleted and recompiled libforces.so. Check its dependencies with

ldd $FOAM_LIBBIN/libforces.so

hansel July 23, 2009 13:18

Quote:

Originally Posted by gschaider (Post 223875)
Obviously you deleted and recompiled libforces.so. Check its dependencies with

ldd $FOAM_LIBBIN/libforces.so

The results are shown below. I don't see anything unexpected except that it is using some libs from gcc4.3.1. That brings me back to my question about if there is an updated Thirdparty directory (maybe with a different GCC) I should be using with the -dev OF.

Is it possible that libc.so.6 (from the system) is incompatible with gcc4.3.1?

$FOAM_LIBBIN/libforces.so
linux-vdso.so.1 => (0x00007fffe07fd000)
libfiniteVolume.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libfiniteVolume.so (0x00007f88d7607000)
libmeshTools.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libmeshTools.so (0x00007f88d7259000)
libincompressibleTransportModels.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libincompressibleTransportModels.so (0x00007f88d6ff1000)
libincompressibleRASModels.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libincompressibleRASModels.so (0x00007f88d6bf9000)
libincompressibleLESModels.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libincompressibleLESModels.so (0x00007f88d68a8000)
libbasicThermophysicalModels.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libbasicThermophysicalModels.so (0x00007f88d665b000)
libspecie.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libspecie.so (0x00007f88d6414000)
libcompressibleRASModels.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libcompressibleRASModels.so (0x00007f88d6082000)
libcompressibleLESModels.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libcompressibleLESModels.so (0x00007f88d5d6b000)
libstdc++.so.6 => /storage/software/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/lib64/libstdc++.so.6 (0x00007f88d5a5e000)
libm.so.6 => /lib/libm.so.6 (0x00007f88d57c9000)
libgcc_s.so.1 => /storage/software/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/lib64/libgcc_s.so.1 (0x00007f88d55b2000)
libc.so.6 => /lib/libc.so.6 (0x00007f88d523f000)
libtriSurface.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libtriSurface.so (0x00007f88d4fce000)
liblagrangian.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/liblagrangian.so (0x00007f88d4dc8000)
libLESdeltas.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libLESdeltas.so (0x00007f88d4b9e000)
libLESfilters.so => /storage/software/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libLESfilters.so (0x00007f88d48f0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f88d8697000)

hansel July 23, 2009 13:57

I may have solved my problem. I downloaded a fresh copy, and cleaned it before I built it. Previously I hadn't cleaned first. I haven't seen the error since doing that. (although that's only 3 or 4 runs so far.)

Thanks for the help.

Steve

bastil August 31, 2009 04:03

Quote:

Originally Posted by hansel (Post 223889)
I may have solved my problem. I downloaded a fresh copy, and cleaned it before I built it. Previously I hadn't cleaned first. I haven't seen the error since doing that. (although that's only 3 or 4 runs so far.)
Steve

Steve, did this solve the problem for you? I have the same here... How did you clean? AllWclean? wclean all? Also the Thirdparty directory?

Thanks BastiL

hansel August 31, 2009 09:44

Quote:

Originally Posted by bastil (Post 227977)
Steve, did this solve the problem for you? I have the same here... How did you clean? AllWclean? wclean all? Also the Thirdparty directory?

Thanks BastiL

I did rmoall and rmdepall then did the wmakeall.

hansel August 31, 2009 09:46

I didn't touch the 3rd party directory. Actually since i'm on Ubuntu, I'm using very little of 3rd party.

bastil September 2, 2009 10:22

For me this seems to be linked with the mpi from ThirdParty. It seemsto run correct only for the last version that was build against that mpi. I use mutiple versions and one ThirdPartyDir.

Hansel: I do not know what rmoall and rmdepall are?

hansel September 2, 2009 10:59

Quote:

Originally Posted by bastil (Post 228291)
For me this seems to be linked with the mpi from ThirdParty. It seemsto run correct only for the last version that was build against that mpi. I use mutiple versions and one ThirdPartyDir.

Hansel: I do not know what rmoall and rmdepall are?

Rmoall and rmdepall are scripts in the OpenFOAM/bin directory. Rmoall removes all the .o files and rmdepall removes all the dependency info. This pretty much forces a build to start from scratch so you don't accidently mix old and new versions.

vaina74 March 10, 2011 05:46

Hi, foamers.

I had the same error today, when merging two meshes. I also tried to run an old (working fine) case, but the problem remains. I don't know what's updated, but something should have changed. I read this thread and I checked if libforces.so is really the problem. If I remove the force evaluating function in controlDict files, the merging operations works fine. Now I go on with my case and restored controlDict files, but I'm afraid I'll still have problems with the solver.
In your opinion, what's happened? Have I to clean and rebuild, as gschaider and hansel suggested?

nisha March 30, 2014 02:13

*** glibc detected *** double free or corruption
 
I got this error:

*** glibc detected *** icoFoam: double free or corruption (out): 0x00007fffa28d3940 ***
*** glibc detected *** icoFoam: double free or corruption (out): 0x00007fff6719cbb0 ***


This error was reported as the startTime and endTime in system/controlDict were same. Silly me !


All times are GMT -4. The time now is 22:26.