CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   OF15 glibc error upon successful completion of icoFoam run (http://www.cfd-online.com/Forums/openfoam-bugs/62408-of15-glibc-error-upon-successful-completion-icofoam-run.html)

aunola September 20, 2008 07:45

glibc detected a double free o
 
glibc detected a double free or memory corruption as icoFoam terminated after a successful run in OF-1.5.

The error message is below. If necessary I can provide my case.

Time = 8

Courant Number mean: 0.001735591 max: 0.1651915
DILUPBiCG: Solving for Ux, Initial residual = 3.232459e-07, Final residual = 3.232459e-07, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 0.0003757554, Final residual = 8.58859e-08, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.0003756824, Final residual = 9.056856e-08, No Iterations 1
DICPCG: Solving for p, Initial residual = 4.56614e-05, Final residual = 9.611091e-07, No Iterations 27
time step continuity errors : sum local = 1.782548e-13, global = -1.424273e-15, cumulative = -2.106906e-11
DICPCG: Solving for p, Initial residual = 3.759713e-05, Final residual = 9.636768e-07, No Iterations 27
time step continuity errors : sum local = 1.7872e-13, global = -6.378474e-15, cumulative = -2.107544e-11
ExecutionTime = 71421.35 s ClockTime = 72432 s

End

*** glibc detected *** icoFoam: double free or corruption (fasttop): 0x0ca21c50 ***
======= Backtrace: =========
/lib/libc.so.6[0x66d874]
/lib/libc.so.6(cfree+0x96)[0x66f8d6]
/home/mar/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/lib/libstdc++.so.6(_ZdlP v+0x21)[0x57a051]
/home/mar/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/lib/libstdc++.so.6(_ZNSs 4_Rep10_M_destroyERKSaIcE+0x1d)[0x55861d]
/home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so(_ZN4Foam4wo rdD1Ev+0x63)[0xb1acd3]
/lib/libc.so.6(exit+0x89)[0x62db39]
/lib/libc.so.6(__libc_start_main+0xee)[0x6165de]
icoFoam(_ZN4Foam11regIOobject14readIfModifiedEv+0x 191)[0x8059131]
======= Memory map: ========
00110000-00111000 r-xp 00110000 00:00 0 [vdso]
00111000-004b2000 r-xp 00000000 fd:00 2058498 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so
004b2000-004bc000 r--p 003a0000 fd:00 2058498 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so
004bc000-004bf000 rw-p 003aa000 fd:00 2058498 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so
004bf000-004c3000 rw-p 004bf000 00:00 0
004c3000-004c6000 r-xp 00000000 fd:00 1630441 /lib/libdl-2.8.so
004c6000-004c7000 r--p 00002000 fd:00 1630441 /lib/libdl-2.8.so
004c7000-004c8000 rw-p 00003000 fd:00 1630441 /lib/libdl-2.8.so
004c8000-005a6000 r-xp 00000000 fd:00 2074872 /home/mar/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/lib/libstdc++.so.6.0.10
005a6000-005aa000 r--p 000dd000 fd:00 2074872 /home/mar/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/lib/libstdc++.so.6.0.10
005aa000-005ab000 rw-p 000e1000 fd:00 2074872 /home/mar/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/lib/libstdc++.so.6.0.10
005ab000-005b1000 rw-p 005ab000 00:00 0
005b1000-005d8000 r-xp 00000000 fd:00 1630442 /lib/libm-2.8.so
005d8000-005d9000 r--p 00026000 fd:00 1630442 /lib/libm-2.8.so
005d9000-005da000 rw-p 00027000 fd:00 1630442 /lib/libm-2.8.so
005da000-005e6000 r-xp 00000000 fd:00 2074874 /home/mar/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/lib/libgcc_s.so.1
005e6000-005e7000 rw-p 0000b000 fd:00 2074874 /home/mar/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/lib/libgcc_s.so.1
005e7000-005fc000 r-xp 00000000 fd:00 1630445 /lib/libpthread-2.8.so
005fc000-005fd000 r--p 00014000 fd:00 1630445 /lib/libpthread-2.8.so
005fd000-005fe000 rw-p 00015000 fd:00 1630445 /lib/libpthread-2.8.so
005fe000-00600000 rw-p 005fe000 00:00 0
00600000-00763000 r-xp 00000000 fd:00 1630438 /lib/libc-2.8.so
00763000-00765000 r--p 00163000 fd:00 1630438 /lib/libc-2.8.so
00765000-00766000 rw-p 00165000 fd:00 1630438 /lib/libc-2.8.so
00766000-00769000 rw-p 00766000 00:00 0
00769000-00772000 r-xp 00000000 fd:00 2099080 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/openmpi-1.2.6/libPstream.so
00772000-00773000 r--p 00008000 fd:00 2099080 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/openmpi-1.2.6/libPstream.so
00773000-00774000 rw-p 00009000 fd:00 2099080 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/openmpi-1.2.6/libPstream.so
00774000-007e3000 r-xp 00000000 fd:00 2058476 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libtriSurface.so
007e3000-007e4000 r--p 0006e000 fd:00 2058476 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libtriSurface.so
007e4000-007e5000 rw-p 0006f000 fd:00 2058476 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libtriSurface.so
007e5000-007f9000 r-xp 00000000 fd:00 2058459 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libz.so
007f9000-007fa000 r--p 00013000 fd:00 2058459 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libz.so
007fa000-007fb000 rw-p 00014000 fd:00 2058459 /home/mar/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libz.so
007fb000-0086a000 r-xp 00000000 fd:00 2171174 /home/mar/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/libmpi.s o.0.0.0
0086a000-0086b000 r--p 0006e000 fd:00 2171174 /home/mar/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/libmpi.s o.0.0.0
0086b000-00872000 rw-p 0006f000 fd:00 2171174 /home/mar/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/liAborte d

henry September 20, 2008 17:22

Did you install the binary rel
 
Did you install the binary release of 1.5 or build from sources? If the former try building from sources to be sure the OpenFOAM build is consistent with all the components of your OS.

aunola September 21, 2008 04:17

I installed the binaries. I wi
 
I installed the binaries. I will try a rebuild, re-run the case and let you know what happens.

aunola September 25, 2008 07:07

Building from sources was adve
 
Building from sources was adventourous. It did however not solve the problem (on Fedora 9). It happens only for medium to large size problems (> 1 million cells). The case runs fine on an older Fedora 7 installation though, so OF seems to be exculpated.

mattijs September 25, 2008 07:46

You seem to be running a 32bit
 
You seem to be running a 32bit installation. With large problem sizes you might get over the 32 bit pointer capability (2-4Gb, depending on OS). Try running the 64 bit version (on a 64 bit machine obviously).

aunola October 1, 2008 05:14

It is a 32 bit machine but tha
 
It is a 32 bit machine but that is not the problem. The mesh was generated with snappyHexMesh which had no problems with addressing the cells. I noticed it also happens for small cases with about 500k cells, which wouldn't be plagued by any addressing problems.

The problem seems to be with the libraries on my installation. I have gone back to Fedora 7 and all is well.

Apologies for reporting a problem not caused by OF.

mattijs October 1, 2008 06:06

Sounds a bit like http://www.c
 
Sounds a bit like http://www.cfd-online.com/cgi-bin/OpenFOAM_Discus/show.cgi?tpc=126&post=22338#POST223 38

But that should be independent of problem size.

Another one is there is an indexing problem with snappyHexMesh in 1.5 which occasionally turns up. Do you get the same problem in 1.5.x?

aunola October 5, 2008 03:33

Surprisingly, no. I used the e
 
Surprisingly, no. I used the exact same Fedora 9 install as the one on which 1.5 build from sources fails. I have not yet investigated further why 1.5 and 1.5.x behave differently on my distro. I am inclined to categorize it is a peculiarity of my system.

Bob April 22, 2009 07:59

glibc detected *** boussinesqBuoyantTurbFoam: double free or corruption
 
Hi,
After compiling without any errors a modified model for incompressible flows (boussinesqBuoyantTurbFoam), I encounter the error below when I run the case.
This case is only a few thousends of computational cell in size and I Installed OF from the source files as Henry suggested previously.

Actually, the error is twofold:
1) "boussinesqBuoyantTurbFoam: double free or corruption " - meaning???
2) "nu" is undefined

