Raspberry Pi Communication with Arduino Crashing

For my project, I am communicating a Raspberry Pi with an Arduino using a serial connection. On the Raspberry Pi side I am deploying a MATLAB simulink model on it.

Raspberry PI ->sends string to Arduino
Arduino => receieves the string =>sends a different string back
Pi => receives that string and parses it

The code that Arduino uses to send data is
Serial.print("variable length string");

The code to read in data on the Pi is:
int size_of_buffer = 100;
fdread = read(fd, read_data, size_of_buffer );

Then I am parsing some data from what I read. I am not sure the size of the data the Arduino sends. Is there anything wrong with the reading and writing? The problem is that the program crashes on the Raspberry Pi side.

I am not sure the size of the data the Arduino sends.

Why not? Can't you count?

The code to read in data on the Pi is:
int size_of_buffer = 100;
fdread = read(fd, read_data, size_of_buffer );

Well, that's useless unless read_data is 100 elements or more in size.

Is there anything wrong with the reading and writing?

If something is crashing, it seems reasonable to assume that something is wrong.

The problem is that the program crashes on the Raspberry Pi side.

No. The problem is that you didn't post any code, expecting us to use our crystal balls to determine what is wrong. Sorry, mine are brass.

Try looking at the Arduino output in the Serial Monitor.

...R