CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Chasing Down a 'double free or corruption (!prev)' Error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2020, 10:54
Default Chasing Down a 'double free or corruption (!prev)' Error
  #1
Member
 
Conor Crickmore
Join Date: Jan 2020
Location: Leicestershire, United Kingdom
Posts: 36
Rep Power: 6
cjc96 is on a distinguished road
Hey!
I hope everyone is keeping safe :-)

I've been working on a custom Lagrangian solver (OpenFOAM 7) as part of the early stages of my PhD and have reached the point where I am happy with its functionality but am struggling to clean up a last niggling issue, the titular 'double free or corruption (!prev)' error that crashes the solver on completion. It doesn't actually impact the results but isn't something I am happy to leave alone either.

Initially, I only had user-modified versions of lagrangian/intermediate and lagrangian/turbulence and had no issues, it was modifying my own lagrangian/basic that introduced the issue

The (parallel) error in question is as follows:
Code:
[LNX-TTCJC-1:23178] *** Process received signal ***
[LNX-TTCJC-1:23178] Signal: Aborted (6)
[LNX-TTCJC-1:23178] Signal code:  (-6)
[LNX-TTCJC-1:23177] *** Process received signal ***
[LNX-TTCJC-1:23177] Signal: Aborted (6)
[LNX-TTCJC-1:23177] Signal code:  (-6)
[LNX-TTCJC-1:23178] [LNX-TTCJC-1:23177] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20)[0x7f262bae7f20]
[LNX-TTCJC-1:23177] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f262bae7e97]
[LNX-TTCJC-1:23177] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f262bae9801]
[LNX-TTCJC-1:23177] [ 3] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x89897)[0x7f262bb32897]
[LNX-TTCJC-1:23177] [ 4] /lib/x86_64-linux-gnu/libc.so.6(+0x9090a)[0x7f262bb3990a]
[LNX-TTCJC-1:23177] [ 5] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x534)[0x7f262bb40e84]
[LNX-TTCJC-1:23177] [ 6] /lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0xf5)[0x7f262baec615]
[LNX-TTCJC-1:23177] [ 7] /opt/openfoam7/platforms/linux64GccDPInt32Opt/lib/liblagrangian.so(+0xcd23)[0x7f2629ec3d23]
[LNX-TTCJC-1:23177] *** End of error message ***
From my still rudimentary knowledge, I know that the error is due to some aspect of my solver still calling for 'liblagrangian' as opposed to my custom 'liblagrangianCJC' but I've not been able to track down what.

My solver calls on these libraries:

Code:
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools \
-lfvOptions \
-lsampling \
-L$(FOAM_USER_LIBBIN) \
-llagrangianCJC \
-llagrangianIntermediateCJC \
-lregionModels \
-lsurfaceFilmModels
While I know that these libraries call on 'liblagrangian':

Code:
functionObjects/field
functionObjects/lagrangian
mesh/snappyHexMesh
lagrangian/spray
lagrangian/intermediate
lagrangian/coalCombustion
lagrangian/solidParticle
lagrangian/molecularDynamics/molecule
lagrangian/DSMC
lagrangian/turbulence
parallel/decompose/decompose
parallel/reconstruct/reconstruct
sampling/Make
So, from my (inexperienced) eyes, the only common libraries there are 'lagrangian/intermediate' and 'sampling'. I already have a custom 'intermediate' library, so I tried compiling my own 'sampling' library to no luck (in fact this introduced an error related to duplicate entries of the various sampling functions)

From there, I identified what libraries call on 'sampling' with the only one common between 'sampling' and 'lagrangian' being 'functionObjects/field' but again this did not resolve the issue, and as far as I can tell nothing calls that so I am at the end of my line of reasoning.

I can only assume I'm totally misunderstanding how the linking of libraries works, so if anyone could provide some insight I'd be immensely grateful!
__________________
Conor Crickmore
PhD Researcher in Automotive Aerodynamics
Aeronautical and Automotive Engineering
Loughborough University
LE11 3TU
cjc96 is offline   Reply With Quote

Old   August 24, 2020, 08:29
Default
  #2
Member
 
Conor Crickmore
Join Date: Jan 2020
Location: Leicestershire, United Kingdom
Posts: 36
Rep Power: 6
cjc96 is on a distinguished road
Hello again everyone!
I hope you're all still doing well and have returned to some level of normality at least!

Sorry to bump the post but I never did manage to route out the problem and thought I'd have another stab at it while I'm dealing with some HPC downtime, any advice would be deeply appreciated!
__________________
Conor Crickmore
PhD Researcher in Automotive Aerodynamics
Aeronautical and Automotive Engineering
Loughborough University
LE11 3TU
cjc96 is offline   Reply With Quote

Old   August 26, 2020, 10:10
Default
  #3
Member
 
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7
raumpolizei is on a distinguished road
Hey Conor,
difficult to say, is that the gdb output? Could be that your intermediate library still refers to the standard lagrangian basic library (and at the same time yours too). You could try:

>> gdb <yourAppName>
>> run
the application will run until it crashes
>> bt


you could also create a simple application and try to reproduce the error. Something like this:

Code:
int main(){
  // create all things needed to create a lagrangian cloud
  {
     // create lagrangian cloud object
     Info<< "leaving scope\n";
  }  // end of scope - cloud gets destructed  
Info<< "end\n";
return EXIT_SUCCESS;
}
raumpolizei is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 18:00
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 18:44
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
REAL GAS UDF brian FLUENT 6 September 11, 2006 08:23


All times are GMT -4. The time now is 00:04.