<feed xmlns='http://www.w3.org/2005/Atom'>
<title>threadx.git/ports/linux/gnu/src/tx_thread_schedule.c, branch v6.4.1_cert</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/threadx.git/atom/ports/linux/gnu/src/tx_thread_schedule.c?h=v6.4.1_cert</id>
<link rel='self' href='http://cgit.235523.xyz/threadx.git/atom/ports/linux/gnu/src/tx_thread_schedule.c?h=v6.4.1_cert'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/'/>
<updated>2026-10-14T14:57:14Z</updated>
<entry>
<title>Restored the Linux port mutex retry</title>
<updated>2026-10-14T14:57:14Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-10-14T14:57:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=b017aea7e4e8a3e3d81fc110a5b815af754438eb'/>
<id>urn:sha1:b017aea7e4e8a3e3d81fc110a5b815af754438eb</id>
<content type='text'>
This was reverted because a NetX Secure regression test segfaulted with it
in place. The cause was the test: it hands the certificate verify path a
stack-local certificate whose signature it never assigns, and this change
moves the stack layout that decides whether the unassigned slot reads null
or a readable leftover. That test has been fixed, so the retry comes back.

Measured with the test unfixed and this change in place, on a layout built
without the stack protector: eight of eight runs segfault, the fault read
from the faulting process as a null signature dereferenced by the ECDSA
verify. With the test fixed, nineteen build configurations run it eight
times each with no fault.

Without this change, a thread signalled into the port's suspend handler
never returns to the contended-mutex loop, the next unlock's wake-up is
lost, the scheduler is left parked, and the timer interrupt never runs --
which stalls the tick and hangs about 0.39% of instances of a few TCP
tests for their full timeout.
</content>
</entry>
<entry>
<title>Reverted the Linux port mutex retry on this branch</title>
<updated>2026-09-30T19:10:15Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-09-30T19:10:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=74d9e3937fa913380fdfdd902e528411c661ea3f'/>
<id>urn:sha1:74d9e3937fa913380fdfdd902e528411c661ea3f</id>
<content type='text'>
The backport fixes a real deadlock and is right in itself, but on this branch it
reproducibly breaks the NetX Duo nx_secure suite: nx_secure_tls_coverage_test
segfaults in 8 of 19 configurations on one run and 9 of 19 on a re-run of the same
commit, against four consecutive runs with none before it.

Whether the retry causes that or merely exposes something latent is not known. The
first guess, a kernel object outliving its stack frame, is wrong: that test's
sessions are file scope and its creates and deletes balance. The deadlock the
retry cures costs one configuration's coverage data at roughly 0.4% of test
instances, which the union absorbs, so the branch is measurably worse with it than
without while the interaction is unexplained.

This is a deferral, not a dismissal. The diagnosis stands, the reproduction is
recorded, and re-applying is one cherry-pick. The upstream fix is unaffected.

This reverts commit ac95c32c.

Assisted-by: Claude Code (Opus 5) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Stopped the Linux port losing a mutex wake-up to a suspend signal</title>
<updated>2026-09-30T15:55:52Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-09-30T15:55:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=ac95c32c3e82c6db18b89fe6b7b23a89e2452e8a'/>
<id>urn:sha1:ac95c32c3e82c6db18b89fe6b7b23a89e2452e8a</id>
<content type='text'>
The port suspends a thread with a signal whose handler calls sigsuspend and does
not return until resumed, and takes its critical section with a bare
pthread_mutex_lock. A thread signalled while parked on _tx_linux_mutex never
returns to glibc's contended-mutex loop, so the next unlock's wake-up goes to a
thread that will not act on it and every other waiter is left parked on a mutex
that is free.

tx_linux_mutex_lock now calls a helper that waits with pthread_mutex_timedlock and
retries every TX_LINUX_MUTEX_RETRY_NSEC, one millisecond, so a lost wake-up costs a
retry period instead of the process.

The original fix was made by inspection, on a port never observed to deadlock. It
has now been observed. A stalled regression test reads the mutex free, owner zero,
with the scheduler still on its futex word; it never posts _tx_linux_isr_semaphore,
the timer thread never returns from _tx_thread_context_restore, and the simulated
clock stops. Bounding a wait cannot save it: one capture held 116 ticks of timeout
unchanged across 40 seconds.

Measured on netx_tcp_overlapping_packet_test_10, six workers on four pinned CPUs:
5 stalls in 1,266 runs before, 0 in 2,034 after, three held frozen through 60
seconds of untraced /proc sampling. netxduo/default_build_coverage is unmoved at
914/914, 121 skipped, 497 files, 11230/11256 lines and 6912/6925 branches.

(cherry picked from commit b567428f2a826fa24e78fc82f6a5dd46a87b079c)

Assisted-by: Claude Code (Opus 5) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Update copyright.</title>
<updated>2024-01-29T05:51:15Z</updated>
<author>
<name>Bo Chen (from Dev Box)</name>
<email>boche@microsoft.com</email>
</author>
<published>2024-01-29T05:51:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=8276bcf71142197e09551e29f1779299fa591ec7'/>
<id>urn:sha1:8276bcf71142197e09551e29f1779299fa591ec7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>6.1 minor release</title>
<updated>2020-09-30T22:42:41Z</updated>
<author>
<name>Scott Larson</name>
<email>sclarson@microsoft.com</email>
</author>
<published>2020-09-30T22:42:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=1b5816a206016d06128bd5e9afa7fbf8f09b0847'/>
<id>urn:sha1:1b5816a206016d06128bd5e9afa7fbf8f09b0847</id>
<content type='text'>
</content>
</entry>
<entry>
<title>updated to 6.0.1 and added additional processors/toolchains</title>
<updated>2020-07-16T21:32:40Z</updated>
<author>
<name>tameraw</name>
<email>9868777+tameraw@users.noreply.github.com</email>
</author>
<published>2020-07-16T21:32:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=2c35570dc9ced8690ea269d1efab201c361fea98'/>
<id>urn:sha1:2c35570dc9ced8690ea269d1efab201c361fea98</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Removed linux and win32 ports for now</title>
<updated>2020-05-12T20:53:18Z</updated>
<author>
<name>PProvost</name>
<email>peter@provost.org</email>
</author>
<published>2020-05-12T20:53:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=d9164e7bc6dac55bbc0248fce25859fa9194c198'/>
<id>urn:sha1:d9164e7bc6dac55bbc0248fce25859fa9194c198</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Initial commit</title>
<updated>2020-05-11T14:55:07Z</updated>
<author>
<name>PProvost</name>
<email>peter@provost.org</email>
</author>
<published>2020-05-11T14:55:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=852421fda03a7722d7adb45b187235cd66fa264e'/>
<id>urn:sha1:852421fda03a7722d7adb45b187235cd66fa264e</id>
<content type='text'>
</content>
</entry>
</feed>
