RPi3: ERROR [gps] ERR: -1 (tcsetattr)

I am using px4 build for Raspberry Pi 3 with custom sensors. The px4 starting is fine but after some time I get this error…
ERROR [gps] ERR: -1 (tcsetattr)
What is this error and its cause? The GPS is locks well and has a 3D fix. The GPS module is ublox LEA-6H with ubx output and connected to USB port of RPi.