WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Re: Tiny Core v17.0 upgrade issues  (Read 6342 times)

Offline Stefann

  • Wiki Author
  • Full Member
  • *****
  • Posts: 170
Re: Tiny Core v17.0 upgrade issues
« Reply #90 on: April 26, 2026, 02:14:36 AM »
small update:
- still running after 48 hour.

This is the first time I have more than 34 hours "full functional on TC17".
- on the one hand this is a stromg indication that select() is the root cause
- on the other hand "not using select() and doing nonblocking read" is a perfect fix for my application

I keep it running for 7 days, until next Friday. If it did not crash by than I call it "demonstrated OS/kext rootcause" and "demonstrated application fix/workaround".

So: No posts on this thread for coming 5 days unless there is a crash.

Offline Stefann

  • Wiki Author
  • Full Member
  • *****
  • Posts: 170
Re: Tiny Core v17.0 upgrade issues
« Reply #91 on: April 27, 2026, 03:30:27 AM »
3x 24hr = 72hr crashfree continuous run and counting..

Offline Stefann

  • Wiki Author
  • Full Member
  • *****
  • Posts: 170
Re: Tiny Core v17.0 upgrade issues
« Reply #92 on: April 28, 2026, 02:21:59 AM »
4x 24hr = 96hr crashfree continuous run and counting..

Offline Stefann

  • Wiki Author
  • Full Member
  • *****
  • Posts: 170
Re: Tiny Core v17.0 upgrade issues
« Reply #93 on: April 29, 2026, 02:15:25 AM »
5x 24hr = 120hr crashfree continuous run and counting..

Offline Stefann

  • Wiki Author
  • Full Member
  • *****
  • Posts: 170
Re: Tiny Core v17.0 upgrade issues
« Reply #94 on: April 30, 2026, 03:12:04 AM »
6x 24hr = 144hr crashfree continuous run and counting..

Tomorrow around this time I will stop it manual if it still did not crash.
A full week of crash free run I would consider "demonstrated".
That will give me at least a "fix/workaround to run my application under TC17".

I will however do a bit more work to zoom-in on rootcause...

I will get the screensaver deactivated by the instructions from @Rich
Than I will restart with select() back in but read() still on non-blocking (the select() will than not have any function but just be there to test whether it hurts).

The difference between original program and currently running version is not only that select() is no longer called, the read() is now called in non-blocking mode in stead of "select() gated blocking mode". So.... rootcause could be select() but it could also be that "blocking read() call" blocks forever even if there is no reason to do so. This would actually connect to the fact that zero logging gets produced at a crash. "The system just locks".
I'm running on a single core cpu. So if this single core gets stuck there is nothing else to take over (not sure it works like that, but it is at least a fact).

Current version of the application is made configurable on this by a user setting so I can run this configuration change without need for recompile. That is a benefit. This brings the amount of changes to an absolute minimum.

So....
- Any advice from a different timezone on "what to do with next run" is welcome.
- Again... although I'm logging rsyslog towards a network connected second computer, I get zero logging from rsyslog with a crash, even though I'm logging at kern.* level. Any advice to get more logging would also be welcome.

Offline Stefann

  • Wiki Author
  • Full Member
  • *****
  • Posts: 170
Re: Tiny Core v17.0 upgrade issues
« Reply #95 on: May 01, 2026, 01:54:40 AM »
7x 24hr (-1hr, started early today) = 167hr crashfree continuous run
Good!

I just stopped the application manually.

I restarted the application with select(). The read() is still in nonblocking mode.
That means that the select() does not have a function. Its only there to see whether it crashes.
As said yesterday I originally planned to disable the screensaver to allow my monitor to show logging. But... I decide not to do that. I have earlier seen that addition changes bring different behavior.
I now did zero changes. I only started the application with a different config-file.

So... if the select() is the crash-cause it should crash within 24hr, likely around 15hr
If it does not crash the "non blocking nature" of the read() is probably the crash-cause.
fingers crossed again...

Recap of results so far:

TC15:
- including kext: usb-serial-6.6.8-tinycore.tcz
- recompile full application
- run application with "every second 812byte read from /dev/ttyUSB0; baudrate 11520"
- no crash over multiple month

TC17:
- including kext: usb-serial-6.18.2-tinycore.tcz
- recompile full application
- run application with "every second 812byte read from /dev/ttyUSB0; baudrate 11520"
- 4..6x tested, always crashes, mostly after about 15hrs; always within 24hrs

TC17:
- including kext: usb-serial-6.18.2-tinycore.tcz
- SAME application, NO recompile
- run application with disabled read from /dev/ttyUSB0 by configuration constant
- 1x tested, NO CRASH after 30hrs >> I thought this was good but as next config crashed after 33.5hrs I may not have been running long enough

TC17:
- including kext: usb-serial-6.18.2-tinycore.tcz
- not use select()
- use read() in non-blocking mode
- recompile full application
- run application with "every second 812byte read from /dev/ttyUSB0; baudrate 11520"
- 1x tested, no crash, manually stopped after 7 days, 167hr.
SO:
- using the read() in non-blocking mode has all functionality I need, so to my application this is a very acceptable fix.
- Rootcasue for crash is likely either the select() OR the blocking nature of the read(), I keep zooming in to find out.
« Last Edit: May 01, 2026, 01:58:35 AM by Stefann »

Offline gadget42

  • Hero Member
  • *****
  • Posts: 1034
Re: Tiny Core v17.0 upgrade issues
« Reply #96 on: May 01, 2026, 03:53:14 PM »
thanks for taking the time to relate your testing and subsequent results!
** WARNING: connection is not using a post-quantum kex exchange algorithm.
** This session may be vulnerable to "store now, decrypt later" attacks.
** The server may need to be upgraded. See https://openssh.com/pq.html
** Also see: post quantum internet 2025 - https://blog.cloudflare.com/pq-2025/

Offline Stefann

  • Wiki Author
  • Full Member
  • *****
  • Posts: 170
Re: Tiny Core v17.0 upgrade issues
« Reply #97 on: Today at 12:53:04 AM »
@gadget42, thanks for the warm comment.
It feels good. Assuming this ends in finding an OS-bug and not a “stupid stupid application mistake after all”, it’s my contribution to the community which is more than fair given all that I’m taken from it.

This morning, after 23 hours, still running.
So I’m happy that I did not change the screensaver setup as than I would have been doubting that to be the reason.
So far “faulty configurations” crash on average after 15 hours, max I have seen after 35 hours. So I keep it running until tomorrow morning to see whether it’s still alive after 48 hours. I have obligations today so no opportunity to do anything earlier anyways.

If this keeps running it would indicate that select() is NOT the cause.
It would than strongly point tot the blocking setting of read() to be the cause.
If it still runs tomorrow morning I will restart without select() and with read() in blocking mode.
I get data bursts every second so the blocking read() will pass regularly. This can NOT be a solution for my application because it basically freezes with 1 second gaps. But that’s ok. It’s testing.