Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"In short, _N is Richardian if, and only if, _N is not Richardian."


computers / comp.sys.raspberry-pi / Re: Weird code crash

SubjectAuthor
* Weird code crashThe Natural Philosopher
+* Re: Weird code crashAhem A Rivet's Shot
|`* Re: Weird code crashThe Natural Philosopher
| `* Re: Weird code crashAhem A Rivet's Shot
|  `- Re: Weird code crashThe Natural Philosopher
+* Re: Weird code crashTheo
|+* Re: Weird code crashRichard Kettlewell
||`* Re: Weird code crashThe Natural Philosopher
|| +* Re: Weird code crashTheo
|| |`- Re: Weird code crashThe Natural Philosopher
|| `* Re: Weird code crashRichard Kettlewell
||  `* Re: Weird code crashThe Natural Philosopher
||   +- Re: Weird code crashRichard Kettlewell
||   +* Re: Weird code crashTheo
||   |+* Re: Weird code crashRichard Kettlewell
||   ||`- Re: Weird code crashThe Natural Philosopher
||   |+- Re: Weird code crashPancho
||   |`- Re: Weird code crashThe Natural Philosopher
||   `* Re: Weird code crashPancho
||    `- Re: Weird code crashMartin Gregorie
|`- Re: Weird code crashcandycanearter07
+- Re: Weird code crashRichard Kettlewell
+- Re: Weird code crashTauno Voipio
+* Re: Weird code crashRalf Fassel
|+* Re: Weird code crashThe Natural Philosopher
||+* Re: Weird code crashDavid W. Hodgins
|||+* Re: Weird code crashThe Natural Philosopher
||||+* Re: Weird code crashDavid W. Hodgins
|||||`* Re: Weird code crashThe Natural Philosopher
||||| `* Re: Weird code crashDavid W. Hodgins
|||||  `- Re: Weird code crashThe Natural Philosopher
||||`* Re: Weird code crashcandycanearter07
|||| `* Re: Weird code crashThe Natural Philosopher
||||  `- Re: Weird code crashcandycanearter07
|||`- Re: Weird code crashRichard Kettlewell
||+* Re: Weird code crashRobert Riches
|||`- Re: Weird code crashThe Natural Philosopher
||`* Re: Weird code crashRalf Fassel
|| `* Re: Weird code crashThe Natural Philosopher
||  +* Re: Weird code crashRichard Kettlewell
||  |`- Re: Weird code crashThe Natural Philosopher
||  `* Re: Weird code crashRalf Fassel
||   `* Re: Weird code crashThe Natural Philosopher
||    +* Re: Weird code crashTheo
||    |+* Re: Weird code crashThe Natural Philosopher
||    ||`* Re: Weird code crashvallor
||    || `* Re: Weird code crashThe Natural Philosopher
||    ||  +* Re: Weird code crashRalf Fassel
||    ||  |`- Re: Weird code crashvallor
||    ||  `- Re: Weird code crashvallor
||    |+* Re: Weird code crashThe Natural Philosopher
||    ||`* Re: Weird code crashRich
||    || `- Re: Weird code crashCharlie Gibbs
||    |`* Re: Weird code crashcandycanearter07
||    | +- Re: Weird code crashRich
||    | +- Re: Weird code crashThe Natural Philosopher
||    | `* Re: Weird code crashRichard Kettlewell
||    |  `- Re: Weird code crashThe Natural Philosopher
||    +- Re: Weird code crashRalf Fassel
||    `* Re: Weird code crashRalf Fassel
||     `* Re: Weird code crashThe Natural Philosopher
||      +* Re: Weird code crashRich
||      |+* Re: Weird code crashThe Natural Philosopher
||      ||`- Re: Weird code crashRich
||      |`- Re: Weird code crashCharlie Gibbs
||      `- Re: Weird code crashRalf Fassel
|`- Re: Weird code crashcandycanearter07
`* Re: Weird code crashnev young
 `* Re: Weird code crashThe Natural Philosopher
  `* Re: Weird code crashTheo
   `- Re: Weird code crashThe Natural Philosopher

Pages:123
Weird code crash

<udu5c4$2gutd$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7142&group=comp.sys.raspberry-pi#7142

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Weird code crash
Date: Thu, 14 Sep 2023 06:23:15 +0100
Organization: A little, after lunch
Lines: 65
Message-ID: <udu5c4$2gutd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 14 Sep 2023 05:23:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="48cceb4bb543b24a506921b0f00095ab";
logging-data="2653101"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XjoAbi9Y8WnSfT/3f9DoioZnTam4daVo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:kv2stZC9vmT+CV6rLFYopToOkDU=
Content-Language: en-GB
 by: The Natural Philosop - Thu, 14 Sep 2023 05:23 UTC

I don't expect people to know the answer, but I could use some help in
puzzling out where to look.

I had a power cut that did leave my network a bit sketchy and it took
two reboots on this desktop to get back to normal. This may or may not
be relevant.

But my question refers to my Pi Zero W server I am developing.

It came up, ok, but then after a while my relay daemon crashed...

Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Main
process exit
ed, code=killed, status=6/ABRT
Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Failed
with resul
t 'signal'.
Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Consumed
15.074s
CPU time.

I rebooted it, and after awhile - about ten minutes, it happened again -
that is the above trace.

I restarted it manually, and it hasn't crashed since.

The web is flooded with instances of this messaqe all on different
platforms and applications, and it would appear this is a very generic
message possibly to do with memory issues.

One person 'fixed' it by changing CPUs...
Now *as far as I know* there was nothing special about the data the
daemon would be operating on it this point to cause it to crash. I am
fairly sure I have no memory leaks in it - in normal operation it
strdups() and frees() and opens and closes files... and 'top' shows
memory usage is rock steady.

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

