I am trying to read from a serial port (actually a USB port but using ftdi_sio).
I am using the boost library. My program reads the port every 10ms and everything seems to be fine but if I let it run for 20seconds to a minute or so, I get the following error :

boost::asio::io_service io_service;
// define an instance of the main class of this program
minicom_client c(io_service, boost::lexical_cast<unsigned int>(argv[1]), argv[2]);
// run the IO service as a separate thread, so the main thread can block on standard input
boost::thread t(boost::bind(&boost::asio::io_service::run, &io_service));
while (c.active()) // check the internal state of the connection to make sure it's still running
{
gettimeofday(&tv1, &tz);
cout << tv1.tv_sec << " s " << tv1.tv_usec << endl;
cout << c.lire() << endl;