ornladios / ADIOS

The old ADIOS 1.x code repository. Look for ADIOS2 for new repo
https://csmd.ornl.gov/adios
Other
54 stars 40 forks source link

crash when using FLEXPATH write method and adios_unsigned_byte array #146

Closed burlen closed 6 years ago

burlen commented 6 years ago

a case statement for adios_unsigned_byte is not implemented in the function set_format found in write/adios_flexpath.c

764     // construct an fm structure based off the group xml file
765     FlexpathFMStructure*
766     set_format(struct adios_group_struct *t,
767                struct adios_var_struct *fields,
768                FlexpathWriteFileData *fileData) 

This function prints an error and returns NULL but return value is not checked, which leads to crash.

1610        fileData->fm = set_format(t, fields, fileData);
#0  0x00007fffe5236efd in adios_flexpath_open (fd=0x555556cd99f0, method=0x555555b82050, comm=0x555556cdfbb0) at write/adios_flexpath.c:1637
#1  0x00007fffe51dd32c in common_adios_open (fd_p=0x7fffffffd2d8, group_name=0x7fffe52bf136 "sensei", name=0x555556a64760 "adios_staging.bp", file_mode=0x7fffe52bf18c "w", comm=0x7fffefbcab20 <ompi_mpi_comm_world>) at core/common_adios.c:233
#2  0x00007fffe51dbab7 in adios_open (fd=0x7fffffffd2d8, group_name=0x7fffe52bf136 "sensei", name=0x555556a64760 "adios_staging.bp", mode=0x7fffe52bf18c "w", comm=0x7fffefbcab20 <ompi_mpi_comm_world>) at core/adios.c:86
#3  0x00007fffe5161648 in sensei::ADIOSAnalysisAdaptor::WriteTimestep (this=0x555556a646f0, timeStep=0, time=0, dobj=0x555556ccf8a0) at /work/SENSEI/sensei/sensei/ADIOSAnalysisAdaptor.cxx:119

I'm using ADIOS 1.11.0, it does not look fixed in 1.12.0 either.

burlen commented 6 years ago

@mw70 I encountered this adios flexpath issue, will change our code from adios_unsigned_byte to adios_byte.

burlen commented 6 years ago

code to reproduce is here make issue_146

eisenhauer commented 6 years ago

This has been fixed in HEAD as of commit 8a80363f526a0b64af72f2432c0e99e3c3a4528b.