WRITE
=====
fp=fopen(filename, "w");
if (fp)
{
fprintf(fp,"%s%s\n",filedata,timestamp);
fclose(fp);
}

Could this cause a problem?

I tend to suspect some sort of asynchronous timing issue because it is
such a rare occurrence. I have been utterly unable to make it happen on
demand...

--
A lie can travel halfway around the world while the truth is putting on
its shoes.

Re: Weird code crash

<20230914070915.1bc7e3baf4ebac163267355c@eircom.net>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7143&group=comp.sys.raspberry-pi#7143

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ste...@eircom.net (Ahem A Rivet's Shot)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 07:09:15 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <20230914070915.1bc7e3baf4ebac163267355c@eircom.net>
References: <udu5c4$2gutd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="1e4a94a24f45f8481330da1848564188";
logging-data="2668279"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19K7Yyd5FjIW1LdLwz4RYtrL5Tdgh8FNfc="
Cancel-Lock: sha1:b05kIYFsSbIEpZ+kcREUUAeO9r4=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.1)
X-Clacks-Overhead: "GNU Terry Pratchett"
 by: Ahem A Rivet's - Thu, 14 Sep 2023 06:09 UTC

On Thu, 14 Sep 2023 06:23:15 +0100
The Natural Philosopher <tnp@invalid.invalid> wrote:

> 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");

Anything opened with fopen is a buffered stream operations on it
are not atomic so yes it is very possible for the read to see a partially
written file. To avoid the race you need to use some kind of locking.

--
Steve O'Hara-Smith
Odds and Ends at http://www.sohara.org/
Host: Beautiful Theory meet Inconvenient Fact
Obit: Beautiful Theory died today of factual inconsistency

Re: Weird code crash

<uduat9$2hjig$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7144&group=comp.sys.raspberry-pi#7144

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 07:57:45 +0100
Organization: A little, after lunch
Lines: 31
Message-ID: <uduat9$2hjig$1@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me>
<20230914070915.1bc7e3baf4ebac163267355c@eircom.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 14 Sep 2023 06:57:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="48cceb4bb543b24a506921b0f00095ab";
logging-data="2674256"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184csyN+Mko+IrcuqEKVaRTgFIvHzDllTM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:IpXRKnxpnUUbrKw0XHuQQ4VHpSA=
In-Reply-To: <20230914070915.1bc7e3baf4ebac163267355c@eircom.net>
Content-Language: en-GB
 by: The Natural Philosop - Thu, 14 Sep 2023 06:57 UTC

On 14/09/2023 07:09, Ahem A Rivet's Shot wrote:
> On Thu, 14 Sep 2023 06:23:15 +0100
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>
>> 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");
>
> Anything opened with fopen is a buffered stream operations on it
> are not atomic so yes it is very possible for the read to see a partially
> written file. To avoid the race you need to use some kind of locking.
>
Hmm.

