Open mwetter opened 4 years ago
@JayHuLBL if it is of any help, this is some output I have encountered while testing Buildings (that might be related):
(1110/1500) Buildings.ThermalZones.Detailed.Examples.FFD.Tutorial.MixedConvection ... FAIL (verify at 2.10%)
*** Error in `/usr/path_to_python_virtual_environment/bin/python': double free or corruption (out): 0x00007f94cc83cd60 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81329)[0x7f95112d7329]
/lib64/libc.so.6(fclose+0x177)[0x7f95112c4247]
/tmp/some_tmp_folder/binaries/linux64/libffd.so(ffd_log+0x186)[0x7f94594945ee]
/tmp/some_tmp_folder/binaries/linux64/libffd.so(assign_thermal_bc+0x753)[0x7f945947a706]
/tmp/some_tmp_folder/binaries/linux64/libffd.so(read_cosim_data+0x17b)[0x7f9459478d21]
/tmp/some_tmp_folder/binaries/linux64/libffd.so(FFD_solver+0x2b4)[0x7f945948fa2a]
/tmp/some_tmp_folder/binaries/linux64/libffd.so(ffd+0x1d3)[0x7f9459483a14]
/tmp/some_tmp_folder/binaries/linux64/libffd.so(ffd_cosimulation+0x32)[0x7f9459483821]
/tmp/some_tmp_folder/binaries/linux64/libffd.so(ffd_thread+0xe5)[0x7f945948412b]
/lib64/libpthread.so.0(+0x7ea5)[0x7f9511d34ea5]
/lib64/libc.so.6(clone+0x6d)[0x7f9511354b0d]
======= Memory map: ========
00400000-00724000 r-xp 00000000 fd:00 114539813 /usr/bin/python3
00924000-00929000 r--p 00324000 fd:00 114539813 /usr/bin/python3
00929000-00962000 rw-p 00329000 fd:00 114539813 /usr/bin/python3
00962000-00984000 rw-p 00000000 00:00 0
0124d000-04a83000 rw-p 00000000 00:00 0 [heap]
<hundreds of lines>
...
(1117/1500) Buildings.ThermalZones.Detailed.Examples.FFD.WindowWithoutShade ... FAIL (simulation: unexpectedly terminated)
@modelonrobinandersson Thank you very much for sharing the message. It is very helpful. From the message, it seems that the error is caused by the fclose()
in the function ffd_log()
, in the file Buildings/Resources/src/FastFluidDynamics/utility.c
.
However, to test, I made the ffd_log()
to do nothing but just return 0
, the error is still there. This indicates that there may be invalid pointer elsewhere in the program, as suggested here.
A crash in fclose like this indicates that the FILE data structure involved has been corrupted, probably by an invalid pointer use elsewhere in the program.
Would you please let me know how you do the test so can see the information shared here? It may trace the error to somewhere else.
@JayHuLBL I compiled the FFD model using OCT (Optimica Compiler Toolkit) on CentOS 7.4.1708, using Python 3.9.5 and GCC gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44). No specific compiler options to OCT.
The models
Buildings.ThermalZones.Detailed.Examples.FFD.ForcedConvection
andBuildings.ThermalZones.Detailed.Examples.FFD.Tutorial.MixedConvection
fail with OPTIMICA, OCT-stable-r19089_JM-r14295. See below for the output. It looks like freeing memory fails.
I will put it on the exclude list until this is fixed.
and