Nп/п : 9 из 100
 От   : David W. Hodgins                    2:5075/128        14 сен 23 14:53:21
 К    : The Natural Philosopher                               14 сен 23 21:55:01
 Тема : Re: Weird code crash
----------------------------------------------------------------------------------
                                                                                 
@MSGID: <op.2a9yq7lva3w0dxdave@hodgins.homeip.net>
c4acde0d
@REPLY: 2@dont-email.me> ecaa0562
@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.2a9yq7lva3w0dxdave@hodgins.homeip.net>
@RFC-References: 1@dont-email.me>
<ygamsxoixhx.fsf@akutech.de> 4@dont-email.me> <op.2a9vj3yca3w0dxdave@hodgins.homeip.net>
2@dont-email.me>
@TZUTC: -0400
@PID: Opera Mail/12.16 (Linux)
@TID: FIDOGATE-5.12-ge4e8b94
 On Thu, 14 Sep 2023 14:42:27 -0400, The Natural Philosopher
<tnp@invalid.invalid> wrote:

> On 14/09/2023 18:44, David W. Hodgins wrote:
>> 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
>
> I assumed that the thing would have done its own fsck on every boot
> anyway...isnt that a debian default?
>
> (The sixth fields are 2 and 1 respectively for the file systems)
>
>
> PARTUUID=b8c9fbb7-01  /boot           vfat    defaults          0       2
> PARTUUID=b8c9fbb7-02  /               ext4    defaults,noatime  0       1

Does it use systemd? If so, confirm it was clean with
"journalctl -b --no-h|grep fsck"

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    
                                                                                
В этой области больше нет сообщений.

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