Howver I think that for small operations one would have to posit a time
between fopen() and fread() in which the file 'disappears' in some
sense. Burt I 8thought* that a file handle once issued would not point
to empty data, and that in fact fopen('w") would in fact create a new
file and the old would not get unlinked until it was 'fclosed'
--
"Corbyn talks about equality, justice, opportunity, health care, peace,
community, compassion, investment, security, housing...."
"What kind of person is not interested in those things?"

"Jeremy Corbyn?"

Re: Weird code crash

<VGs*53kqz@news.chiark.greenend.org.uk>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7145&group=comp.sys.raspberry-pi#7145

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsfeed.xs3.de!callisto.xs3.de!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: theom+n...@chiark.greenend.org.uk (Theo)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: 14 Sep 2023 08:36:07 +0100 (BST)
Organization: University of Cambridge, England
Message-ID: <VGs*53kqz@news.chiark.greenend.org.uk>
References: <udu5c4$2gutd$1@dont-email.me>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229";
logging-data="10121"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Thu, 14 Sep 2023 07:36 UTC

In comp.sys.raspberry-pi The Natural Philosopher <tnp@invalid.invalid> wrote:
> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Main
> process exit
> ed, code=killed, status=6/ABRT
> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Failed
> with resul
> t 'signal'.
> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Consumed
> 15.074s
> CPU time.
>
> I rebooted it, and after awhile - about ten minutes, it happened again -
> that is the above trace.
>
> I restarted it manually, and it hasn't crashed since.
>
> The web is flooded with instances of this messaqe all on different
> platforms and applications, and it would appear this is a very generic
> message possibly to do with memory issues.

You're getting SIGABRT which is typically something bailing due to memory
corruption, eg corrupting metadata so that malloc can't work, or a
double-free.

I would compile it with debugging enabled: '-g' or '-ggdb' flag to your
compiler. Then run it under gdb:

$ gdb ./myprog
(gdb) run

and see if it dies. If it does you can get a backtrace to indicate where
the fault occurred:

(gdb) bt

It may be that starting it under systemd is different in some way that it
doesn't show up when running it by hand. You could try setting as your
systemd command:

gdb -ex run -ex bt --args /usr/local/bin/myprog arg1 arg2

which will run it and then dump a backtrace when it's finished. You may get
'no stack' if it succeeded and didn't record one.

Theo

Re: Weird code crash

<wwvo7i5urig.fsf@LkoBDZeT.terraraq.uk>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7146&group=comp.sys.raspberry-pi#7146

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: inva...@invalid.invalid (Richard Kettlewell)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 08:45:59 +0100
Organization: terraraq NNTP server
Message-ID: <wwvo7i5urig.fsf@LkoBDZeT.terraraq.uk>
References: <udu5c4$2gutd$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="71903"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:TnIuKt6z8YcICpNqmgbyqJiBUOc=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Thu, 14 Sep 2023 07:45 UTC

The Natural Philosopher <tnp@invalid.invalid> writes:
> READ
> ====
> fp=fopen(fullname, "r");
> len=fread(filbuf,1,255,fp); // read entire file

There’s no error checking on the call to fopen, so fp could be a null
pointer when you call fread. So crashes are to be expected, although in
this code fragment a SIGSEGV would be expected rather than SIGABRT.

> WRITE
> =====
> fp=fopen(filename, "w");
> if (fp)
> {
> fprintf(fp,"%s%s\n",filedata,timestamp);
> fclose(fp);
> }
>
> Could this cause a problem?
>
> I tend to suspect some sort of asynchronous timing issue because it is
> such a rare occurrence. I have been utterly unable to make it happen
> on demand...

Investigate properly first (see Theo’s post), guess about the cause
later.

--
https://www.greenend.org.uk/rjk/

Re: Weird code crash

<udue9m$2i19r$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7147&group=comp.sys.raspberry-pi#7147

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tauno.vo...@notused.fi.invalid (Tauno Voipio)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 10:55:34 +0300
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <udue9m$2i19r$1@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 14 Sep 2023 07:55:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="13e0ecad3cea277ecfe9b1ace36dd0f0";
logging-data="2688315"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tWqZq7C2RWGZnKghmwj/m+5b9VDedqh4="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.15.1
Cancel-Lock: sha1:iNXReMIJIWplOOs1MInGpi7VYyw=
In-Reply-To: <udu5c4$2gutd$1@dont-email.me>
Content-Language: en-US
 by: Tauno Voipio - Thu, 14 Sep 2023 07:55 UTC

The first try should be to check if the system runs fine from a
backup memory card (you have it?).

It is fairly possible that the memory card has some flipped bits,
and the effects are hard to predict.

--

-TV

On 14.9.2023 8.23, The Natural Philosopher wrote:
> I don't expect people to know the answer, but I could use some help in
> puzzling out where to look.
>
> I had a power cut that did leave my network a bit sketchy and it took
> two reboots on this desktop to get back to normal.  This may or may not
> be relevant.
>
> But my question refers to my Pi  Zero W server I am developing.
>
> It came up, ok, but then after a while my relay daemon crashed...
>
> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Main
> process exit
> ed, code=killed, status=6/ABRT
> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Failed
> with resul
> t 'signal'.
> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Consumed
> 15.074s
> CPU time.
>
> I rebooted it, and after awhile - about ten minutes, it happened again -
> that is the above trace.
>
> I restarted it manually, and it hasn't crashed since.
>
> The web is flooded with instances of this messaqe all on different
> platforms and applications, and it would appear this is a very generic
> message possibly to do with memory issues.
>
> One person 'fixed' it by changing CPUs...
> Now *as far as I know* there was nothing special about the data the
> daemon would be operating on it this point to cause it to crash. I am
> fairly sure I have no memory leaks in it - in normal operation it
> strdups() and frees()  and opens and closes files... and 'top' shows
> memory usage is rock steady.
>
> 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
>
> WRITE
> =====
> fp=fopen(filename, "w");
> if (fp)
>     {
>     fprintf(fp,"%s%s\n",filedata,timestamp);
>     fclose(fp);
>     }
>
> Could this cause a problem?
>
> I tend to suspect some sort of asynchronous timing issue because it is
> such a rare occurrence. I have been utterly unable to make it happen on
> demand...
>
>

Re: Weird code crash

<20230914085237.f2f9bbf05288451fb73e1955@eircom.net>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7148&group=comp.sys.raspberry-pi#7148

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ste...@eircom.net (Ahem A Rivet's Shot)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 08:52:37 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <20230914085237.f2f9bbf05288451fb73e1955@eircom.net>
References: <udu5c4$2gutd$1@dont-email.me>
<20230914070915.1bc7e3baf4ebac163267355c@eircom.net>
<uduat9$2hjig$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="1e4a94a24f45f8481330da1848564188";
logging-data="2691353"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181OEZv6mQLzcvZ4Nwm9IIibPnTTWDI4K8="
Cancel-Lock: sha1:OTdJxM9pfMrQG6BlePJigsi8kgE=
X-Clacks-Overhead: "GNU Terry Pratchett"
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.1)
 by: Ahem A Rivet's - Thu, 14 Sep 2023 07:52 UTC

On Thu, 14 Sep 2023 07:57:45 +0100
The Natural Philosopher <tnp@invalid.invalid> wrote:

> Howver I think that for small operations one would have to posit a time
> between fopen() and fread() in which the file 'disappears' in some
> sense. Burt I 8thought* that a file handle once issued would not point
> to empty data, and that in fact fopen('w") would in fact create a new
> file and the old would not get unlinked until it was 'fclosed'

Nope - from man fopen

“w” Open for writing. The stream is positioned at the beginning of
the file. Truncate the file to zero length if it exists or
create the file if it does not exist.

--
Steve O'Hara-Smith
Odds and Ends at http://www.sohara.org/
Host: Beautiful Theory meet Inconvenient Fact
Obit: Beautiful Theory died today of factual inconsistency

Re: Weird code crash

<wwv8r99b1ui.fsf@LkoBDZeT.terraraq.uk>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7149&group=comp.sys.raspberry-pi#7149

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: inva...@invalid.invalid (Richard Kettlewell)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 09:23:01 +0100
Organization: terraraq NNTP server
Message-ID: <wwv8r99b1ui.fsf@LkoBDZeT.terraraq.uk>
References: <udu5c4$2gutd$1@dont-email.me>
<VGs*53kqz@news.chiark.greenend.org.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="72477"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:mOnC6mbA9zk4vhGKsfxWiDRIXZ4=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Thu, 14 Sep 2023 08:23 UTC

Theo <theom+news@chiark.greenend.org.uk> writes:
> In comp.sys.raspberry-pi The Natural Philosopher <tnp@invalid.invalid> wrote:
>> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Main
>> process exit
>> ed, code=killed, status=6/ABRT
>> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Failed
>> with resul
>> t 'signal'.
>> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Consumed
>> 15.074s
>> CPU time.
>>
>> I rebooted it, and after awhile - about ten minutes, it happened again -
>> that is the above trace.
>>
>> I restarted it manually, and it hasn't crashed since.
>>
>> The web is flooded with instances of this messaqe all on different
>> platforms and applications, and it would appear this is a very generic
>> message possibly to do with memory issues.
>
> You're getting SIGABRT which is typically something bailing due to memory
> corruption, eg corrupting metadata so that malloc can't work, or a
> double-free.
>
> I would compile it with debugging enabled: '-g' or '-ggdb' flag to your
> compiler. Then run it under gdb:
>
> $ gdb ./myprog
> (gdb) run
>
> and see if it dies. If it does you can get a backtrace to indicate where
> the fault occurred:
>
> (gdb) bt
>
> It may be that starting it under systemd is different in some way that it
> doesn't show up when running it by hand. You could try setting as your
> systemd command:
>
> gdb -ex run -ex bt --args /usr/local/bin/myprog arg1 arg2
>
> which will run it and then dump a backtrace when it's finished. You may get
> 'no stack' if it succeeded and didn't record one.

Also:

* I would also have a look at the kernel log; if it’s a kernel-generated
signal then there’s usually a log message about it.

* Run the application under valgrind; depending what the issue is, that
will provide a backtrace and perhaps more detailed information. If it
is a memory corruption issue then it may identify where the corruption
happens, rather than the later point where malloc failed a consistency
check (or whatever it is).

Using valgrind (and/or compiler sanitizer features) is a good idea even
before running into trouble, really.

--
https://www.greenend.org.uk/rjk/

Re: Weird code crash

<uduqnp$2jqho$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7150&group=comp.sys.raspberry-pi#7150

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 12:27:53 +0100
Organization: A little, after lunch
Lines: 28
Message-ID: <uduqnp$2jqho$1@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me>
<20230914070915.1bc7e3baf4ebac163267355c@eircom.net>
<uduat9$2hjig$1@dont-email.me>
<20230914085237.f2f9bbf05288451fb73e1955@eircom.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 14 Sep 2023 11:27:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="48cceb4bb543b24a506921b0f00095ab";
logging-data="2746936"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193mjFEbcvycry0dm8pUf52bcQdLGOmQ7c="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:+MHLKa7NSFFv6+rJYznJY9P1oVg=
In-Reply-To: <20230914085237.f2f9bbf05288451fb73e1955@eircom.net>
Content-Language: en-GB
 by: The Natural Philosop - Thu, 14 Sep 2023 11:27 UTC

On 14/09/2023 08:52, Ahem A Rivet's Shot wrote:
> On Thu, 14 Sep 2023 07:57:45 +0100
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>
>> Howver I think that for small operations one would have to posit a time
>> between fopen() and fread() in which the file 'disappears' in some
>> sense. Burt I 8thought* that a file handle once issued would not point
>> to empty data, and that in fact fopen('w") would in fact create a new
>> file and the old would not get unlinked until it was 'fclosed'
>
> Nope - from man fopen
>
> “w” Open for writing. The stream is positioned at the beginning of
> the file. Truncate the file to zero length if it exists or
> create the file if it does not exist.
>

Ok, so there is a finite choice that an empty (zero length) file might
be read.
That is worth checking .

--
"A point of view can be a dangerous luxury when substituted for insight
and understanding".

Marshall McLuhan

Re: Weird code crash

<udusa0$2k1q0$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7151&group=comp.sys.raspberry-pi#7151

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 12:54:39 +0100
Organization: A little, after lunch
Lines: 70
Message-ID: <udusa0$2k1q0$1@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me>
<VGs*53kqz@news.chiark.greenend.org.uk>
<wwv8r99b1ui.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 14 Sep 2023 11:54:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="48cceb4bb543b24a506921b0f00095ab";
logging-data="2754368"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184ks6AWjKkCuOwz6RxAAlo/9HVD0JeBvw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:owWZbPESVdI5hLPyyJCZzWuSkYI=
Content-Language: en-GB
In-Reply-To: <wwv8r99b1ui.fsf@LkoBDZeT.terraraq.uk>
 by: The Natural Philosop - Thu, 14 Sep 2023 11:54 UTC

On 14/09/2023 09:23, Richard Kettlewell wrote:
> Theo <theom+news@chiark.greenend.org.uk> writes:
>> In comp.sys.raspberry-pi The Natural Philosopher <tnp@invalid.invalid> wrote:
>>> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Main
>>> process exit
>>> ed, code=killed, status=6/ABRT
>>> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Failed
>>> with resul
>>> t 'signal'.
>>> Sep 13 11:26:36 heating-controller systemd[1]: relayd.service: Consumed
>>> 15.074s
>>> CPU time.
>>>
>>> I rebooted it, and after awhile - about ten minutes, it happened again -
>>> that is the above trace.
>>>
>>> I restarted it manually, and it hasn't crashed since.
>>>
>>> The web is flooded with instances of this messaqe all on different
>>> platforms and applications, and it would appear this is a very generic
>>> message possibly to do with memory issues.
>>
>> You're getting SIGABRT which is typically something bailing due to memory
>> corruption, eg corrupting metadata so that malloc can't work, or a
>> double-free.
>>
>> I would compile it with debugging enabled: '-g' or '-ggdb' flag to your
>> compiler. Then run it under gdb:
>>
>> $ gdb ./myprog
>> (gdb) run
>>
>> and see if it dies. If it does you can get a backtrace to indicate where
>> the fault occurred:
>>
>> (gdb) bt
>>
>> It may be that starting it under systemd is different in some way that it
>> doesn't show up when running it by hand. You could try setting as your
>> systemd command:
>>
>> gdb -ex run -ex bt --args /usr/local/bin/myprog arg1 arg2
>>
>> which will run it and then dump a backtrace when it's finished. You may get
>> 'no stack' if it succeeded and didn't record one.
>
> Also:
>
> * I would also have a look at the kernel log; if it’s a kernel-generated
> signal then there’s usually a log message about it.
>
Nothing in kern.log after the boot process finishes.

> * Run the application under valgrind; depending what the issue is, that
> will provide a backtrace and perhaps more detailed information. If it
> is a memory corruption issue then it may identify where the corruption
> happens, rather than the later point where malloc failed a consistency
> check (or whatever it is).
>
> Using valgrind (and/or compiler sanitizer features) is a good idea even
> before running into trouble, really.
>
The strange thing is that it failed once after a minute, then I rebooted
and it failed after 20 minutes, and its been running several days now
with no issues at all.

I am not sure valgrind would actually help unless it failed.
--
No Apple devices were knowingly used in the preparation of this post.

Re: Weird code crash

<uduvd3$2k5m0$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7152&group=comp.sys.raspberry-pi#7152

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: no...@thanks.net (candycanearter07)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 07:47:31 -0500
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <uduvd3$2k5m0$1@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me>
<VGs*53kqz@news.chiark.greenend.org.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 14 Sep 2023 12:47:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d6ea6d667e1e3b31c2941bb0bebeaf98";
logging-data="2758336"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19PzdJvuA06kOC2ac6Wi6x0mfkfcfc2tcRkGkabQUytlA=="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:O1gYszCGYIjItFDjGquiPj034i0=
In-Reply-To: <VGs*53kqz@news.chiark.greenend.org.uk>
Content-Language: en-US
 by: candycanearter07 - Thu, 14 Sep 2023 12:47 UTC

On 9/14/23 02:36, Theo wrote:
> You're getting SIGABRT which is typically something bailing due to memory
> corruption, eg corrupting metadata so that malloc can't work, or a
> double-free.
>
> I would compile it with debugging enabled: '-g' or '-ggdb' flag to your
> compiler. Then run it under gdb:
>
> $ gdb ./myprog
> (gdb) run
>
> and see if it dies. If it does you can get a backtrace to indicate where
> the fault occurred:
>
> (gdb) bt

If you have coredumps enabled, you could also do coredumpctl debug to
enter a gdb session of the last coredump that happened.

--
--
user <candycane> is generated from /dev/urandom

Re: Weird code crash

<SGs*Zrmqz@news.chiark.greenend.org.uk>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7153&group=comp.sys.raspberry-pi#7153

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: theom+n...@chiark.greenend.org.uk (Theo)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: 14 Sep 2023 14:59:40 +0100 (BST)
Organization: University of Cambridge, England
Message-ID: <SGs*Zrmqz@news.chiark.greenend.org.uk>
References: <udu5c4$2gutd$1@dont-email.me> <VGs*53kqz@news.chiark.greenend.org.uk> <wwv8r99b1ui.fsf@LkoBDZeT.terraraq.uk> <udusa0$2k1q0$1@dont-email.me>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229";
logging-data="1031"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Thu, 14 Sep 2023 13:59 UTC

In comp.sys.raspberry-pi The Natural Philosopher <tnp@invalid.invalid> wrote:
> The strange thing is that it failed once after a minute, then I rebooted
> and it failed after 20 minutes, and its been running several days now
> with no issues at all.
>
> I am not sure valgrind would actually help unless it failed.

valgrind will tell you if it spots memory corruption, even if the corruption
is not yet enough to cause it to crash. It may help in making the problem
clearer and deterministic where the corruption makes it unpredictable.

Theo

Re: Weird code crash

<udv8kr$2lppb$3@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7154&group=comp.sys.raspberry-pi#7154

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 16:25:15 +0100
Organization: A little, after lunch
Lines: 33
Message-ID: <udv8kr$2lppb$3@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me>
<VGs*53kqz@news.chiark.greenend.org.uk>
<wwv8r99b1ui.fsf@LkoBDZeT.terraraq.uk> <udusa0$2k1q0$1@dont-email.me>
<SGs*Zrmqz@news.chiark.greenend.org.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 14 Sep 2023 15:25:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="48cceb4bb543b24a506921b0f00095ab";
logging-data="2811691"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19h2sxlAN7RLt2RN6JVwp9qBDfCJ0DWr9M="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:/Di+F8IRPJi3Y5YhBZjA6tFQEck=
Content-Language: en-GB
In-Reply-To: <SGs*Zrmqz@news.chiark.greenend.org.uk>
 by: The Natural Philosop - Thu, 14 Sep 2023 15:25 UTC

On 14/09/2023 14:59, Theo wrote:
> In comp.sys.raspberry-pi The Natural Philosopher <tnp@invalid.invalid> wrote:
>> The strange thing is that it failed once after a minute, then I rebooted
>> and it failed after 20 minutes, and its been running several days now
>> with no issues at all.
>>
>> I am not sure valgrind would actually help unless it failed.
>
> valgrind will tell you if it spots memory corruption, even if the corruption
> is not yet enough to cause it to crash. It may help in making the problem
> clearer and deterministic where the corruption makes it unpredictable.
>
> Theo

I am wondering if the real reason is, that I trod on it. It is so
utterly random that I am thinking that there may be a hardware issue
like a cracked board. I wrecked the USB power socket for sure.

Well a new untrodden on Pi is not the bank breaker that it might be....

Thanks for all the helpful comments, but I am not ready to delve into
reams of stack traces just yet.

I think watch and see and then maybe try another board.

--
When plunder becomes a way of life for a group of men in a society, over
the course of time they create for themselves a legal system that
authorizes it and a moral code that glorifies it.

Frédéric Bastiat

Re: Weird code crash

<ygamsxoixhx.fsf@akutech.de>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7155&group=comp.sys.raspberry-pi#7155

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralf...@gmx.de (Ralf Fassel)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 17:29:46 +0200
Lines: 16
Message-ID: <ygamsxoixhx.fsf@akutech.de>
References: <udu5c4$2gutd$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net XX9w08MBhhS4x3phQ3bpzwG0XSShXOXziQ7zJaZ5lrjiPJcCo=
Cancel-Lock: sha1:uzTWjllP7KJQ/g0kzsY09OfJw84= sha1:BYeOBdIottBZIP3jxlJsob4wHeQ= sha256:9FuKqeJNjjqjwj3R4LPP50r8h6nb3BgI2ibbER8gIt8=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 by: Ralf Fassel - Thu, 14 Sep 2023 15:29 UTC

* 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'

Re: Weird code crash

<udv982$2lppb$4@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7156&group=comp.sys.raspberry-pi#7156

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 16:35:30 +0100
Organization: A little, after lunch
Lines: 31
Message-ID: <udv982$2lppb$4@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me> <ygamsxoixhx.fsf@akutech.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 14 Sep 2023 15:35:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="48cceb4bb543b24a506921b0f00095ab";
logging-data="2811691"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19B78naofTZvTMkYibvq/sJzUs90jMP+XI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:xiJmo8UsOu5lIIOc5vWuvGVYiXI=
Content-Language: en-GB
In-Reply-To: <ygamsxoixhx.fsf@akutech.de>
 by: The Natural Philosop - Thu, 14 Sep 2023 15:35 UTC

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.

--
The New Left are the people they warned you about.

Re: Weird code crash

<udvbkn$2mg4j$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7157&group=comp.sys.raspberry-pi#7157

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: newsforp...@yahoo.co.uk (nev young)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 17:16:23 +0100
Organization: newsforpasiphae1953
Lines: 33
Message-ID: <udvbkn$2mg4j$1@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me>
Reply-To: newsforpasiphae1953@yahoo.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 14 Sep 2023 16:16:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ad8d800681e0cc64e799c3dc9d44b996";
logging-data="2834579"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GF4qSDg4Qt29P96UWhUpqyW7Xzkrhkl1omlge9RGLxA=="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:0AeZNwyOcpSn43WAywo/90embkg=
In-Reply-To: <udu5c4$2gutd$1@dont-email.me>
Content-Language: en-GB
 by: nev young - Thu, 14 Sep 2023 16:16 UTC

On 14/09/2023 06:23, The Natural Philosopher wrote:
> I don't expect people to know the answer, but I could use some help in
> puzzling out where to look.
>
> 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

Elsewhere in this thread it is suggested checking fp!=nul.
Not knowing what the actual program is doing might I suggest also
closing fp after it has been read.

>
> WRITE
> =====
> fp=fopen(filename, "w");
> if (fp)
>     {
>     fprintf(fp,"%s%s\n",filedata,timestamp);
>     fclose(fp);
>     }
>

--
Nev
It causes me a great deal of regret and remorse
that so many people are unable to understand what I write.

Re: Weird code crash

<udvcid$2mlea$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7158&group=comp.sys.raspberry-pi#7158

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: no...@thanks.net (candycanearter07)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 11:32:13 -0500
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <udvcid$2mlea$1@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me> <ygamsxoixhx.fsf@akutech.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 14 Sep 2023 16:32:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2ef643f32ea65d35907355fd35a519cf";
logging-data="2840010"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yWtGXwJKGTKgOQNxkcOyOEqbPUuHHfOUlaRYbJ/+bWQ=="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:+WIaaG9Nt8pBLKLTw1mh/4gkdsI=
Content-Language: en-US
In-Reply-To: <ygamsxoixhx.fsf@akutech.de>
 by: candycanearter07 - Thu, 14 Sep 2023 16:32 UTC

On 9/14/23 10: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'

I don't think it was a SIGSEGV error, but you should be doing this
regardless.
--
--
user <candycane> is generated from /dev/urandom

Re: Weird code crash

<op.2a9vj3yca3w0dxdave@hodgins.homeip.net>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7159&group=comp.sys.raspberry-pi#7159

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodg...@nomail.afraid.org (David W. Hodgins)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 13:44:17 -0400
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <op.2a9vj3yca3w0dxdave@hodgins.homeip.net>
References: <udu5c4$2gutd$1@dont-email.me> <ygamsxoixhx.fsf@akutech.de>
<udv982$2lppb$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="52eae32682887df1d2b3b756e75b9b41";
logging-data="2865708"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Tz8qcWucBQzIlcESQi8EVP15NyQb4b3I="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:IiAwaBQq82/tQ91TLIOItb+ZKaM=
 by: David W. Hodgins - Thu, 14 Sep 2023 17:44 UTC

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

Re: Weird code crash

<udvjua$2nupi$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7160&group=comp.sys.raspberry-pi#7160

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 19:38:02 +0100
Organization: A little, after lunch
Lines: 41
Message-ID: <udvjua$2nupi$1@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me> <udvbkn$2mg4j$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 14 Sep 2023 18:38:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="48cceb4bb543b24a506921b0f00095ab";
logging-data="2882354"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ExtbUQnEF150wySAIloPb5QmNX5u9eek="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:2RlMQV/g2K03YqWMYvmdyW6TqFc=
In-Reply-To: <udvbkn$2mg4j$1@dont-email.me>
Content-Language: en-GB
 by: The Natural Philosop - Thu, 14 Sep 2023 18:38 UTC

On 14/09/2023 17:16, nev young wrote:
> On 14/09/2023 06:23, The Natural Philosopher wrote:
>> I don't expect people to know the answer, but I could use some help in
>> puzzling out where to look.
>>
>> 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
>
> Elsewhere in this thread it is suggested checking fp!=nul.
> Not knowing what the actual program is doing might I suggest also
> closing fp after it has been read.
>
both already done. Not closng it was the cause of a memory leak but I
fixed that a fortnight ago.

I am beginning to wonder if I did more damage than just the power socket
when I trod on it.

>>
>> WRITE
>> =====
>> fp=fopen(filename, "w");
>> if (fp)
>>      {
>>      fprintf(fp,"%s%s\n",filedata,timestamp);
>>      fclose(fp);
>>      }
>>
>

--
Canada is all right really, though not for the whole weekend.

"Saki"

Re: Weird code crash

<udvk6j$2nupi$2@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7161&group=comp.sys.raspberry-pi#7161

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 19:42:27 +0100
Organization: A little, after lunch
Lines: 54
Message-ID: <udvk6j$2nupi$2@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me> <ygamsxoixhx.fsf@akutech.de>
<udv982$2lppb$4@dont-email.me> <op.2a9vj3yca3w0dxdave@hodgins.homeip.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 14 Sep 2023 18:42:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="48cceb4bb543b24a506921b0f00095ab";
logging-data="2882354"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RIOcSza3dsIIQdjBk6PLaP3UI5IrmyrI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:fFetpRo/RkhpKyqSbZE2SQIE4yk=
In-Reply-To: <op.2a9vj3yca3w0dxdave@hodgins.homeip.net>
Content-Language: en-GB
 by: The Natural Philosop - Thu, 14 Sep 2023 18:42 UTC

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

--
Canada is all right really, though not for the whole weekend.

"Saki"

Re: Weird code crash

<op.2a9yq7lva3w0dxdave@hodgins.homeip.net>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7162&group=comp.sys.raspberry-pi#7162

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodg...@nomail.afraid.org (David W. Hodgins)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 14:53:21 -0400
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <op.2a9yq7lva3w0dxdave@hodgins.homeip.net>
References: <udu5c4$2gutd$1@dont-email.me> <ygamsxoixhx.fsf@akutech.de>
<udv982$2lppb$4@dont-email.me> <op.2a9vj3yca3w0dxdave@hodgins.homeip.net>
<udvk6j$2nupi$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="52eae32682887df1d2b3b756e75b9b41";
logging-data="2890365"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ma4PMAaW+g+TNba2YAAqi0+lK+g9ORwA="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:SHepq+JO5ApEPBc08jOJe0PweSU=
 by: David W. Hodgins - Thu, 14 Sep 2023 18:53 UTC

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

Re: Weird code crash

<udvl30$2nupi$6@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7163&group=comp.sys.raspberry-pi#7163

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 19:57:36 +0100
Organization: A little, after lunch
Lines: 32
Message-ID: <udvl30$2nupi$6@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me> <ygamsxoixhx.fsf@akutech.de>
<udv982$2lppb$4@dont-email.me> <op.2a9vj3yca3w0dxdave@hodgins.homeip.net>
<udvk6j$2nupi$2@dont-email.me> <op.2a9yq7lva3w0dxdave@hodgins.homeip.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 14 Sep 2023 18:57:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="48cceb4bb543b24a506921b0f00095ab";
logging-data="2882354"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/QLm2M7Iv8PMQDdxuyI2sxOMyDpQImb/M="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:GwjNpu/BR6CoVOep0B4Gah5aHEA=
In-Reply-To: <op.2a9yq7lva3w0dxdave@hodgins.homeip.net>
Content-Language: en-GB
 by: The Natural Philosop - Thu, 14 Sep 2023 18:57 UTC

On 14/09/2023 19:53, David W. Hodgins wrote:
> journalctl -b --no-h|grep fsck

Sep 14 14:17:03 systemd[1]: Created slice system-systemd\x2dfsck.slice.
Sep 14 14:17:03 systemd[1]: Listening on fsck to fsckd communication Socket.
Sep 14 14:17:04 systemd-fsck[109]: e2fsck 1.46.2 (28-Feb-2021)
Sep 14 14:17:04 systemd-fsck[109]: rootfs: clean, 51075/932256 files,
460111/3822976 blocks
Sep 14 14:17:14 systemd-fsck[178]: fsck.fat 4.2 (2021-01-31)
Sep 14 14:17:14 systemd-fsck[178]: There are differences between boot
sector and its backup.
Sep 14 14:17:14 systemd-fsck[178]: This is mostly harmless. Differences:
(offset:original/backup)
Sep 14 14:17:14 systemd-fsck[178]: 65:01/00
Sep 14 14:17:14 systemd-fsck[178]: Not automatically fixing this.
Sep 14 14:17:14 systemd-fsck[178]: Dirty bit is set. Fs was not properly
unmounted and some data may be corrupt.
Sep 14 14:17:14 systemd-fsck[178]: Automatically removing dirty bit.
Sep 14 14:17:14 systemd-fsck[178]: *** Filesystem was changed ***
Sep 14 14:17:14 systemd-fsck[178]: Writing changes.
Sep 14 14:17:14 systemd-fsck[178]: /dev/mmcblk0p1: 330 files,
25815/130554 clusters
Sep 14 14:30:12 systemd[1]: systemd-fsckd.service: Succeeded.

--
“Those who can make you believe absurdities, can make you commit
atrocities.”

― Voltaire, Questions sur les Miracles à M. Claparede, Professeur de
Théologie à Genève, par un Proposant: Ou Extrait de Diverses Lettres de
M. de Voltaire

Re: Weird code crash

<udvnk8$2oip3$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7164&group=comp.sys.raspberry-pi#7164

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: no...@thanks.net (candycanearter07)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 14:40:56 -0500
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <udvnk8$2oip3$1@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me> <ygamsxoixhx.fsf@akutech.de>
<udv982$2lppb$4@dont-email.me> <op.2a9vj3yca3w0dxdave@hodgins.homeip.net>
<udvk6j$2nupi$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 14 Sep 2023 19:40:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2ef643f32ea65d35907355fd35a519cf";
logging-data="2902819"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GbON4mIFwnMNpeWTLop9gvtqTAmdicUVEolysByyEEQ=="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:SFqJKSzUM0qusIeOZGOW8LDXdQI=
In-Reply-To: <udvk6j$2nupi$2@dont-email.me>
Content-Language: en-US
 by: candycanearter07 - Thu, 14 Sep 2023 19:40 UTC

On 9/14/23 13:42, The Natural Philosopher wrote:
> I assumed that the thing would have done its own fsck on every boot
> anyway...isnt that a debian default?

Pretty sure it's a standard, my arch install has it set.
>
> (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
>

1 is fsck check for the root partition and 2 is for others, right

--
--
user <candycane> is generated from /dev/urandom

Re: Weird code crash

<op.2a91pirva3w0dxdave@hodgins.homeip.net>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7165&group=comp.sys.raspberry-pi#7165

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodg...@nomail.afraid.org (David W. Hodgins)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 15:57:08 -0400
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <op.2a91pirva3w0dxdave@hodgins.homeip.net>
References: <udu5c4$2gutd$1@dont-email.me> <ygamsxoixhx.fsf@akutech.de>
<udv982$2lppb$4@dont-email.me> <op.2a9vj3yca3w0dxdave@hodgins.homeip.net>
<udvk6j$2nupi$2@dont-email.me> <op.2a9yq7lva3w0dxdave@hodgins.homeip.net>
<udvl30$2nupi$6@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="52eae32682887df1d2b3b756e75b9b41";
logging-data="2914390"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RNwRcqD9MvFSpN0ihBdxRERoVEmtJTHY="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:Ww7h3LuQdwlz08hHuZUfI8zRDvE=
 by: David W. Hodgins - Thu, 14 Sep 2023 19:57 UTC

On Thu, 14 Sep 2023 14:57:36 -0400, The Natural Philosopher <tnp@invalid.invalid> wrote:

> On 14/09/2023 19:53, David W. Hodgins wrote:
>> journalctl -b --no-h|grep fsck
>
> Sep 14 14:17:03 systemd[1]: Created slice system-systemd\x2dfsck.slice.
> Sep 14 14:17:03 systemd[1]: Listening on fsck to fsckd communication Socket.
> Sep 14 14:17:04 systemd-fsck[109]: e2fsck 1.46.2 (28-Feb-2021)
> Sep 14 14:17:04 systemd-fsck[109]: rootfs: clean, 51075/932256 files,
> 460111/3822976 blocks
> Sep 14 14:17:14 systemd-fsck[178]: fsck.fat 4.2 (2021-01-31)
> Sep 14 14:17:14 systemd-fsck[178]: There are differences between boot
> sector and its backup.
> Sep 14 14:17:14 systemd-fsck[178]: This is mostly harmless. Differences:
> (offset:original/backup)
> Sep 14 14:17:14 systemd-fsck[178]: 65:01/00
> Sep 14 14:17:14 systemd-fsck[178]: Not automatically fixing this.
> Sep 14 14:17:14 systemd-fsck[178]: Dirty bit is set. Fs was not properly
> unmounted and some data may be corrupt.
> Sep 14 14:17:14 systemd-fsck[178]: Automatically removing dirty bit.
> Sep 14 14:17:14 systemd-fsck[178]: *** Filesystem was changed ***
> Sep 14 14:17:14 systemd-fsck[178]: Writing changes.
> Sep 14 14:17:14 systemd-fsck[178]: /dev/mmcblk0p1: 330 files,
> 25815/130554 clusters
> Sep 14 14:30:12 systemd[1]: systemd-fsckd.service: Succeeded.

If there are any corrupted files, diagnosing any problems they cause will be
difficult. I strongly recommend re-installing.

Regards, Dave Hodgins

Re: Weird code crash

<SGs*uYnqz@news.chiark.greenend.org.uk>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7166&group=comp.sys.raspberry-pi#7166

 copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: theom+n...@chiark.greenend.org.uk (Theo)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: 14 Sep 2023 21:51:28 +0100 (BST)
Organization: University of Cambridge, England
Message-ID: <SGs*uYnqz@news.chiark.greenend.org.uk>
References: <udu5c4$2gutd$1@dont-email.me> <udvbkn$2mg4j$1@dont-email.me> <udvjua$2nupi$1@dont-email.me>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229";
logging-data="13803"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Thu, 14 Sep 2023 20:51 UTC

In comp.sys.raspberry-pi The Natural Philosopher <tnp@invalid.invalid> wrote:
> both already done. Not closng it was the cause of a memory leak but I
> fixed that a fortnight ago.
>
> I am beginning to wonder if I did more damage than just the power socket
> when I trod on it.

SIGABRT is a problem in your code. If you aren't seeing stuff in the kernel
log then it almost certainly isn't a hardware fault. It is a very special
skill to have a hardware fault without spewing lots of stuff there.

Post the code somewhere and someone can take a look. Otherwise you need to
use the development tools available to you to debug the problem.

Theo

Pages:123
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor