<div dir="ltr">Now i use after send to me, i restarted the modul many times and no problem. </div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Michael Balzer via OvmsDev <<a href="mailto:ovmsdev@lists.openvehicles.com">ovmsdev@lists.openvehicles.com</a>> ezt írta (időpont: 2025. jan. 8., Sze, 8:29):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><u></u>
<div>
Everyone,<br>
<br>
I've just checked in my changes, so this is now included in the edge
build (3.3.004-331-g4a7b966d, already available on dexters-web).<br>
<br>
I had no issues with my modules, but depending on the vehicle &
configuration, we may need to raise the new default queue size
beyond 100.<br>
<br>
Please test & report. If the queue is too small, the module will
crash with a "queue overflow" log entry.<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div>Am 06.01.25 um 20:49 schrieb Michael
Balzer via OvmsDev:<br>
</div>
<blockquote type="cite">
Tamás,<br>
<br>
I've got a test build that should fix your reboot issue, if my
diagnosis was correct. Can you please test this firmware image?<br>
<br>
<a href="http://ovms.dexters-web.de/f/firmware/test/ovms3.bin" target="_blank">http://ovms.dexters-web.de/f/firmware/test/ovms3.bin</a><br>
<br>
The build works in my test & live module. The changes are not
yet checked in, patch attached. This consists of a) delegating
registry changes to the event task and b) invalidating callbacks
in the list on deregistration before actually deleting them, so
the list processing cannot run into deleted entries, when
deregistration is done from within a callback execution.<br>
<br>
The changes need another mutex and a larger event queue. I had
queue size 40 before, minimum now is 80, build uses 100 to be on
the safe side. That means another 720 bytes of 8-bit RAM are used
for the queue unfortunately, but that shouldn't be a problem yet.<br>
<br>
I also again needed to power off my module for the reboot, but
with the new firmware, the reboot works. So chances are, this
issue is now hit more often than before, probably because of more
stuff going on in the shutdown.<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div>Am 02.01.25 um 15:25 schrieb Michael
Balzer via OvmsDev:<br>
</div>
<blockquote type="cite">
The log shows it actually crashes during the shutdown process --
but @Michael, I'm pretty sure this is an old issue, turning up
now only by chance.<br>
<br>
This looks like a race condition between event handler
invocation and deregistration:<br>
<br>
<font face="monospace">Guru Meditation Error: Core 1 panic'ed
(InstrFetchProhibited).</font><font face="monospace">
Exception was unhandled.</font><br>
<font face="monospace">…<br>
Backtrace: 0x41000000:0x3ffc8c30 0x401208ed:0x3ffc8c60
0x401209d4:0x3ffc8cc0 0x40120a5d:0x3ffc8d00<br>
<br>
→ Crash at <b>0x41000000</b> (invalid address), called from:<br>
<br>
0x401208ed is in
OvmsEvents::HandleQueueSignalEvent(event_queue_t*)
(/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_events.cpp:310).<br>
305 {<br>
306 for (EventCallbackList::iterator
itc=el->begin(); itc!=el->end(); ++itc)<br>
307 {<br>
308 m_current_started = monotonictime;<br>
309 m_current_callback = *itc;<br>
<b>310
m_current_callback->m_callback(m_current_event,
msg->body.signal.data);</b><br>
311 m_current_callback = NULL;<br>
312 }<br>
313 }<br>
314 }</font><br>
<br>
From there it then enters a crash loop from the crash handler
somehow running into an illegal address when trying to access
the RTC boot_data object (?).<br>
<br>
<br>
I think, when introducing the separate event handling task, we
missed adding a lock to make manipulations & accesses to the
event handler list atomic.<br>
<br>
The log shows, the event queue grew significantly due to
duktape/scripts lagging during shutdown (as seen in the log), so
the task was quite busy.<br>
<br>
So probably a `DeregisterEvent()` call from the shutdown process
came in, invalidating a callback entry just while the event task
was processing that callback list.<br>
<br>
Solving this may need some additional thoughts & measures:
locking the whole event registry with handlers lagging like this
could lead to a deadlock… probably at least the Duktape
component needs to cleanly abort/reject all pending events
before/while deregistering.<br>
<br>
Michael, if you'd like to have a look at this, go ahead.<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div>Am 01.01.25 um 11:47 schrieb Tamás
Kovács via OvmsDev:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Now i change the sd card to a smaller, and formatted to
fat32 (16Gb), but on reboot is crashing.</div>
<div>Now connect a computer to the usb port, and create a
log in verbose, attached to the email.</div>
<div><br>
</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">Üdvözlettel:<br>
Kovács Tamás<br>
<br>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
OvmsDev mailing list
<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank">OvmsDev@lists.openvehicles.com</a>
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" target="_blank">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Michael Balzer * Am Rahmen 5 * D-58313 Herdecke
Fon 02330 9104094 * Handy 0176 20698926</pre>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
OvmsDev mailing list
<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank">OvmsDev@lists.openvehicles.com</a>
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" target="_blank">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Michael Balzer * Am Rahmen 5 * D-58313 Herdecke
Fon 02330 9104094 * Handy 0176 20698926</pre>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
OvmsDev mailing list
<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank">OvmsDev@lists.openvehicles.com</a>
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" target="_blank">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Michael Balzer * Am Rahmen 5 * D-58313 Herdecke
Fon 02330 9104094 * Handy 0176 20698926</pre>
</div>
_______________________________________________<br>
OvmsDev mailing list<br>
<a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank">OvmsDev@lists.openvehicles.com</a><br>
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" rel="noreferrer" target="_blank">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Üdvözlettel:<br>Kovács Tamás<br><br></div>