0

I have a problem using screen command on Ubuntu 16.04. I am working on a C++ project, and using servers with Ubuntu to simulate my code. Segmentation faults started to appear after updating from Ubuntu 14.04 to 16.04. When trying to simulate the same code on different servers with Ubuntu 14 and 16.04, a segmentation fault appears on the server with Ubuntu 16.04 after a certain time (usually 12 hours of simulation) knowing that no problems show up at Ubuntu 14.04. In addition, the same simulation can be conducted on Ubuntu 16.04 without any problem if the simulation command is directly operated on the shell terminal without using the screen command. I am wondering if there is any timeout option for the screen command in Ubuntu 16.04 that stops my simulations.

  • This would imply that your program can somehow detect the operating system version or it's mother process and in this case access an illegal memory address. This seems unlikely to me for simulation software. Are you sure this is not just coincidence? Have a look at the sigvcatch library to turn the crash into an exception you can debug. – Philippos Sep 25 '17 at 11:49
  • Thank you for your comment. I dont think there is any coincidence since I am simulating the same code on the same input data without any problem using other OS (Ubuntu 14, and also Ubuntu 16.04 without the screen command). I will try to use the sigcatch library, thank you. – R.Kl Sep 25 '17 at 12:05
0

We found a solution, I post if it can help someone with the same kind of problem.

The problem was kerberos ticket expiration within the screen or tmux session. The kerberos ticket was use to mount nfsv4 folder where some file were written by the program, so after 12hrs the ticket expired and the program tried to write in unreachable file and get a segfault. nfsv4 was used for our server on ubuntu 16.04, nfsv3 on ubuntu 14.04...

The solution, in the screen/tmux session, lauch the program with the following command : krenew -K 60 ./a.out

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.