I am having this issue for the last 7-8 months but now it has crossed all limits. The issue is like this:
I am coding in netbeans 8.x. Suddenly all project files will become read only and netbeans will start dsiplaying 5-6 messages like .config is read only( I dont remember the exact messages). Now the worst part will happen. My whole filesystem will become readonly. Now I must reboot. On rebooting I will be presented with initramfs: and asked to do fsck. I will do fsck and then ubuntu will start and everything will become normal. Then again someday this thing will happen.

Then finally one day after fsck ubuntu started showing message like READ FPDMA QUEUED, DRY error and ubuntu failed to start.

I installed a fresh ubuntu and then everything was working fine. Then I installed netbeans and then again the same thing happened. So here I was again doing fsck and then the same message READ FPDMA QUEUED. Finally installed ubuntu again and then posting this question.

I have searched a lot for the messages shown and suggestion was to check my hard disk health. First I used the disks utility in ubuntu. So overall assessment was Ok(48 sectors as bad). But then I did smart test. The test failed.

Then I used smartctl. Overall assessment OK.

Now I am confused if the problem is due to netbeans or my hard disk is failing. My laptop is around 5 years old and apart from running netbeans I have never encountered this problem.

[![enter image description here](https://i.stack.imgur.com/wG46A.png)](https://i.stack.imgur.com/wG46A.png)

[![enter image description here](https://i.stack.imgur.com/pKNq3.png)](https://i.stack.imgur.com/pKNq3.png)