Could the first error be linked to the viscosity "nu" which seems not to be defined although it is included in the readTransportProperties.H as:
dimensionedScalar rho0
(
transportProperties.lookup("rho0")
);
dimensionedScalar nu
(
dimensionedScalar(transportProperties.lookup("mu") )/rho0
);
and in transportProperties.H I have the following:
mu mu [1 -1 -1 0 0 0 0] 1e-03;
rho0 rho0 [1 -3 0 0 0 0 0] 998.2; //density at 20C
I do not see any reason why it should not work. Is there somewhere a conflict with the turbulence model?

Does anyone have an idea about this error?

Many thanks in advance!

Regards,
Bob


/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : boussinesqBuoyantTurbFoam
Date : Apr 21 2009
Time : 22:02:15
Host : bob-virtualbox
PID : 10770
Case : /home/bob/OpenFOAM/bob-1.5/run/TurbLockExchange
nProcs : 1
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh for time = 0
Reading transportProperties

Reading environmentalProperties
Reading field p
Reading field T
Reading field U
Reading/calculating field rho
Creating field DTEff
Reading/calculating face flux field phi
Selecting incompressible transport model Newtonian

keyword nu is undefined in dictionary "/home/bob/OpenFOAM/bob-1.5/run/TurbLockExchange/constant/transportProperties"
file: /home/bob/OpenFOAM/bob-1.5/run/TurbLockExchange/constant/transportProperties from line 17 to line 25.
From function dictionary::lookupEntry(const word& keyword) const
in file db/dictionary/dictionary.C at line 213.
FOAM exiting
*** glibc detected *** boussinesqBuoyantTurbFoam: double free or corruption (fasttop): 0x08112918 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb6a98a85]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb6a9c4f0]
/home/bob/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb6c79051]
/home/bob/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/lib/libstdc++.so.6(_ZNSs4_Rep10_M_destroyERKSaIcE+0x1d )[0xb6c5761d]
/home/bob/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/lib/libstdc++.so.6(_ZNSsD2Ev+0x63)[0xb6c58f03]
/home/bob/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libincompressibleRASModels.so(_ZN4Foam4wordD1Ev+0x 1d)[0xb7d8db2d]
/lib/tls/i686/cmov/libc.so.6(__cxa_finalize+0xb1)[0xb6a5b3b1]
/home/bob/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libboussinesqRASModels.so[0xb7cc8be4]
/home/bob/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libboussinesqRASModels.so[0xb7d307b0]
/lib/ld-linux.so.2[0xb7f46fcf]
/lib/tls/i686/cmov/libc.so.6(exit+0xd4)[0xb6a5b084]
/home/bob/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so(_ZN4Foam7IOerror4exitEi+0x20a)[0xb6d8c64a]
/home/bob/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so(_ZNK4Foam10dictionary11lookupEntryE RKNS_4wordEb+0xec)[0xb6dd299c]
/home/bob/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so(_ZNK4Foam10dictionary6lookupERKNS_4 wordEb+0x2c)[0xb6dd29dc]
/home/bob/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libincompressibleTransportModels.so(_ZN4Foam15visc osityModels9NewtonianC1ERKNS_4wordERKNS_10dictiona ryERKNS_14GeometricFieldINS_6VectorIdEENS_12fvPatc hFieldENS_7volMeshEEERKNS8_IdNS_13fvsPatchFieldENS _11surfaceMeshEEE+0x8a)[0xb7c6afba]
/home/bob/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libincompressibleTransportModels.so(_ZN4Foam14visc osityModel31adddictionaryConstructorToTableINS_15v iscosityModels9NewtonianEE3NewERKNS_4wordERKNS_10d ictionaryERKNS_14GeometricFieldINS_6VectorIdEENS_1 2fvPatchFieldENS_7volMeshEEERKNSB_IdNS_13fvsPatchF ieldENS_11surfaceMeshEEE+0x4f)[0xb7c6beff]
/home/bob/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libincompressibleTransportModels.so(_ZN4Foam14visc osityModel3NewERKNS_4wordERKNS_10dictionaryERKNS_1 4GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS _7volMeshEEERKNS7_IdNS_13fvsPatchFieldENS_11surfac eMeshEEE+0x3d0)[0xb7c6a3d0]
/home/bob/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libincompressibleTransportModels.so(_ZN4Foam25sing lePhaseTransportModelC1ERKNS_14GeometricFieldINS_6 VectorIdEENS_12fvPatchFieldENS_7volMeshEEERKNS1_Id NS_13fvsPatchFieldENS_11surfaceMeshEEE+0x232)[0xb7c7dad2]
boussinesqBuoyantTurbFoam[0x805b1e6]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb6a43450]
boussinesqBuoyantTurbFoam(_ZN4Foam11regIOobject14r eadIfModifiedEv+0x1cd)[0x805a101]
======= Memory map: ========
08048000-080a8000 r-xp 00000000 08:01 65539 /home/bob/OpenFOAM/bob-1.5/applications/bin/linuxGccDPOpt/boussinesqBuoyantTurbFoam
080a8000-080a9000 rw-p 00060000 08:01 65539 /home/bob/OpenFOAM/bob-1.5/applications/bin/linuxGccDPOpt/boussinesqBuoyantTurbFoam
080a9000-08414000 rw-p 080a9000 00:00 0 [heap]
b6200000-b6221000 rw-p b6200000 00:00 0
b6221000-b6300000 ---p b6221000 00:00 0
b63bf000-b6691000 rw-p b63bf000 00:00 0
b66e1000-b6826000 rw-p b66e1000 00:00 0
b6826000-b682f000 r-xp 00000000 08:01 255328 /lib/tls/i686/cmov/libnss_files-2.7.so
b682f000-b6831000 rw-p 00008000 08:01 255328 /lib/tls/i686/cmov/libnss_files-2.7.so
b6831000-b6839000 r-xp 00000000 08:01 255332 /lib/tls/i686/cmov/libnss_nis-2.7.so
b6839000-b683b000 rw-p 00007000 08:01 255332 /lib/tls/i686/cmov/libnss_nis-2.7.so
b684a000-b684c000 rw-p b684a000 00:00 0
b684c000-b684e000 r-xp 00000000 08:01 255345 /lib/tls/i686/cmov/libutil-2.7.so
b684e000-b6850000 rw-p 00001000 08:01 255345 /lib/tls/i686/cmov/libutil-2.7.so
b6850000-b6851000 rw-p b6850000 00:00 0
b6851000-b6865000 r-xp 00000000 08:01 255322 /lib/tls/i686/cmov/libnsl-2.7.so
b6865000-b6867000 rw-p 00013000 08:01 255322 /lib/tls/i686/cmov/libnsl-2.7.so
b6867000-b6869000 rw-p b6867000 00:00 0
b6869000-b689e000 r-xp 00000000 08:01 373206 /home/bob/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/libopen-pal.so.0.0.0
b689e000-b689f000 r--p 00034000 08:01 373206 /home/bob/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/libopen-pal.so.0.0.0
b689f000-b68a0000 rw-p 00035000 08:01 373206 /home/bob/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/libopen-pal.so.0.0.0
b68a0000-b68c2000 rw-p b68a0000 00:00 0
b68c2000-b6912000 r-xp 00000000 08:01 373208 /home/bob/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/libopen-rte.so.0.0.0
b6912000-b6913000 r--p 00050000 08:01 373208 /home/bob/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/libopen-rte.so.0.0.0
b6913000-b6915000 rw-p 00051000 08:01 373208 /home/bob/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/libopen-rte.so.0.0.0
b6915000-b6984000 r-xp 00000000 08:01 373195 /home/bob/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/libmpi.so.0.0.0
b6984000-b6985000 r--p 0006e000 08:01 373195 /home/bob/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/libmpi.so.0.0.0
b6985000-b698c000 rw-p 0006f000 08:01 373195 /home/bob/OpenFOAM/ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt/lib/libmpi.so.0.0.0
b698c000-b6993000 rw-p b698c000 00:00 0
b6993000-b69a7000 r-xp 00000000 08:01 136215 Aborted

mattijs April 23, 2009 13:09

1) double corruption means that some allocated memory gets deleted twice. You can investigate these problems with e.g. valgrind. It usually happens from having an OpenFOAM debug symbol twice in your executable or libraries.

2) From your traceback : your solver uses an incompressibleRASModels which uses the transport model (incompressible) which tries to extract the necessary data from the transportProperties dictionary. Since it is incompressible it only knows about nu.

Bob April 24, 2009 03:27

Dear Mattijs,

Many thanks for the answers!

Cheers,
Bob


All times are GMT -4. The time now is 18:25.