LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Difference between 4.9 and 4.19 Kernel versions causing fread crash (https://www.linuxquestions.org/questions/linux-kernel-70/difference-between-4-9-and-4-19-kernel-versions-causing-fread-crash-4175685727/)

pshub 11-24-2020 03:34 AM

Difference between 4.9 and 4.19 Kernel versions causing fread crash
 
Hello,

i have a linux system where recently the kernel version was upgraded from 4.9 to 4.19. This resulted in a different behaviour while reading a file which was locked.

E.g.:
On Kernel Version 4.9, on reading a locked file, i get the error:
ERROR: cannot read `file' (Input/output error)

On kernel Version 4.19, on reading a locked file, i get the error:/
Segmentation fault.


Can someone tell me or point me to the changelog that resulted in this change or behaviour? Also, can you guide me on how i can get the same behaviour i used to get on version 4.9?

Any help would be useful.
Thank you.

berndbausch 11-24-2020 09:30 PM

When fread causes a segmentation fault, I would suspect incompatible code, such as a mismatch of shared library versions. Since the segmentation fault when accessing a locked file is definitely not an intended feature, I have strong doubts that you will find anything in the release notes about this.

Another possibility is that the program in question doesn't use fread correctly. Perhaps the earlier kernel was more lenient and accepted incorrect usage, whereas the new kernel doesn't. In my opinion, this is less likely.

Note that fread is not a system call, although it may use the read system call. Does the same problem occur with read?


All times are GMT -5. The time now is 01:26 PM.