Nп/п : 6 из 100
 От   : David W. Hodgins                    2:5075/128        14 сен 23 13:44:17
 К    : The Natural Philosopher                               14 сен 23 20:47:02
 Тема : Re: Weird code crash
----------------------------------------------------------------------------------
                                                                                 
@MSGID: <op.2a9vj3yca3w0dxdave@hodgins.homeip.net>
411c31ed
@REPLY: 4@dont-email.me> 334c88f5
@REPLYADDR David W. Hodgins
<dwhodgins@nomail.afraid.org>
@REPLYTO 2:5075/128 David W. Hodgins
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID:
<op.2a9vj3yca3w0dxdave@hodgins.homeip.net>
@RFC-References: 1@dont-email.me>
<ygamsxoixhx.fsf@akutech.de> 4@dont-email.me>
@TZUTC: -0400
@PID: Opera Mail/12.16 (Linux)
@TID: FIDOGATE-5.12-ge4e8b94
 On Thu, 14 Sep 2023 11:35:30 -0400, The Natural Philosopher
<tnp@invalid.invalid> wrote:

> On 14/09/2023 16:29, Ralf Fassel wrote:
>> * The Natural Philosopher <tnp@invalid.invalid>
>> | One possibility is that it is opening and reading a file at the
>> | precise time another process is writing it...in both cases the read
>> | and write
>> | operations are atomic and done with C code.
>>>
>> | READ
>> | ====
>> | fp=fopen(fullname, "r");
>> | len=fread(filbuf,1,255,fp); // read entire file
>>
>> Check for fp != NULL is missing here in this example code before
>> fread().  If this also in the production version, it might be a problem
>> if the file is not accessible for any reason.
>>
>> R`
> Ralf, I already put that in this morning, re compiled the code and after
> an hour, it crashed again.
>
> The filename is built by scanning a directory so the filename must exist.
>
> The code runs as root, so there are no perms issues
>
> I`ve put in checks to avoid trying to read empty files
>
> I am leaning towards possibly a cracked solder joint or board.

Have you run fsck on the file system since the power loss? Make sure the fstab
entry does not have a zero in the sixth field for the file system(s) in use.
If using systemd, run dracut -f after any fstab changes. Then reboot.

Regards, Dave Hodgins
--- Opera Mail/12.16 (Linux)
 * Origin: A noiseless patient Spider (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх